New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

wrong current line #584

Closed
rweng opened this Issue Mar 13, 2013 · 3 comments

Comments

Projects
None yet
5 participants
@rweng

rweng commented Mar 13, 2013

I am sure this is a minor bug: It seems as if jruby get's the currently executed line wrong. Take this example file:

puts "hello"
require 'pry'
binding.pry

Now with the pry gem installed in both jruby and mri:

$ ruby --version
jruby 1.7.3 (1.9.3p385) 2013-02-21 dac429b on Java HotSpot(TM) 64-Bit Server VM 1.7.0_10-ea-b14 [darwin-x86_64]

$ ruby hello.rb
hello

From: /Users/robin/hello.rb @ line 1 :

 => 1: puts "hello"
    2: require 'pry'
    3: binding.pry

[1] pry(main)> exit

~
$ rbenv use 1.9.3

~
$ ruby --version
ruby 1.9.3p392 (2013-02-22 revision 39386) [x86_64-darwin12.2.1]

~
$ ruby hello.rb
hello

From: /Users/robin/hello.rb @ line 3 :

    1: puts "hello"
    2: require 'pry'
 => 3: binding.pry

[1] pry(main)>

You see how in jruby pry thinks it's still in the first line, though it must be in the third line or the repl wouldn't have kicked in?

@BanzaiMan

This comment has been minimized.

Show comment
Hide comment
@BanzaiMan

BanzaiMan Sep 3, 2013

Member

I'm unfamiliar with how pry works. Have you asked them what might be causing this? It would help us if we can reduce the problem a little further with their help.

Member

BanzaiMan commented Sep 3, 2013

I'm unfamiliar with how pry works. Have you asked them what might be causing this? It would help us if we can reduce the problem a little further with their help.

@MSNexploder

This comment has been minimized.

Show comment
Hide comment
@MSNexploder

MSNexploder Jul 15, 2014

Contributor

This works by running jruby in debug mode (e.g. export JRUBY_OPTS=--debug) and is fixed in master altogether.

(see also: pry/pry#1008)

Contributor

MSNexploder commented Jul 15, 2014

This works by running jruby in debug mode (e.g. export JRUBY_OPTS=--debug) and is fixed in master altogether.

(see also: pry/pry#1008)

@mkristian mkristian added this to the JRuby 9000 milestone Jul 15, 2014

@enebo enebo modified the milestone: JRuby 9.0.0.0 Jul 14, 2015

@enebo enebo added this to the JRuby 1.7.25 milestone Apr 1, 2016

@enebo

This comment has been minimized.

Show comment
Hide comment
@enebo

enebo Apr 1, 2016

Member

I just tried the example snippet on 1.7 and 9k branch and both show the proper line. Closing. Not sure when it was fixed and not worth the time to isolate when for posterity.

Member

enebo commented Apr 1, 2016

I just tried the example snippet on 1.7 and 9k branch and both show the proper line. Closing. Not sure when it was fixed and not worth the time to isolate when for posterity.

@enebo enebo closed this Apr 1, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment