[#122258] [Ruby Misc#21367] Remove link to ruby-doc.org from www.ruby-lang.org/en/documentation/ — "p8 (Petrik de Heus) via ruby-core" <ruby-core@...>
Issue #21367 has been reported by p8 (Petrik de Heus).
11 messages
2025/05/23
[ruby-core:122117] [Ruby Bug#21339] Namespace: `RubyVM::InstructionSequence.load_iseq` isn't called for the root namespace
From:
"Eregon (Benoit Daloze) via ruby-core" <ruby-core@...>
Date:
2025-05-15 10:49:17 UTC
List:
ruby-core #122117
Issue #21339 has been updated by Eregon (Benoit Daloze).
Basically dependent or even caused by #21324 then
----------------------------------------
Bug #21339: Namespace: `RubyVM::InstructionSequence.load_iseq` isn't called for the root namespace
https://bugs.ruby-lang.org/issues/21339#change-113271
* Author: byroot (Jean Boussier)
* Status: Assigned
* Assignee: tagomoris (Satoshi Tagomori)
* ruby -v: ruby 3.5.0dev (2025-05-14T12:41:46Z master b5575a80bc) +PRISM [arm64-darwin24]
* Backport: 3.2: UNKNOWN, 3.3: UNKNOWN, 3.4: UNKNOWN
----------------------------------------
```ruby
File.write("/tmp/compile-cache.rb", <<~'RUBY')
class << RubyVM::InstructionSequence
def load_iseq(path)
p [:load_iseq, path]
RubyVM::InstructionSequence.compile_file(path)
end
end
RUBY
File.write("/tmp/test-file.rb", "")
puts "main:"
require "/tmp/compile-cache.rb"
require "/tmp/test-file.rb"
if ENV["RUBY_NAMESPACE"]
puts "namespace:"
ns = Namespace.new
ns.require("/tmp/compile-cache.rb")
ns.require("/tmp/test-file.rb")
end
```
Expected behavior:
I would expect `load_iseq` to be invoked both in the root namespace and the user namespace when `RUBY_NAMESPACE=1`.
Actual behavior:
Somehow it's only invoked in the user namespace:
```bash
main:
[:compile_cache_setup]
[:load_iseq, "/tmp/test-file.rb"]
```
```bash
main:
[:compile_cache_setup]
namespace:
[:compile_cache_setup]
[:load_iseq, "/tmp/test-file.rb"]
```
But I don't understand why.
--
https://bugs.ruby-lang.org/
______________________________________________
ruby-core mailing list -- ruby-core@ml.ruby-lang.org
To unsubscribe send an email to ruby-core-leave@ml.ruby-lang.org
ruby-core info -- https://ml.ruby-lang.org/mailman3/lists/ruby-core.ml.ruby-lang.org/