diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2015-10-23 22:29:14 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2015-10-23 22:29:14 +0000 |
commit | 4e1ee809bbf78dc7edb3350628bf80c3e0133fee () | |
tree | df5b96c7c9c458320915f08540af8341f4442953 | |
parent | 92d5da521dc68fc166009ce5796748993375c5f5 (diff) |
forwardable.rb: full qualify names
* lib/forwardable.rb (def_instance_delegator, def_single_delegator): match backtraces against ::Forwardable in case the target class is a subclass of BasicObject and does not include Kernel. [ruby-core:71176] [Bug #11616] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52259 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r-- | ChangeLog | 7 | ||||
-rw-r--r-- | lib/forwardable.rb | 4 | ||||
-rw-r--r-- | test/test_forwardable.rb | 13 |
3 files changed, 22 insertions, 2 deletions
@@ -1,3 +1,10 @@ Sat Oct 24 04:10:13 2015 Koichi Sasada <[email protected]> * iseq.c (make_compile_option_value): include frozen_string_literal* @@ -182,7 +182,7 @@ module Forwardable begin #{accessor}.__send__(:#{method}, *args, &block) rescue ::Exception - [email protected]_if{|s| Forwardable::FILE_REGEXP =~ s} unless Forwardable::debug ::Kernel::raise end end @@ -274,7 +274,7 @@ module SingleForwardable begin #{accessor}.__send__(:#{method}, *args, &block) rescue ::Exception - [email protected]_if{|s| Forwardable::FILE_REGEXP =~ s} unless Forwardable::debug ::Kernel::raise end end @@ -110,6 +110,19 @@ class TestForwardable < Test::Unit::TestCase assert_not_match(/\/forwardable\.rb/, e.backtrace[0]) end private def forwardable_class(&block) |