Bug #3642: Exceptions' line counter doesn't display properly for files longer than 65535 lines.
http://redmine.ruby-lang.org/issues/show/3642

Author: Anonymous Anonymous
Status: Open, Priority: Low
ruby -v: ruby 1.8.7 (2010-01-10 patchlevel 249) [i486-linux], ruby 1.9.1p378 (2010-01-10 revision 26273) [i486-linux], ruby 1.9.2dev (2010-07-30) [i486-linux]

I was working on some conversion tools to convert from another language to Ruby and in the process I managed to create a file which was 69129 lines long; while trying to run it I've received a Ruby exception:

(...)/script.rb:503:in `block in main': undefined method `[]=' for nil:NilClass (NoMethodError)
	from (...)/script.rb:501:in `loop'
	from (...)/script.rb:501:in `main'

Except the exception didn't get thrown on line 503 but on line 66039, apparently exceptions' line counter overflows on 2 ** 16. I've also tested __LINE__ constant and I tried to artificially induce a syntax error after 65k point, both displayed the proper line number.


----------------------------------------
http://redmine.ruby-lang.org