Issue #7865 has been reported by charliesome (Charlie Somerville). ---------------------------------------- Bug #7865: A required file is not added to $LOADED_FEATURES until after it has run https://bugs.ruby-lang.org/issues/7865 Author: charliesome (Charlie Somerville) Status: Open Priority: Normal Assignee: Category: Target version: ruby -v: ruby 2.0.0dev (2013-02-08 trunk 39161) [x86_64-darwin11.4.0] =begin Required files are not added to $LOADED_FEATURES until after they have been executed. This is easily demonstrated with two files, a.rb and b.rb: # a.rb require "./b" p $LOADED_FEATURES.grep(/b\.rb/).any? # b.rb p $LOADED_FEATURES.grep(/b\.rb/).any? Running (({a.rb})) should print: true true But it current prints: false true =end
[ruby-trunk - Bug #7865][Open] A required file is not added to $LOADED_FEATURES until after it has r
on 2013-02-16 14:30
on 2013-02-17 06:04
Issue #7865 has been updated by ko1 (Koichi Sasada). Category set to core Assignee set to matz (Yukihiro Matsumoto) Priority changed from Normal to High Target version set to next minor Matz issue? or other can judge it? This behavior is same as 1.9.3 or before. So it is not a compatibility issue. ---------------------------------------- Bug #7865: A required file is not added to $LOADED_FEATURES until after it has run https://bugs.ruby-lang.org/issues/7865#change-36368 Author: charliesome (Charlie Somerville) Status: Open Priority: High Assignee: matz (Yukihiro Matsumoto) Category: core Target version: next minor ruby -v: ruby 2.0.0dev (2013-02-08 trunk 39161) [x86_64-darwin11.4.0] =begin Required files are not added to $LOADED_FEATURES until after they have been executed. This is easily demonstrated with two files, a.rb and b.rb: # a.rb require "./b" p $LOADED_FEATURES.grep(/b\.rb/).any? # b.rb p $LOADED_FEATURES.grep(/b\.rb/).any? Running (({a.rb})) should print: true true But it current prints: false true =end
[ruby-trunk - Bug #7865][Closed] A required file is not added to $LOADED_FEATURES until after it has
on 2013-02-20 03:49
Issue #7865 has been updated by nobu (Nobuyoshi Nakada).
Status changed from Open to Closed
Priority changed from High to Normal
=begin
It's an intended behavior, not a bug.
When an exception raised while loading, the feature won't be added to
(({$LOADED_FEATURES})).
And, it hasn't been loaded yet, has it?
If you want to know what features are now getting loaded, you should
suppose new feature, e.g. (({$LOADING_FEATURES})).
=end
----------------------------------------
Bug #7865: A required file is not added to $LOADED_FEATURES until after
it has run
https://bugs.ruby-lang.org/issues/7865#change-36638
Author: charliesome (Charlie Somerville)
Status: Closed
Priority: Normal
Assignee: matz (Yukihiro Matsumoto)
Category: core
Target version: next minor
ruby -v: ruby 2.0.0dev (2013-02-08 trunk 39161) [x86_64-darwin11.4.0]
=begin
Required files are not added to $LOADED_FEATURES until after they have
been executed.
This is easily demonstrated with two files, a.rb and b.rb:
# a.rb
require "./b"
p $LOADED_FEATURES.grep(/b\.rb/).any?
# b.rb
p $LOADED_FEATURES.grep(/b\.rb/).any?
Running (({a.rb})) should print:
true
true
But it current prints:
false
true
=end
Please log in before posting. Registration is free and takes only a minute.
Existing account
(Switch to SSL-encrypted connection)
NEW: Do you have a Google/GoogleMail or Yahoo account? No registration required!
Log in with Google account | Log in with Yahoo account
Log in with Google account | Log in with Yahoo account
No account? Register here.