diff options
| author | Yukihiro "Matz" Matsumoto <[email protected]> | 2014-06-03 16:33:30 +0900 |
|---|---|---|
| committer | Yukihiro "Matz" Matsumoto <[email protected]> | 2014-06-03 16:33:30 +0900 |
| commit | 4380f861503fc441a00aee9d16b5b074f3cbc158 (patch) | |
| tree | f0b4b918a94c61ac4cdf3e73099d96b70acdb4e4 /mrbgems | |
| parent | fe9f3fdd200659e88ef72aab5198e552d138ea27 (diff) | |
| download | mruby-4380f861503fc441a00aee9d16b5b074f3cbc158.tar.gz mruby-4380f861503fc441a00aee9d16b5b074f3cbc158.zip | |
Special treatment for Hashes, not Arrays; ref #2349
Diffstat (limited to 'mrbgems')
| -rw-r--r-- | mrbgems/mruby-sprintf/mrblib/string.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/mrbgems/mruby-sprintf/mrblib/string.rb b/mrbgems/mruby-sprintf/mrblib/string.rb index d7e55536a..f8bd3b02e 100644 --- a/mrbgems/mruby-sprintf/mrblib/string.rb +++ b/mrbgems/mruby-sprintf/mrblib/string.rb @@ -1,9 +1,9 @@ class String def %(args) - if args.is_a? Array - sprintf(self, *args) - else + if args.is_a? Hash sprintf(self, args) + else + sprintf(self, *args) end end end |
