Skip to content

Commit 7778727

Browse files
committed
1 parent 47bbccc commit 7778727

File tree

179 files changed

+743
-526
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

179 files changed

+743
-526
lines changed

spec/ruby/core/array/fetch_values_spec.rb

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121

2222
describe "with unmatched indexes" do
2323
it "raises a index error if no block is provided" do
24-
-> { @array.fetch_values(0, 1, 44) }.should raise_error(IndexError)
24+
-> { @array.fetch_values(0, 1, 44) }.should raise_error(IndexError, "index 44 outside of array bounds: -3...3")
2525
end
2626

2727
it "returns the default value from block" do
@@ -42,8 +42,14 @@
4242
@array.fetch_values(obj).should == [:c]
4343
end
4444

45+
it "does not support a Range object as argument" do
46+
-> {
47+
@array.fetch_values(1..2)
48+
}.should raise_error(TypeError, "no implicit conversion of Range into Integer")
49+
end
50+
4551
it "raises a TypeError when the passed argument can't be coerced to Integer" do
46-
-> { [].fetch_values("cat") }.should raise_error(TypeError)
52+
-> { [].fetch_values("cat") }.should raise_error(TypeError, "no implicit conversion of String into Integer")
4753
end
4854
end
4955
end

spec/ruby/core/array/pack/a_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# -*- encoding: binary -*-
1+
# encoding: binary
22
require_relative '../../../spec_helper'
33
require_relative '../fixtures/classes'
44
require_relative 'shared/basic'

spec/ruby/core/array/pack/at_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# -*- encoding: binary -*-
1+
# encoding: binary
22
require_relative '../../../spec_helper'
33
require_relative '../fixtures/classes'
44
require_relative 'shared/basic'

spec/ruby/core/array/pack/b_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# -*- encoding: binary -*-
1+
# encoding: binary
22
require_relative '../../../spec_helper'
33
require_relative '../fixtures/classes'
44
require_relative 'shared/basic'

spec/ruby/core/array/pack/c_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# -*- encoding: binary -*-
1+
# encoding: binary
22

33
require_relative '../../../spec_helper'
44
require_relative '../fixtures/classes'

spec/ruby/core/array/pack/comment_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# -*- encoding: binary -*-
1+
# encoding: binary
22
require_relative '../../../spec_helper'
33
require_relative '../fixtures/classes'
44

spec/ruby/core/array/pack/h_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# -*- encoding: binary -*-
1+
# encoding: binary
22
require_relative '../../../spec_helper'
33
require_relative '../fixtures/classes'
44
require_relative 'shared/basic'

spec/ruby/core/array/pack/m_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# -*- encoding: binary -*-
1+
# encoding: binary
22
require_relative '../../../spec_helper'
33
require_relative '../fixtures/classes'
44
require_relative 'shared/basic'

spec/ruby/core/array/pack/shared/float.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# -*- encoding: binary -*-
1+
# encoding: binary
22

33
describe :array_pack_float_le, shared: true do
44
it "encodes a positive Float" do

spec/ruby/core/array/pack/shared/integer.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# -*- encoding: binary -*-
1+
# encoding: binary
22

33
describe :array_pack_16bit_le, shared: true do
44
it "encodes the least significant 16 bits of a positive number" do

0 commit comments

Comments
 (0)