Skip to content

Commit 3945072

Browse files
committed
clarify CBOR.stream usage
1 parent c236168 commit 3945072

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -235,7 +235,7 @@ decoded = CBOR.decode(encoded) # => :hello (symbol preserved, same mruby only)
235235

236236
### Streaming
237237

238-
Read a sequence of CBOR documents from any IO-like object:
238+
Read a sequence of CBOR documents from any File-like object:
239239
```ruby
240240
File.open("data.cbor", "rb") do |f|
241241
CBOR.stream(f) do |doc|
@@ -244,7 +244,7 @@ File.open("data.cbor", "rb") do |f|
244244
end
245245

246246
# Or as an enumerator
247-
docs = CBOR.stream(io).map(&:value)
247+
docs = CBOR.stream(f).map(&:value)
248248
```
249249

250250
---

0 commit comments

Comments
 (0)