Sha256: 2951129bd69480121bb7a363fe61d4de8b8cfe64397df75c8ef53b7cd5685573

Contents?: true

Size: 1.01 KB

Versions: 19

Compression:

Stored size: 1.01 KB

Contents

module ReturnSpecs
  class Blocks
    def yielding_method
      yield
      ScratchPad.record :after_yield
    end

    def enclosing_method
      yielding_method do
        ScratchPad.record :before_return
        return :return_value
        ScratchPad.record :after_return
      end

      ScratchPad.record :after_call
    end
  end

  class NestedCalls < Blocks
    def invoking_method(&b)
      yielding_method(&b)
      ScratchPad.record :after_invoke
    end

    def enclosing_method
      invoking_method do
        ScratchPad.record :before_return
        return :return_value
        ScratchPad.record :after_return
      end
      ScratchPad.record :after_invoke
    end
  end

  class NestedBlocks < Blocks
    def enclosing_method
      yielding_method do
        yielding_method do
          ScratchPad.record :before_return
          return :return_value
          ScratchPad.record :after_return
        end
        ScratchPad.record :after_invoke1
      end
      ScratchPad.record :after_invoke2
    end
  end
end

Version data entries

19 entries across 19 versions & 1 rubygems

Version Path
rhodes-2.0.0.beta11 spec/framework_spec/app/spec/language/fixtures/return.rb
rhodes-2.0.0.beta10 spec/framework_spec/app/spec/language/fixtures/return.rb
rhodes-2.0.0.beta9 spec/framework_spec/app/spec/language/fixtures/return.rb
rhodes-2.0.0.beta8 spec/framework_spec/app/spec/language/fixtures/return.rb
rhodes-2.0.0.beta7 spec/framework_spec/app/spec/language/fixtures/return.rb
rhodes-2.0.0.beta6 spec/framework_spec/app/spec/language/fixtures/return.rb
rhodes-2.0.0.beta4 spec/framework_spec/app/spec/language/fixtures/return.rb
rhodes-2.0.0.beta3 spec/framework_spec/app/spec/language/fixtures/return.rb
rhodes-1.5.5 spec/framework_spec/app/spec/language/fixtures/return.rb
rhodes-2.0.0.beta2 spec/framework_spec/app/spec/language/fixtures/return.rb
rhodes-2.0.0.beta1 spec/framework_spec/app/spec/language/fixtures/return.rb
rhodes-1.5.4 spec/framework_spec/app/spec/language/fixtures/return.rb
rhodes-1.5.3 spec/framework_spec/app/spec/language/fixtures/return.rb
rhodes-1.5.2 spec/framework_spec/app/spec/language/fixtures/return.rb
rhodes-1.5.1 spec/framework_spec/app/spec/language/fixtures/return.rb
rhodes-1.5.0 spec/framework_spec/app/spec/language/fixtures/return.rb
rhodes-1.4.2 spec/framework_spec/app/spec/language/fixtures/return.rb
rhodes-1.4.1 spec/framework_spec/app/spec/language/fixtures/return.rb
rhodes-1.4.0 spec/framework_spec/app/spec/language/fixtures/return.rb