Project

General

Profile

« Previous | Next » 

Revision 299d17a2

Added by st0012 (Stan Lo) about 2 years ago

[ruby/irb] Fix Locale's encoding lookup for Japanese encodings
(https://github.com/ruby/irb/pull/568)

In https://github.com/ruby/irb/commit/3ee79e89adb8e21b63d796e53bcc86281685076d,
encoding_aliases.rb was introduced to return the correct encoding object for
ujis and euc encodings.

However, the return value of @@legacy_encoding_alias_map[@encoding_name]
is always overridden by a second look up with Encoding.find(@encoding_name).
So the logic didn't work as expected.

This commit fixes the problem.