We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5e5b7b9 commit 7d8f274Copy full SHA for 7d8f274
spec/ruby/core/method/source_location_spec.rb
@@ -86,6 +86,24 @@ def f
86
method.source_location[1].should == line
87
end
88
89
+ it "works for core methods where it returns nil or <internal:" do
90
+ loc = method(:__id__).source_location
91
+ if loc == nil
92
+ loc.should == nil
93
+ else
94
+ loc[0].should.start_with?('<internal:')
95
+ loc[1].should be_kind_of(Integer)
96
+ end
97
+
98
+ loc = method(:tap).source_location
99
100
101
102
103
104
105
106
107
describe "for a Method generated by respond_to_missing?" do
108
it "returns nil" do
109
m = MethodSpecs::Methods.new
0 commit comments