Skip to content

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

Description

@Shamaoke

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]

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions