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

Comments

@ankane
Copy link

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

This comment has been minimized.

Copy link
Member

commented Jun 26, 2019

Nice...reproduced here.

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

@enebo

This comment has been minimized.

Copy link
Member

commented Jun 26, 2019

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

@enebo enebo closed this Jun 26, 2019

@ankane

This comment has been minimized.

Copy link
Author

commented Jun 26, 2019

That was fast, thank you both.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.