summaryrefslogtreecommitdiffhomepage
path: root/test
diff options
context:
space:
mode:
authorYukihiro "Matz" Matsumoto <[email protected]>2018-09-20 12:06:53 +0900
committerYukihiro "Matz" Matsumoto <[email protected]>2018-09-20 13:47:29 +0900
commit3a9caad8ebe63dfe2b8583c72fc5e275f13e25c3 (patch)
treea5513bc961165f86c3f7a29ad4fc7b76474ee5b4 /test
parent19d3bb2d90f9806ea6cdef97a139de9f2050363a (diff)
downloadmruby-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.rb4
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