asynchronize icon indicating copy to clipboard operation
asynchronize copied to clipboard

pry needs at least one un-asynchronized method in order to find source information

Open iCodeSometime opened this issue 7 years ago • 0 comments

Description

Pry needs. a valid source_location on a method in order to find source location for the class. The way we're currently redefining the methods removes that. A possible solution suggested by the pry maintainer is to use eval; we should look into that.

Reproduction Steps

require 'asynchronize'
class Test
  include Asynchronize
  asynchronize :test
  def test
  end
end

$ Test
Error: Couldn't locate a definition for Test

Workaround

If you need source information in pry, make sure you have at least one method that's not asynchronized.

iCodeSometime avatar May 31 '18 19:05 iCodeSometime