Sha256: 99d5167bcd0cdeb26f1bf50923fa2f74dad0bb8cc541381987b2ab5d40b660c1
Contents?: true
Size: 569 Bytes
Versions: 83
Compression:
Stored size: 569 Bytes
Contents
require File.dirname(File.join(__rhoGetCurrentDir(), __FILE__)) + '/../../spec_helper' require File.dirname(File.join(__rhoGetCurrentDir(), __FILE__)) + '/fixtures/classes' describe "Method#receiver" do ruby_version_is '1.8.7' do it "returns the receiver of the method" do s = "abc" s.method(:upcase).receiver.should equal(s) end it "returns the right receiver even when aliased" do obj = MethodSpecs::Methods.new obj.method(:foo).receiver.should equal(obj) obj.method(:bar).receiver.should equal(obj) end end end
Version data entries
83 entries across 83 versions & 1 rubygems