diff --git a/src/main/ruby/truffleruby/core/range.rb b/src/main/ruby/truffleruby/core/range.rb index 1fbd6b0db5ea..dd7c4bb43b4a 100644 --- a/src/main/ruby/truffleruby/core/range.rb +++ b/src/main/ruby/truffleruby/core/range.rb @@ -375,12 +375,10 @@ def ===(value) def inspect sep = exclude_end? ? '...' : '..' if (Primitive.nil?(self.begin) && Primitive.nil?(self.end)) - result = "nil#{sep}nil" + "nil#{sep}nil" else - result = (Primitive.nil?(self.begin) ? '' : self.begin.inspect) + sep + - (Primitive.nil?(self.end) ? '' : self.end.inspect) + (Primitive.nil?(self.begin) ? '' : self.begin.inspect) + sep + (Primitive.nil?(self.end) ? '' : self.end.inspect) end - Primitive.infect(result, self) end def last(n=undefined)