diff options
| author | Yukihiro "Matz" Matsumoto <[email protected]> | 2014-06-04 09:08:22 +0900 |
|---|---|---|
| committer | Yukihiro "Matz" Matsumoto <[email protected]> | 2014-06-04 09:08:22 +0900 |
| commit | c3ed6e3d25ff3b6c4980ae8f2c4d0665a1d95d69 (patch) | |
| tree | 1a7cc356383628cdd61ebf2fe71bb32765233c66 | |
| parent | 9fe8653e8634db169529657109a4b69ac38862d7 (diff) | |
| download | mruby-c3ed6e3d25ff3b6c4980ae8f2c4d0665a1d95d69.tar.gz mruby-c3ed6e3d25ff3b6c4980ae8f2c4d0665a1d95d69.zip | |
use is_a? Array for String#% argument check as the original PR did in #2349
| -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 f8bd3b02e..d7e55536a 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? Hash - sprintf(self, args) - else + if args.is_a? Array sprintf(self, *args) + else + sprintf(self, args) end end end |
