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 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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants