Sha256: ac555cd9bdd9831aa93526013f52140e6701c488de2e5b74882ec907e3c262e9

Contents?: true

Size: 732 Bytes

Versions: 64

Compression:

Stored size: 732 Bytes

Contents

module VariablesSpecs
  class ParAsgn
    attr_accessor :x

    def initialize
      @x = 0
    end

    def inc
      @x += 1
    end

    def to_ary
      [1,2,3,4]
    end
  end

  class OpAsgn
    attr_accessor :a, :b, :side_effect
    
    def do_side_effect
      self.side_effect = true
      return @a
    end

    def do_more_side_effects
      @a += 5
      self
    end

    def do_bool_side_effects
      @b += 1
      self
    end
  end

  class Hashalike
    def [](k) k end
    def []=(k, v) [k, v] end
  end

  def self.reverse_foo(a, b)
    return b, a
  end

  class ArrayLike
    def initialize(array)
      @array = array
    end

    def to_a
      @array
    end
  end

  class ArraySubclass < Array
  end
end

Version data entries

64 entries across 64 versions & 1 rubygems

Version Path
rhodes-2.2.6 spec/framework_spec/app/spec/language/fixtures/variables.rb
rhodes-2.2.6.beta.1 spec/framework_spec/app/spec/language/fixtures/variables.rb
rhodes-2.2.5 spec/framework_spec/app/spec/language/fixtures/variables.rb
rhodes-2.2.5.beta.3 spec/framework_spec/app/spec/language/fixtures/variables.rb
rhodes-2.2.5.beta.2 spec/framework_spec/app/spec/language/fixtures/variables.rb
rhodes-2.2.5.beta.1 spec/framework_spec/app/spec/language/fixtures/variables.rb
rhodes-2.2.4.beta.1 spec/framework_spec/app/spec/language/fixtures/variables.rb
rhodes-2.2.3 spec/framework_spec/app/spec/language/fixtures/variables.rb
rhodes-2.2.3.beta.1 spec/framework_spec/app/spec/language/fixtures/variables.rb
rhodes-2.2.2 spec/framework_spec/app/spec/language/fixtures/variables.rb
rhodes-2.2.2.beta.1 spec/framework_spec/app/spec/language/fixtures/variables.rb
rhodes-2.2.1 spec/framework_spec/app/spec/language/fixtures/variables.rb
rhodes-2.2.1.beta.2 spec/framework_spec/app/spec/language/fixtures/variables.rb
rhodes-2.2.1.beta.1 spec/framework_spec/app/spec/language/fixtures/variables.rb
rhodes-2.2.0 spec/framework_spec/app/spec/language/fixtures/variables.rb
rhodes-2.2.0.beta.3 spec/framework_spec/app/spec/language/fixtures/variables.rb
rhodes-2.2.0.beta.2 spec/framework_spec/app/spec/language/fixtures/variables.rb
rhodes-2.2.0.beta.1 spec/framework_spec/app/spec/language/fixtures/variables.rb
rhodes-2.1.0 spec/framework_spec/app/spec/language/fixtures/variables.rb
rhodes-2.0.3 spec/framework_spec/app/spec/language/fixtures/variables.rb