Msan M. wrote in post #1046179:
On 12 February 2012 16:35, Hirotsugu A. [email protected] wrote:
I believe ruby-debug works for JRuby, regardless of the language mode.
I’m trying ruby-debug but in debug mode when I do, for example:
(rdb:2) break 10
I run into this error:
INTERNAL ERROR!!! undefined method `entries’ for #String:0x531afc6a
/home/mauro/jruby-1.6.6/lib/ruby/gems/1.8/gems/ruby-debug-base-0.10.4-java/lib/linecache-ruby.rb:8:in
`lnums_for_str’
/home/mauro/jruby-1.6.6/lib/ruby/gems/1.8/gems/ruby-debug-base-0.10.4-java/lib/tracelines.rb:25:in
`lnums_for_str_array’
/home/mauro/jruby-1.6.6/lib/ruby/gems/1.8/gems/ruby-debug-base-0.10.4-java/lib/linecache.rb:282:in
`trace_line_numbers’
/home/mauro/jruby-1.6.6/lib/ruby/gems/1.8/gems/ruby-debug-0.10.4/cli/ruby-debug/commands/breakpoints.rb:71:in
`execute’
/home/mauro/jruby-1.6.6/lib/ruby/gems/1.8/gems/ruby-debug-0.10.4/cli/ruby-debug/processor.rb:226:in
`one_cmd’
/home/mauro/jruby-1.6.6/lib/ruby/gems/1.8/gems/ruby-debug-0.10.4/cli/ruby-debug/processor.rb:319:in
process_commands' org/jruby/RubyArray.java:1614:in
each’
/home/mauro/jruby-1.6.6/lib/ruby/gems/1.8/gems/ruby-debug-0.10.4/cli/ruby-debug/processor.rb:318:in
process_commands' org/jruby/RubyKernel.java:1195:in
catch’
/home/mauro/jruby-1.6.6/lib/ruby/gems/1.8/gems/ruby-debug-0.10.4/cli/ruby-debug/processor.rb:311:in
`process_commands’
[SNIP]
So is it a jruby bug?
I had the same issue, appears to be a bug in ruby-debug-base-0.10.4. I
thought maybe 0.10.5.rc1 with its new linecache dependency might fix it
but not, the issue remains. I’ve attached a patch that fixes the issue
on ruby-debug-base-0.10.4. The same patch can be applied to
linecache-0.46-java/lib/linecache/trace_nums.rb as well, it is a simple
two word change.