lib/source_position.rb in source_position-0.0.3 vs lib/source_position.rb in source_position-0.1.0
- old
+ new
@@ -1,6 +1,13 @@
+if RUBY_VERSION < '1.9'
+ unless defined?(RUBY_ENGINE) && RUBY_ENGINE =~ /rbx/
+ require 'ruby18_source_location'
+ end
+end
+
require "source_position/version"
+require "source_position/rbx_source_location"
module SourcePosition
def source_position
self.source_location.join(':') if self.source_location
end
@@ -13,7 +20,8 @@
class UnboundMethod
include SourcePosition
end
class Proc
+ include SourcePosition::RbxSourceLocation
include SourcePosition
end