origin
origin copied to clipboard
Add __FILE__, __LINE__ to the class-, module_eval calls
Please, add the __FILE__ and __LINE__ constants as the 2nd and 3rd arguments to the class- and module_eval calls in Origin::Forwardable#__forward__ to impove the debugging process.
require 'mongoid'
class Person
include Mongoid::Document
end
# without __FILE__, __LINE__
Person.method(:where).source_location #=> ["(eval)", 1]
# with __FILE__, __LINE__
Person.method(:where).source_location
#=> ["/home/user/<...>/origin-2.1.1/lib/origin/forwardable.rb", 47]
@Shamaoke fell free to send a PR with those changes.. thanks