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

Command line flag '-p' doesn't reflect changes made to $_ #3628

Closed
pobocks opened this Issue Jan 29, 2016 · 1 comment

Comments

Projects
None yet
2 participants
@pobocks

pobocks commented Jan 29, 2016

It appears that the -p doesn't work correctly in jRuby; it loops correctly, but even if $_ is altered, it prints whatever was passed in as input.

Example repro:

jruby -pe "$_.gsub!(/./, 'TEST')"

Type into this: CTRL-D to exit.

Tested on several 9.x.x.x series jRubies, latest jRuby-9.0.4.0

@headius headius closed this in b7dc414 Mar 4, 2016

@headius headius added this to the JRuby 9.1.0.0 milestone Mar 4, 2016

@headius headius added the core label Mar 4, 2016

@pobocks

This comment has been minimized.

Show comment
Hide comment
@pobocks

pobocks Mar 4, 2016

Thank you!

pobocks commented Mar 4, 2016

Thank you!

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