There's an interesting bug happening on Ruby's standard library where this code triggers an exception (and it shouldn't, IMO):

IPAddr.new('::1').freeze.to_range

and here's my attempt to fix it:

github.com/ruby/ipaddr/pull/36

Got a lot of fun recalling the networking algebra just for the sake of having tests to support the patch - there were no test for `to_range'

Hello! Using my first toot to link to my PR with a fix for an edge case in Rails that also fixes an old demeter violation. github.com/rails/rails/pull/43

Ruby.social

A Mastodon instance for Rubyists & friends