diff options
| author | take_cheeze <[email protected]> | 2014-06-20 21:49:41 +0900 |
|---|---|---|
| committer | Yukihiro "Matz" Matsumoto <[email protected]> | 2014-06-23 19:51:27 +0900 |
| commit | 0a6b54acd63f0f396eda6e1e5e2366ce91a35d79 (patch) | |
| tree | e00e2e7851905e2984fee2b24c75722e137cdc3f /mrbgems/mruby-symbol-ext/test/symbol.rb | |
| parent | c938b2f65647aae87a7bcfeb3a9462b90aaa0ce4 (diff) | |
| download | mruby-0a6b54acd63f0f396eda6e1e5e2366ce91a35d79.tar.gz mruby-0a6b54acd63f0f396eda6e1e5e2366ce91a35d79.zip | |
Reduce new string creation in `capitalize`, `downcase`, `upcase` method of `Symbol` class extension.
Add test to check unmodified result is working.
Diffstat (limited to 'mrbgems/mruby-symbol-ext/test/symbol.rb')
| -rw-r--r-- | mrbgems/mruby-symbol-ext/test/symbol.rb | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/mrbgems/mruby-symbol-ext/test/symbol.rb b/mrbgems/mruby-symbol-ext/test/symbol.rb index 59df7ea9d..c2695f1f8 100644 --- a/mrbgems/mruby-symbol-ext/test/symbol.rb +++ b/mrbgems/mruby-symbol-ext/test/symbol.rb @@ -19,14 +19,17 @@ end assert("Symbol#capitalize") do assert_equal :Hello, :hello.capitalize assert_equal :Hello, :HELLO.capitalize + assert_equal :Hello, :Hello.capitalize end assert("Symbol#downcase") do assert_equal :hello, :hEllO.downcase + assert_equal :hello, :hello.downcase end assert("Symbol#upcase") do assert_equal :HELLO, :hEllO.upcase + assert_equal :HELLO, :HELLO.upcase end assert("Symbol#casecmp") do |
