diff --git a/spec/ruby/core/kernel/caller_locations_spec.rb b/spec/ruby/core/kernel/caller_locations_spec.rb index c4e0084085..8050b5b3ab 100644 --- a/spec/ruby/core/kernel/caller_locations_spec.rb +++ b/spec/ruby/core/kernel/caller_locations_spec.rb @@ -65,4 +65,16 @@ describe 'Kernel#caller_locations' do it "must return the same locations when called with 1..-1 and when called with no arguments" do caller_locations.map(&:to_s).should == caller_locations(1..-1).map(&:to_s) end + + guard -> { Kernel.instance_method(:tap).source_location } do + it "includes core library methods defined in Ruby" do + file, line = Kernel.instance_method(:tap).source_location + file.should.start_with?(' { Kernel.instance_method(:tap).source_location } do + it "includes core library methods defined in Ruby" do + file, line = Kernel.instance_method(:tap).source_location + file.should.start_with?('