Not sure if it should, but I'll drop this here to remind myself to look into it later. Note that I did try to use it this way, so maybe this should have been correct.
module BinMeUp
refine Fixnum do
def inspect
"%08b" % self # => "01111011"
end # => :inspect
end # => #<refinement:Integer@BinMeUp>
end # => #<refinement:Integer@BinMeUp>
using BinMeUp # => main
123 # => 123
123.inspect # => "01111011"
Not sure if it should, but I'll drop this here to remind myself to look into it later. Note that I did try to use it this way, so maybe this should have been correct.