diff options
author | Florian Frank <flori@ping.de> | 2012-05-12 00:00:04 +0200 |
---|---|---|
committer | Florian Frank <flori@ping.de> | 2012-05-12 00:00:04 +0200 |
commit | fde9036047e6d3e0771507a111f07793a7a26761 (patch) | |
tree | 96bd15c2378227fa1c0e8a948ce2d0d49623c5cb /lib/json | |
parent | 998d5cdeabea8bfbbf9c941e1c304fcb4454d726 (diff) | |
download | json-workaround-rbx-encoding-issues.tar.gz |
Implement work around for rbx encoding problemworkaround-rbx-encoding-issues
Diffstat (limited to 'lib/json')
-rw-r--r-- | lib/json/common.rb | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/json/common.rb b/lib/json/common.rb index 05eaf26..3349501 100644 --- a/lib/json/common.rb +++ b/lib/json/common.rb @@ -405,7 +405,10 @@ module JSON end # Shortuct for iconv. - if ::String.method_defined?(:encode) + if ::String.method_defined?(:encode) && + # XXX Rubinius doesn't support ruby 1.9 encoding yet + defined?(RUBY_ENGINE) && RUBY_ENGINE != 'rbx' + then # Encodes string using Ruby's _String.encode_ def self.iconv(to, from, string) string.encode(to, from) |