diff options
| author | Akira Yumiyama <[email protected]> | 2013-06-25 20:16:41 +0900 |
|---|---|---|
| committer | Akira Yumiyama <[email protected]> | 2013-06-28 10:01:07 +0900 |
| commit | 36fc42e7dbb8511efe316647dbbbdc822a929425 (patch) | |
| tree | ee506121c706d7c24d9f0c3b4be3c26689c30ed4 /mrbgems/mruby-object-ext/test | |
| parent | ec9fdd5c4ca8cfc31b96048124c1925d2e20698e (diff) | |
| download | mruby-36fc42e7dbb8511efe316647dbbbdc822a929425.tar.gz mruby-36fc42e7dbb8511efe316647dbbbdc822a929425.zip | |
add nil.to_a, nil.to_f, nil.to_i methods
Diffstat (limited to 'mrbgems/mruby-object-ext/test')
| -rw-r--r-- | mrbgems/mruby-object-ext/test/nil.rb | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/mrbgems/mruby-object-ext/test/nil.rb b/mrbgems/mruby-object-ext/test/nil.rb new file mode 100644 index 000000000..e385dec6a --- /dev/null +++ b/mrbgems/mruby-object-ext/test/nil.rb @@ -0,0 +1,11 @@ +assert('NilClass#to_a') do + assert_equal nil.to_a, [] +end + +assert('NilClass#to_f') do + assert_equal nil.to_f, 0.0 +end + +assert('NilClass#to_i') do + assert_equal nil.to_i, 0 +end |
