Bj?rn Nordb? <bn / strangedays.no> wrote:
> I'm using Emacs' ruby-mode together with irb as inferior ruby, but the
> line numbers for exceptions end up completely wrong:

Forgot the technical information:

ruby-mode 1.58
irb 0.9-02.07.03
GNU Emacs 21.2.1
Debian Sarge

Here's an example, given the code:

def pow(x)
  x * x
end

pow()

Which I evaluate twice (C-c C-e):

irb(main):001:0> irb(main):002:1>   irb(main):003:1>   nil
irb(main):004:0>                    ArgumentError: wrong # of arguments(0 for 1)
	from (irb):5:in `pow'
	from (irb):5
irb(main):006:0> irb(main):007:1>   irb(main):008:1>   nil
irb(main):009:0>                    ArgumentError: wrong # of arguments(0 for 1)
	from (irb):10:in `pow'
	from (irb):10
irb(main):011:0> 

As you can see, it reports the error on line 5 the first time and line
10 the second.


-- 
I've seen things you people wouldn't believe. Attack ships on fire off
the shores of the Nonestic Ocean. I watched magic blunderbusses flash
and glitter in the dark near Glindea's Palace. All those moments will
be lost in time, like tears in rain. Time to die...