calling defined?(super) in a module method causes a NullPointerException
------------------------------------------------------------------------

                 Key: JRUBY-4776
                 URL: http://jira.codehaus.org/browse/JRUBY-4776
             Project: JRuby
          Issue Type: Bug
    Affects Versions: JRuby 1.4, JRuby 1.5
         Environment: ubuntu 9.10
            Reporter: Jesse Rankin
            Assignee: Thomas E Enebo
            Priority: Minor


mri ruby-1.8.7-p249:

$ ruby -e "module A; def test; defined?(super); end; end; class B; include A; 
end; puts B.new.test;"
super

jruby 1.5.0.RC3:

$ jruby -e "module A; def test; defined?(super); end; end; class B; include A; 
end; puts B.new.test;"
-e:-1:in `ensure_1$RUBY$__ensure__': java.lang.NullPointerException
        from -e:1:in `method__1$RUBY$test'
        from ruby___dash_e__Invokermethod__1$RUBY$testFixed0#test:65535:in 
`call'
        from ruby___dash_e__Invokermethod__1$RUBY$testFixed0#test:65535:in 
`call'
        from CachingCallSite.java:289:in `cacheAndCall'
        from CachingCallSite.java:108:in `call'
        from -e:1:in `__file__'
        from -e:-1:in `load'
        from Ruby.java:684:in `runScript'
        from Ruby.java:567:in `runNormally'
        from Ruby.java:413:in `runFromMain'
        from Main.java:286:in `run'
        from Main.java:128:in `run'
        from Main.java:97:in `main'

jruby 1.4.0:

jruby -e "module A; def test; defined?(super); end; end; class B; include A; 
end; puts B.new.test;"
-e:-1:in `ensure_1$RUBY$__ensure__': java.lang.NullPointerException
        from -e:1:in `method__1$RUBY$test'
        from __dash_e__#test:-1:in `call'
        from __dash_e__#test:-1:in `call'
        from CachingCallSite.java:290:in `cacheAndCall'
        from CachingCallSite.java:109:in `call'
        from -e:1:in `__file__'
        from -e:-1:in `load'
        from Ruby.java:628:in `runScript'
        from Ruby.java:550:in `runNormally'
        from Ruby.java:396:in `runFromMain'
        from Main.java:272:in `run'
        from Main.java:117:in `run'
        from Main.java:97:in `main'


-- 
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