Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Implement work around for rbx encoding problem

  • Loading branch information...
commit fde9036047e6d3e0771507a111f07793a7a26761 1 parent 998d5cd
Florian Frank authored
Showing with 4 additions and 1 deletion.
  1. +4 −1 lib/json/common.rb
5 lib/json/common.rb
View
@@ -405,7 +405,10 @@ def self.swap!(string) # :nodoc:
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)
Please sign in to comment.
Something went wrong with that request. Please try again.