diff options
| author | KOBAYASHI Shuji <[email protected]> | 2019-07-21 22:59:41 +0900 |
|---|---|---|
| committer | KOBAYASHI Shuji <[email protected]> | 2019-07-21 22:59:41 +0900 |
| commit | c980fe279266448cf5ac8faa646d57d0f8561b10 (patch) | |
| tree | 262fbfcf1686d0a80204664a8e5e93d4a7164b36 /mrbgems/mruby-string-ext/test | |
| parent | cf4cddf7a1e67109ca36f058719fa62c48b6b315 (diff) | |
| download | mruby-c980fe279266448cf5ac8faa646d57d0f8561b10.tar.gz mruby-c980fe279266448cf5ac8faa646d57d0f8561b10.zip | |
Integrate `Integral#chr` (`Fixnum#chr`) to `mruby-string-ext`
Because they're defined in both `mruby-string-ext` and `mruby-numeric-ext`
(they seem more natural to define in N, but `mruby-string-ext` depends on
`Integral#chr`).
Diffstat (limited to 'mrbgems/mruby-string-ext/test')
| -rw-r--r-- | mrbgems/mruby-string-ext/test/fixnum.rb | 3 | ||||
| -rw-r--r-- | mrbgems/mruby-string-ext/test/numeric.rb | 5 |
2 files changed, 5 insertions, 3 deletions
diff --git a/mrbgems/mruby-string-ext/test/fixnum.rb b/mrbgems/mruby-string-ext/test/fixnum.rb deleted file mode 100644 index 9036b1a06..000000000 --- a/mrbgems/mruby-string-ext/test/fixnum.rb +++ /dev/null @@ -1,3 +0,0 @@ -assert('Fixnum#chr') do - assert_equal "a", 97.chr -end diff --git a/mrbgems/mruby-string-ext/test/numeric.rb b/mrbgems/mruby-string-ext/test/numeric.rb new file mode 100644 index 000000000..cae562fc1 --- /dev/null +++ b/mrbgems/mruby-string-ext/test/numeric.rb @@ -0,0 +1,5 @@ +assert('Integer#chr') do + assert_equal("A", 65.chr) + assert_equal("B", 0x42.chr) + assert_raise(RangeError) { -1.chr } +end |
