Kernel.caller behaviour with here docs differs from MRI
-------------------------------------------------------

                 Key: JRUBY-5252
                 URL: http://jira.codehaus.org/browse/JRUBY-5252
             Project: JRuby
          Issue Type: Bug
          Components: Core Classes/Modules
    Affects Versions: JRuby 1.5.3
         Environment: Solaris 10
            Reporter: Ben Summers
            Priority: Minor



Given the script below:

$ ruby test/x.rb 
"test/x.rb:5:in `a'"

$ jruby test/x.rb 
"test/x.rb:8:in `a'"

In MRI, the line number for the caller is the line of the function, but in 
JRuby, the line number is the line number of the last insertion point in the 
here doc.


module Pants
  
  def self.a
    b <<-__E
    Hello
    There
    #{1}
    __E
  end
  
  def self.b(value)
    p caller.first
  end
  
end

Pants.a



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