Backtrace of exception refers to wrong line
-------------------------------------------
Key: JRUBY-2138
URL: http://jira.codehaus.org/browse/JRUBY-2138
Project: JRuby
Issue Type: Bug
Components: Core Classes/Modules
Affects Versions: JRuby 1.1RC2
Environment: Windows XP
Reporter: Rutger Nijlunsing
Running t.rb containing:
a = 3
"" + nil
...gives:
c:\temp\t.rb:1: can't convert nil into String (TypeError)
..which refers to line 1, while it should refer to line 2.
'line 1' seems to be 'the first line with code in the file'.
It seems to have something to do with the type of exception, since
changing line 2 to 'nil + nil' will refer to the right line.
Bug found in code like:
require 'mycomplexlib'
ENV['PATH'] = File.dirname(File.expand_path($0)) + ";" + ENV['PATH']
...which blamed the require, masking the other bug (ENV['PATH'] == nil,
ENV['Path'] != nil)
--
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