Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add __FILE__, __LINE__ to the class-, module_eval calls #105

Open
Shamaoke opened this issue Jan 28, 2015 · 1 comment
Open

Add __FILE__, __LINE__ to the class-, module_eval calls #105

Shamaoke opened this issue Jan 28, 2015 · 1 comment

Comments

@Shamaoke
Copy link

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]
@arthurnn
Copy link
Contributor

@Shamaoke fell free to send a PR with those changes.. thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants