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

unpack encoding inconsistent with MRI #5771

Closed
ankane opened this issue Jun 26, 2019 · 3 comments
Closed

unpack encoding inconsistent with MRI #5771

ankane opened this issue Jun 26, 2019 · 3 comments

Comments

@ankane
Copy link

@ankane ankane commented Jun 26, 2019

Environment

jruby 9.2.7.0 (2.5.3) 2019-04-09 8a269e3 Java HotSpot(TM) 64-Bit Server VM 25.192-b12 on 1.8.0_192-b12 +jit [darwin-x86_64]

Expected Behavior

p "str".unpack("H*")[0].encoding

returns Encoding:US-ASCII.

Actual Behavior

It returns Encoding:ASCII-8BIT.

Edit: Narrowed down the issue to unpack instead of securerandom.

@ankane ankane changed the title SecureRandom.hex encoding inconsistent with MRI unpack encoding inconsistent with MRI Jun 26, 2019
@headius
Copy link
Member

@headius headius commented Jun 26, 2019

Nice...reproduced here.

Loading

@enebo enebo added this to the JRuby 9.2.8.0 milestone Jun 26, 2019
@enebo
Copy link
Member

@enebo enebo commented Jun 26, 2019

Too lazy to fix commit message '[master 69f6dab] Fix 5771. unpack encoding inconsistent with MRI'

Loading

@enebo enebo closed this Jun 26, 2019
@ankane
Copy link
Author

@ankane ankane commented Jun 26, 2019

That was fast, thank you both.

Loading

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