Procs lack __line__ (and __file__) property
-------------------------------------------

                 Key: JRUBY-5893
                 URL: https://jira.codehaus.org/browse/JRUBY-5893
             Project: JRuby
          Issue Type: New Feature
          Components: Core Classes/Modules, Ruby 1.8.7
    Affects Versions: JRuby 1.6.1, JRuby 1.5.6
            Reporter: Ivo Wever
            Priority: Minor


In MRI, procs have properties __line__ and __file__. The method call

  lambda {}.__line__ 

succeeds. In JRuby, this call fails with
 
  NoMethodError: undefined method `__line__' for #<Proc:... 

The linenumber is available in the class, as it is shown in inspect:
  
  "#<Proc:0x56f449b8@(irb):3>"

I've browsed through the sources a bit, but didn't see where it was appended.

Rubinius doesn't implement __line__ either BTW.

--
This message is automatically generated by JIRA.
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