Constant lookup should omit topmost lexical scope; not bail out on first 
Object-hosting lexical scope
-----------------------------------------------------------------------------------------------------

                 Key: JRUBY-3277
                 URL: http://jira.codehaus.org/browse/JRUBY-3277
             Project: JRuby
          Issue Type: Bug
          Components: Core Classes/Modules
    Affects Versions: JRuby 1.1.6
            Reporter: Charles Oliver Nutter
             Fix For: JRuby 1.1.7


Two new RubySpec failures pointed at a behavioral flaw in our constant lookup. 
Specifically, we bailed out of lexical lookup at the first cref == Object. The 
correct behavior is to avoid searching the topmost lexical scope (toplevel) but 
to still search Object-based cref lexical scopes lower in the search. I have a 
fix prepared. Here is the two failures from the specs:

{noformat}
1)
Constant resolution within methods with statically assigned constants searches 
Object as a lexical scope only if Object is explicitly opened FAILED
Expected :const20_2
 to equal :const20_1

spec/ruby/language/constants_spec.rb:199
spec/ruby/language/constants_spec.rb:149
spec/ruby/language/constants_spec.rb:54:in `load'

2)
Constant resolution within methods with dynamically assigned constants searches 
Object as a lexical scope only if Object is explicitly opened FAILED
Expected :const211_2
 to equal :const211_1

spec/ruby/language/constants_spec.rb:294
spec/ruby/language/constants_spec.rb:149
spec/ruby/language/constants_spec.rb:54:in `load'
{noformat}

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply via email to