Open JoshCheek opened 5 years ago
In xmpfilter mode, when there are multiple output locations, it inspects multiple times. Not sure this is worth caring about:
require 'bigdecimal' # => true public def usd; BigDecimal self end public def inr; BigDecimal(self) / 70 end class BigDecimal def inspect sprintf("$%.2f", self).sub(/\d+/) { $& # => "1234", "1234" } end end n = BigDecimal '1234.56' # => $1234.56 # => $1234.56
Simpler example:
s = "" def s.inspect "s" # => "s", "s" end s # => s # => s
In xmpfilter mode, when there are multiple output locations, it inspects multiple times. Not sure this is worth caring about: