Skip to content
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

method_source: fix broken Procs on JRuby 9.2.0.0 #51

Merged
merged 1 commit into from
Nov 2, 2018

Conversation

kyrylo
Copy link
Collaborator

@kyrylo kyrylo commented Nov 1, 2018

Fixes pry/pry#1804
(JRuby 9.2.0.0 breaks source_location and therefore our test suite)

JRuby 9.2.0.0 fails to fetch source code for procs because of the bug:
jruby/jruby#5262

The problem is that source_location is reported at the end of the proc, instead
of the beginning.

The way I fix it is rather dumb (rewinding back and checking if it's complete
expression) but it's isolated only to 9.2.0.0 and likely won't be needed when
another JRuby is released. However, so far it's the latest release.

@kyrylo
Copy link
Collaborator Author

kyrylo commented Nov 1, 2018

This works but not with Pry because it calls different methods. I'll investigate.

@kyrylo kyrylo force-pushed the jruby-9200-fix branch 2 times, most recently from 53a4442 to 3463d44 Compare November 1, 2018 18:51
@kyrylo
Copy link
Collaborator Author

kyrylo commented Nov 1, 2018

Okay, I fixed it both here and for Pry.

PTAL

Fixes pry/pry#1804
(JRuby 9.2.0.0 breaks `source_location` and therefore our test suite)

JRuby 9.2.0.0 fails to fetch source code for procs because of the bug:
jruby/jruby#5262

The problem is that source_location is reported at the end of the proc, instead
of the beginning.

The way I fix it is rather dumb (rewinding back and checking if it's complete
expression) but it's isolated only to 9.2.0.0 and likely won't be needed when
another JRuby is released. However, so far it's the latest release.
@banister banister merged commit 64fff22 into banister:master Nov 2, 2018
@kyrylo kyrylo deleted the jruby-9200-fix branch November 2, 2018 15:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

JRuby 9.2.0.0 breaks source_location and therefore our test suite
2 participants