summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--mrbgems/mruby-symbol-ext/mrblib/symbol.rb4
1 files changed, 3 insertions, 1 deletions
diff --git a/mrbgems/mruby-symbol-ext/mrblib/symbol.rb b/mrbgems/mruby-symbol-ext/mrblib/symbol.rb
index 1e249c281..acb2a562c 100644
--- a/mrbgems/mruby-symbol-ext/mrblib/symbol.rb
+++ b/mrbgems/mruby-symbol-ext/mrblib/symbol.rb
@@ -45,7 +45,9 @@ class Symbol
def casecmp(other)
return nil unless other.kind_of?(Symbol)
- self.to_s.upcase <=> other.to_s.upcase
+ lhs = self.to_s; lhs.upcase!
+ rhs = other.to_s; rhs.upcase!
+ lhs <=> rhs
end
#