lib/rmail/parser/pushbackreader.rb in rmail-1.1.3 vs lib/rmail/parser/pushbackreader.rb in rmail-1.1.4
- old
+ new
@@ -79,15 +79,15 @@
else
chunk = temp
end
end
chunk
- when Fixnum
+ when Integer
read_chunk(size)
else
raise ArgumentError,
- "Read size (#{size.inspect}) must be a Fixnum or nil."
+ "Read size (#{size.inspect}) must be an Integer or nil."
end
end
# Read a chunk of a given size. Unlike #read, #read_chunk must
# be passed a chunk size, and cannot be passed nil.
@@ -100,11 +100,11 @@
# The standard implementation of read_chunk. This can be
# convenient to call from derived classes when super() isn't
# easy to use.
def standard_read_chunk(size)
- unless size.is_a?(Fixnum) && size > 0
+ unless size.is_a?(Integer) && size > 0
raise ArgumentError,
"Read size (#{size.inspect}) must be greater than 0."
end
if @pushback
chunk = @pushback
@@ -130,14 +130,14 @@
# Retrieve the chunk size of this reader.
attr_reader :chunk_size
# Set the chunk size of this reader in bytes. This is useful
# mainly for testing, though perhaps some operations could be
- # optimized by tweaking this value. The chunk size must be a
- # Fixnum greater than 0.
+ # optimized by tweaking this value. The chunk size must be an
+ # Integer greater than 0.
def chunk_size=(size)
- unless size.is_a?(Fixnum)
- raise ArgumentError, "chunk size must be a Fixnum"
+ unless size.is_a?(Integer)
+ raise ArgumentError, "chunk size must be an Integer"
end
unless size >= 1
raise ArgumentError, "invalid size #{size.inspect} given"
end
@chunk_size = size