Skip to content
This repository was archived by the owner on Nov 20, 2024. It is now read-only.

Commit fe5300d

Browse files
committed
Update to Crystal 0.20.0
1 parent fc5730f commit fe5300d

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed

shard.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name: redis
2-
version: 0.3.0
2+
version: 0.4.0
33

44
authors:
55
- Ary Borenszweig <[email protected]>

spec/redis/protocol_spec.cr

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ require "../spec_helper"
22

33
def it_reads(string, expected, file = __FILE__, line = __LINE__)
44
it "reads #{string}", file, line do
5-
Redis::Protocol.read(MemoryIO.new(string)).should eq(expected)
5+
Redis::Protocol.read(IO::Memory.new(string)).should eq(expected)
66
end
77
end
88

@@ -27,32 +27,32 @@ describe Redis::Protocol do
2727

2828
it "raises CommandError on error" do
2929
expect_raises Redis::CommandError, "OH NO!" do
30-
Redis::Protocol.read(MemoryIO.new("-OH NO!"))
30+
Redis::Protocol.read(IO::Memory.new("-OH NO!"))
3131
end
3232
end
3333
end
3434

3535
describe "write" do
3636
it "writes nil" do
37-
io = MemoryIO.new
37+
io = IO::Memory.new
3838
Redis::Protocol.write(nil, io)
3939
io.to_s.should eq("$-1\r\n")
4040
end
4141

4242
it "writes bulk string" do
43-
io = MemoryIO.new
43+
io = IO::Memory.new
4444
Redis::Protocol.write("hello", io)
4545
io.to_s.should eq("$5\r\nhello\r\n")
4646
end
4747

4848
it "writes integer" do
49-
io = MemoryIO.new
49+
io = IO::Memory.new
5050
Redis::Protocol.write(1234, io)
5151
io.to_s.should eq(":1234\r\n")
5252
end
5353

5454
it "writes array" do
55-
io = MemoryIO.new
55+
io = IO::Memory.new
5656
Redis::Protocol.array(5, io) do
5757
Redis::Protocol.write(1, io)
5858
Redis::Protocol.write(2, io)

src/protocol.cr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ module Redis
6262
negative = true
6363
char = read_char(io)
6464
end
65-
while char.digit?
65+
while char.ascii_number?
6666
length = length * 10 + (char - '0')
6767
char = read_char(io)
6868
end

0 commit comments

Comments
 (0)