Sha256: b3633980066c566318470ce789be5ad5a1b81a11a14129815cca267e3d09225f

Contents?: true

Size: 435 Bytes

Versions: 83

Compression:

Stored size: 435 Bytes

Contents

require File.dirname(File.join(__rhoGetCurrentDir(), __FILE__)) + '/../../spec_helper'

describe "Range#to_a" do
  it "converts self to an array" do
    (-5..5).to_a.should == [-5, -4, -3, -2, -1, 0, 1, 2, 3, 4, 5]
    ('A'..'D').to_a.should == ['A','B','C','D']
    ('A'...'D').to_a.should == ['A','B','C']    
    (0xfffd...0xffff).to_a.should == [0xfffd,0xfffe]
    lambda { (0.5..2.4).to_a }.should raise_error(TypeError)
  end
end

Version data entries

83 entries across 83 versions & 1 rubygems

Version Path
rhodes-2.2.6 spec/framework_spec/app/spec/core/range/to_a_spec.rb
rhodes-2.2.6.beta.1 spec/framework_spec/app/spec/core/range/to_a_spec.rb
rhodes-2.2.5 spec/framework_spec/app/spec/core/range/to_a_spec.rb
rhodes-2.2.5.beta.3 spec/framework_spec/app/spec/core/range/to_a_spec.rb
rhodes-2.2.5.beta.2 spec/framework_spec/app/spec/core/range/to_a_spec.rb
rhodes-2.2.5.beta.1 spec/framework_spec/app/spec/core/range/to_a_spec.rb
rhodes-2.2.4.beta.1 spec/framework_spec/app/spec/core/range/to_a_spec.rb
rhodes-2.2.3 spec/framework_spec/app/spec/core/range/to_a_spec.rb
rhodes-2.2.3.beta.1 spec/framework_spec/app/spec/core/range/to_a_spec.rb
rhodes-2.2.2 spec/framework_spec/app/spec/core/range/to_a_spec.rb
rhodes-2.2.2.beta.1 spec/framework_spec/app/spec/core/range/to_a_spec.rb
rhodes-2.2.1 spec/framework_spec/app/spec/core/range/to_a_spec.rb
rhodes-2.2.1.beta.2 spec/framework_spec/app/spec/core/range/to_a_spec.rb
rhodes-2.2.1.beta.1 spec/framework_spec/app/spec/core/range/to_a_spec.rb
rhodes-2.2.0 spec/framework_spec/app/spec/core/range/to_a_spec.rb
rhodes-2.2.0.beta.3 spec/framework_spec/app/spec/core/range/to_a_spec.rb
rhodes-2.2.0.beta.2 spec/framework_spec/app/spec/core/range/to_a_spec.rb
rhodes-2.2.0.beta.1 spec/framework_spec/app/spec/core/range/to_a_spec.rb
rhodes-2.1.0 spec/framework_spec/app/spec/core/range/to_a_spec.rb
rhodes-2.0.3 spec/framework_spec/app/spec/core/range/to_a_spec.rb