0

When I try to set a breakpoint from the command-line ruby debugger "ruby-debug," I get the following error:

(rdb:1) break 11
INTERNAL ERROR!!! undefined method `entries' for #<String:0x2f3cf887>

I'm using JRuby version 1.7.3. I'm using ruby-debug version 0.10.4.

Mashmagar
  • 2,556
  • 2
  • 29
  • 38

1 Answers1

1

According to this forum, it's a known bug in ruby-debug: http://www.ruby-forum.com/topic/3636709

A patch is also mentioned on that forum. I'll repeat it for completeness.

Change line 8 of $GEM_HOME/gems/ruby-debug-base-0.10.4-java/lib/linecache-ruby.rb from

(1..code.entries.size).to_a

to

(1..code.lines.count).to_a

That fixed it for me.

Mashmagar
  • 2,556
  • 2
  • 29
  • 38