Fixnum is deprecated in Ruby 2.4
This commit is contained in:
parent
b2927ae44a
commit
c9eb3cee4c
|
@ -107,7 +107,7 @@ module CassandraCQL
|
|||
def fetch_hash
|
||||
if block_given?
|
||||
while row = fetch_row
|
||||
if row.kind_of?(Fixnum)
|
||||
if row.kind_of?(Integer)
|
||||
yield({row => row})
|
||||
else
|
||||
yield row.to_hash
|
||||
|
@ -115,7 +115,7 @@ module CassandraCQL
|
|||
end
|
||||
else
|
||||
if row = fetch_row
|
||||
if row.kind_of?(Fixnum)
|
||||
if row.kind_of?(Integer)
|
||||
{row => row}
|
||||
else
|
||||
row.to_hash
|
||||
|
|
|
@ -22,7 +22,7 @@ module CassandraCQL
|
|||
@row, @schema = row, schema
|
||||
@value_cache = Hash.new { |h, key|
|
||||
# If it's a number and not one of our columns, assume it's an index
|
||||
if key.kind_of?(Fixnum) and !column_indices.key?(key)
|
||||
if key.kind_of?(Integer) and !column_indices.key?(key)
|
||||
column_name = column_names[key]
|
||||
column_index = key
|
||||
else
|
||||
|
|
|
@ -159,7 +159,7 @@ describe "cast_to_cql" do
|
|||
end
|
||||
end
|
||||
|
||||
context "with a Fixnum object" do
|
||||
context "with a Integer object" do
|
||||
it "should return the same object" do
|
||||
Statement.cast_to_cql(15).should eq(15)
|
||||
end
|
||||
|
@ -209,7 +209,7 @@ describe "cast_to_cql" do
|
|||
end
|
||||
end
|
||||
|
||||
context "with an array of Fixnums" do
|
||||
context "with an array of Integers" do
|
||||
it "should equal itself" do
|
||||
arr = [1, 2, 3]
|
||||
Statement.cast_to_cql(arr).should eq(arr)
|
||||
|
|
Loading…
Reference in New Issue