diff options
Diffstat (limited to 'lib/method_source')
-rw-r--r-- | lib/method_source/source_location.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/method_source/source_location.rb b/lib/method_source/source_location.rb index 6cd5e94..faa96c7 100644 --- a/lib/method_source/source_location.rb +++ b/lib/method_source/source_location.rb @@ -9,7 +9,7 @@ module MethodSource module SourceLocation module MethodExtensions - if Proc.new {}.respond_to? :__file__ + if Proc.method_defined? :__file__ include ReeSourceLocation elsif defined?(RUBY_ENGINE) && RUBY_ENGINE =~ /jruby/ @@ -52,7 +52,7 @@ module MethodSource end module ProcExtensions - if Proc.new {}.respond_to? :__file__ + if Proc.method_defined? :__file__ include ReeSourceLocation elsif defined?(RUBY_ENGINE) && RUBY_ENGINE =~ /rbx/ @@ -79,7 +79,7 @@ module MethodSource end module UnboundMethodExtensions - if Proc.new {}.respond_to? :__file__ + if Proc.method_defined? :__file__ include ReeSourceLocation elsif defined?(RUBY_ENGINE) && RUBY_ENGINE =~ /jruby/ |