<watzon>
`write_bytes` requires that IO::ByteFormat have a method to handle that particular type.
<watzon>
I could just implement `write_bytes` for the type, but that also doesn't take into account writing to a `Bytes` object. It just works for `IO`.
<FromGitter>
<oprypin:matrix.org> no it requires that the object has a `to_io` method
<FromGitter>
<oprypin:matrix.org> see the link
<watzon>
`to_io` relies on `IO::ByteFormat` though, and still only works for IOs
<FromGitter>
<oprypin:matrix.org> IO::Memory writes into a Bytes object
<FromGitter>
<erdnaxeli:cervoi.se> it should probably be `0 < ord < 128`
Human_G33k has joined #crystal-lang
Nekka_ has joined #crystal-lang
coderobe9 has joined #crystal-lang
justinmcp_ has joined #crystal-lang
jrayhawk_ has joined #crystal-lang
alexherbo2 has joined #crystal-lang
HumanG33k has quit [*.net *.split]
Nekka has quit [*.net *.split]
coderobe has quit [*.net *.split]
jrayhawk has quit [*.net *.split]
justinmcp has quit [*.net *.split]
Nekka_ is now known as Nekka
coderobe9 is now known as coderobe
alexherbo2 has quit [Ping timeout: 240 seconds]
alexherbo2 has joined #crystal-lang
alexherbo2 has quit [Ping timeout: 264 seconds]
<straight-shoota>
unsafe_chr on a negative value should be expected to show undefined behaviour
<FromGitter>
<HertzDevil> are negative chars a different failure condition than chars above 0x10ffff
<FromGitter>
<HertzDevil> in `Char#bytesize` for example
<straight-shoota>
I suppose they're both out of range
<straight-shoota>
so yeah, raising for one side but not the other doesn't make sense
alexherbo2 has joined #crystal-lang
alexherbo29 has joined #crystal-lang
alexherbo2 has quit [Ping timeout: 240 seconds]
alexherbo29 is now known as alexherbo2
alexherbo2 has quit [Quit: Ping timeout (120 seconds)]
alexherbo2 has joined #crystal-lang
teardown has quit [Ping timeout: 268 seconds]
<FromGitter>
<JoeeGrigg> Hi, I am trying to use JSON mapping but when I try to use even the examples given by the JSON module I get the error `Error: undefined method 'mapping' for JSON:Module`. Can anybody help me please?