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

String#% fails with Hash parameter #4523

Closed
brometeo opened this issue Mar 7, 2017 · 0 comments
Closed

String#% fails with Hash parameter #4523

brometeo opened this issue Mar 7, 2017 · 0 comments
Labels
Milestone

Comments

@brometeo
Copy link

@brometeo brometeo commented Mar 7, 2017

Environment

JRuby version: 9.1.8.0 (2.3.1)
Platform: Linux 4.2.0-1-amd64 #1 SMP Debian 4.2.6-3 (2015-12-06) x86_64 GNU/Linux

Expected Behavior

When I try this code line:
'%<foo>.2f %<bar>.2f' % {foo: 10, bar: 5}

I expect this output:
"10.00 5.00

Actual Behavior

What I get is an exception with this error:
ArgumentError: name<bar> after <foo>

--
David

@enebo enebo added this to the JRuby 9.2.0.0 milestone Mar 7, 2017
@enebo enebo added the core label Mar 7, 2017
@enebo enebo closed this in 4ba5e5e Mar 7, 2017
enebo added a commit that referenced this issue Mar 7, 2017
This fixed JRuby #4523.
@enebo enebo modified the milestones: JRuby 9.2.0.0, JRuby 9.1.9.0 Mar 10, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.