diff options
| author | Yukihiro "Matz" Matsumoto <[email protected]> | 2018-09-20 12:06:53 +0900 |
|---|---|---|
| committer | Yukihiro "Matz" Matsumoto <[email protected]> | 2018-09-20 13:47:29 +0900 |
| commit | 3a9caad8ebe63dfe2b8583c72fc5e275f13e25c3 (patch) | |
| tree | a5513bc961165f86c3f7a29ad4fc7b76474ee5b4 /test | |
| parent | 19d3bb2d90f9806ea6cdef97a139de9f2050363a (diff) | |
| download | mruby-3a9caad8ebe63dfe2b8583c72fc5e275f13e25c3.tar.gz mruby-3a9caad8ebe63dfe2b8583c72fc5e275f13e25c3.zip | |
Move `Symbol#to_proc` to the core from `mruby-symbol-ext` gem.
Even though `Symbol#to_proc` is not included in ISO standard, the
`some_method(&:method_name)` is used very widely and convenient.
So we moved it to the core.
Diffstat (limited to 'test')
| -rw-r--r-- | test/t/symbol.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/test/t/symbol.rb b/test/t/symbol.rb index 9059f45c2..fdce0f378 100644 --- a/test/t/symbol.rb +++ b/test/t/symbol.rb @@ -28,3 +28,7 @@ end assert('Symbol#to_sym', '15.2.11.3.4') do assert_equal :abc, :abc.to_sym end + +assert('Symbol#to_proc') do + assert_equal 5, :abs.to_proc[-5] +end |
