Strangeness pasting ruby code into irb command line
Someone please explain this phenomenon. I have some ruby code in a text file. When I paste it line by line into an irb session, no problem. When I select the whole chunk of code and paste it all at once, some extra stuff is printed. Maybe I've forgotten some basic point, but for now I am puzzled. I'm running Arch linux, bash shell in rxvt, ruby 1.9.1, irb 0.9.5, and pasting using the mouse middle button (the wheel)
The ruby code ("Ref" was already defined earlier):
class HorRef < Ref
def initialize(number_of_lines=1)
super(number_of_lines)
end
end
What appears in the xterm running an irb session. The first attempt was line by line. The second, it appears an 'ls' command was run.
irb(main):130:0> class HorRef < Ref
irb(main):131:1> def initialize(number_of_lines=1)
irb(main):132:2> super(number_of_lines)
irb(main):133:2> end
irb(main):134:1> end
=> nil
irb(main):135:0> class HorRef < Ref
irb(main):136:1> def initialize(number_of_lines=1)
irb(main):137:2>
3dscope_schem.aux 3dscope_schem.tex~ dsweparts.ps~
3dscope_schem.dvi Stereoscopic8x8x8.ps puresine1.ps
3dscope_schem.log draw_stereo888.rb puresine_2009redo.ps
3dscope_schem.pdf draw_stereo888.rb~ puresine_2009redo.ps~
3dscope_schem.tex dsweparts.ps xtest/
irb(main):137:2> super(number_of_lines)
irb(main):138:2> end
irb(main):139:1> end
|