JRuby

String#crypt needs to be made encoding-aware

Details

  • Number of attachments :
    0

Description

String#crypt needs to be updated for Ruby 1.9 encoding support. Look for tests in test/externals/ruby1.9/ruby/test_string.rb.

Activity

Hide
Thomas E Enebo added a comment -

Not making 1.4...

Show
Thomas E Enebo added a comment - Not making 1.4...
Hide
Martin Harriman added a comment -

MRI String#crypt does not set an encoding on its result, nor should the str_new function (in MRI-land), since crypt should never return a zero-length string. Is this a non-issue?

Show
Martin Harriman added a comment - MRI String#crypt does not set an encoding on its result, nor should the str_new function (in MRI-land), since crypt should never return a zero-length string. Is this a non-issue?
Hide
Charles Oliver Nutter added a comment -

Old bug, and as reported in comments String#crypt does not set an encoding:

ruby1.9.2 -e "p 'foo'.force_encoding('UTF-8').crypt('asdf').encoding"
#<Encoding:ASCII-8BIT>
Show
Charles Oliver Nutter added a comment - Old bug, and as reported in comments String#crypt does not set an encoding:
ruby1.9.2 -e "p 'foo'.force_encoding('UTF-8').crypt('asdf').encoding"
#<Encoding:ASCII-8BIT>

People

Vote (0)
Watch (0)

Dates

  • Created:
    Updated:
    Resolved: