From 3a9caad8ebe63dfe2b8583c72fc5e275f13e25c3 Mon Sep 17 00:00:00 2001 From: "Yukihiro \"Matz\" Matsumoto" Date: Thu, 20 Sep 2018 12:06:53 +0900 Subject: 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. --- test/t/symbol.rb | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'test') 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 -- cgit v1.2.3