Project

General

Profile

Actions

Bug #7175

closed

unpack('M*') changed behavior between patchlevels

Bug #7175: unpack('M*') changed behavior between patchlevels

Added by briantobin (Brian Tobin) over 13 years ago. Updated over 13 years ago.

Status:
Third Party's Issue
Assignee:
-
Target version:
-
ruby -v:
ruby 1.9.3p194 (2012-04-20 revision 35410) [x86_64-darwin11.3.0]
Backport:
[ruby-core:48034]

Description

I'm seeing an important difference in the output of string.unpack between two patchlevels of ruby 1.9.3. The output of patchlevel 194 is expected, and the output of 286 is unexpected.

--- Console 1 ---

RUBY_VERSION
=> "1.9.3"
RUBY_PATCHLEVEL
=> 194
"foo =3D =".unpack("M*")
=> ["foo = "]

--- Console 2 ---

RUBY_VERSION
=> "1.9.3"
RUBY_PATCHLEVEL
=> 286
"foo =3D =".unpack("M*")
=> ["foo = ="]

Was this a purposeful change? Our code is processing emails with the "quoted printable" encoding. After upgrading to patchlevel 286 we are getting trailing equals signs after decoding. I feel like this is a regression.

Thanks in advance!

Brian

Actions

Also available in: PDF Atom