作者在 2012-12-29 00:04:05 发布以下内容
Ruby可以通过source_location定位方法的定义位置
[7] pry(main)> require "open-uri"
=> false
[8] pry(main)> URI.method(:join).source_location
=> ["C:/Ruby193/lib/ruby/1.9.1/uri/common.rb", 784]
[9] pry(main)>
Ruby可以通过source_location定位方法的定义位置
[7] pry(main)> require "open-uri"
=> false
[8] pry(main)> URI.method(:join).source_location
=> ["C:/Ruby193/lib/ruby/1.9.1/uri/common.rb", 784]
[9] pry(main)>