diff --git a/lib/method_source/source_location.rb b/lib/method_source/source_location.rb index 7629869..3d3686e 100644 --- a/lib/method_source/source_location.rb +++ b/lib/method_source/source_location.rb @@ -13,16 +13,9 @@ module MethodExtensions include ReeSourceLocation elsif defined?(RUBY_ENGINE) && RUBY_ENGINE =~ /jruby/ - require 'java' - - # JRuby version source_location hack - # @return [Array] A two element array containing the source location of the method - def source_location - to_java.source_location(Thread.current.to_java.getContext()) - end + # noop - source_location provided natively else - def trace_func(event, file, line, id, binding, classname) return unless event == 'call' set_trace_func nil @@ -83,17 +76,9 @@ module UnboundMethodExtensions include ReeSourceLocation elsif defined?(RUBY_ENGINE) && RUBY_ENGINE =~ /jruby/ - require 'java' - - # JRuby version source_location hack - # @return [Array] A two element array containing the source location of the method - def source_location - to_java.source_location(Thread.current.to_java.getContext()) - end - + # noop - source_location provided natively else - # Return the source location of an instance method for Ruby 1.8. # @return [Array] A two element array. First element is the # file, second element is the line in the file where the