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

Version Path
rhodes-3.0.0.beta.6 spec/framework_spec/app/spec/core/method/receiver_spec.rb
rhodes-3.0.0.beta.5 spec/framework_spec/app/spec/core/method/receiver_spec.rb
rhodes-3.0.0.beta.4 spec/framework_spec/app/spec/core/method/receiver_spec.rb
rhodes-3.0.0.beta.3 spec/framework_spec/app/spec/core/method/receiver_spec.rb
rhodes-3.0.0.beta.2 spec/framework_spec/app/spec/core/method/receiver_spec.rb
rhodes-3.0.0.beta.1 spec/framework_spec/app/spec/core/method/receiver_spec.rb
rhodes-2.4.1 spec/framework_spec/app/spec/core/method/receiver_spec.rb
rhodes-2.4.1.beta.1 spec/framework_spec/app/spec/core/method/receiver_spec.rb
rhodes-2.4.0 spec/framework_spec/app/spec/core/method/receiver_spec.rb
rhodes-2.4.0.beta.2 spec/framework_spec/app/spec/core/method/receiver_spec.rb
rhodes-2.4.0.beta.1 spec/framework_spec/app/spec/core/method/receiver_spec.rb
rhodes-2.3.2 spec/framework_spec/app/spec/core/method/receiver_spec.rb
rhodes-2.3.2.beta.2 spec/framework_spec/app/spec/core/method/receiver_spec.rb
rhodes-2.3.2.beta.1 spec/framework_spec/app/spec/core/method/receiver_spec.rb
rhodes-2.3.1 spec/framework_spec/app/spec/core/method/receiver_spec.rb
rhodes-2.3.1.beta.1 spec/framework_spec/app/spec/core/method/receiver_spec.rb
rhodes-2.3.0 spec/framework_spec/app/spec/core/method/receiver_spec.rb
rhodes-2.3.0.beta.3 spec/framework_spec/app/spec/core/method/receiver_spec.rb
rhodes-2.3.0.beta.2 spec/framework_spec/app/spec/core/method/receiver_spec.rb
rhodes-2.3.0.beta.1 spec/framework_spec/app/spec/core/method/receiver_spec.rb