Skip to content

Commit

Permalink
Remove redundant use of Object#to_s in interpolation.
Browse files Browse the repository at this point in the history
  • Loading branch information
matz committed Jun 28, 2017
1 parent aee1476 commit 466a18b
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions mrbgems/mruby-bin-debugger/bintest/print.rb
Original file line number Diff line number Diff line change
Expand Up @@ -341,8 +341,8 @@ def m
tc << {:cmd=>"p +0100", :exp=>'$3 = 64'}
tc << {:cmd=>"p 0x100", :exp=>'$4 = 256'}
tc << {:cmd=>"p 1_234", :exp=>'$5 = 1234'}
tc << {:cmd=>"p 0b1000_0000", :exp=>"$6 = #{0b1000_0000.to_s}"}
tc << {:cmd=>"p 0x1000_0000", :exp=>"$7 = #{0x1000_0000.to_s}"}
tc << {:cmd=>"p 0b1000_0000", :exp=>"$6 = #{0b1000_0000}"}
tc << {:cmd=>"p 0x1000_0000", :exp=>"$7 = #{0x1000_0000}"}

tc << {:cmd=>"p 3.14", :exp=>'$8 = 3.14'}
tc << {:cmd=>"p -12.3", :exp=>'$9 = -12.3'}
Expand Down
2 changes: 1 addition & 1 deletion tasks/toolchains/android.rake
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,7 @@ Set ANDROID_PLATFORM environment variable or set :platform parameter
case toolchain
when :gcc
when :clang
flags += %W(-gcc-toolchain "#{gcc_toolchain_path.to_s}" -Wno-invalid-command-line-argument -Wno-unused-command-line-argument)
flags += %W(-gcc-toolchain "#{gcc_toolchain_path}" -Wno-invalid-command-line-argument -Wno-unused-command-line-argument)
end
flags += %W(-fpic -ffunction-sections -funwind-tables -fstack-protector-strong -no-canonical-prefixes)

Expand Down
4 changes: 2 additions & 2 deletions test/t/kernel.rb
Original file line number Diff line number Diff line change
Expand Up @@ -387,7 +387,7 @@ def inspect
begin
c.no_method_named_this
rescue NoMethodError => e
assert_equal "undefined method 'no_method_named_this' for #{c.to_s}", e.message
assert_equal "undefined method 'no_method_named_this' for #{c}", e.message
end

class NoInspectClass
Expand All @@ -397,7 +397,7 @@ class NoInspectClass
begin
d.no_method_named_this
rescue NoMethodError => e
assert_equal "undefined method 'no_method_named_this' for #{d.to_s}", e.message
assert_equal "undefined method 'no_method_named_this' for #{d}", e.message
end
end

Expand Down

0 comments on commit 466a18b

Please sign in to comment.