#478 √ resolved
Alexander Flatter

Extlib's Module::find_const does not work properly when searching siblings

Reported by Alexander Flatter | July 22nd, 2008 @ 10:01 PM

>> require 'extlib'
=> true
>> module Foo
>>   module Bar
>>   end
>> end
=> nil
>> Foo.find_const('Bar')
=> Foo::Bar
>> Foo.find_const('Baz')
=> Foo # Should raise NameError
>> Object.find_const('Bar')
NameError: NameError
	from /Library/Ruby/Gems/1.8/gems/extlib-0.9.3/lib/extlib/module.rb:39:in `__nested_constants__'
	from /Library/Ruby/Gems/1.8/gems/extlib-0.9.3/lib/extlib/module.rb:9:in `find_const'
	from (irb):17
	from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/fileutils.rb:1239

Comments and changes to this ticket

Please Login or create a free account to add a new comment.

You can update this ticket by sending an email to from your email client. (help)

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

Shared Ticket Bins

People watching this ticket

Attachments