Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: jruby/jruby
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 1c585ad648ad
Choose a base ref
...
head repository: jruby/jruby
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 45e1193c62cc
Choose a head ref
  • 2 commits
  • 1 file changed
  • 1 contributor

Commits on Jul 7, 2016

  1. Copy the full SHA
    779e7ee View commit details
  2. Copy the full SHA
    45e1193 View commit details
Showing with 4 additions and 8 deletions.
  1. +4 −8 truffle/src/main/ruby/core/type.rb
12 changes: 4 additions & 8 deletions truffle/src/main/ruby/core/type.rb
Original file line number Diff line number Diff line change
@@ -423,15 +423,11 @@ def self.compatible_encoding(a, b)
def self.inspect(val)
str = Rubinius::Type.coerce_to(val.inspect, String, :to_s)
result_encoding = Encoding.default_internal || Encoding.default_external
if !str.ascii_only? && (!result_encoding.ascii_compatible? || str.encoding != result_encoding)
return string_escape(str)
if str.ascii_only? || (result_encoding.ascii_compatible? && str.encoding == result_encoding)
str
else
Truffle.invoke_primitive :string_escape, str
end
return str
end

def self.string_escape(string)
Truffle.primitive :string_escape
raise PrimitiveFailure, "String.string_escape primitive failed"
end

def self.object_respond_to__dump?(obj)