lib/code/object.rb in template-ruby-0.2.1 vs lib/code/object.rb in template-ruby-0.2.2

- old
+ new

@@ -43,26 +43,18 @@ !truthy? end def <=>(other) if respond_to?(:raw) - if other.respond_to?(:raw) - raw <=> other.raw - else - raw <=> other - end + other.respond_to?(:raw) ? raw <=> other.raw : raw <=> other else other <=> self end end def ==(other) if respond_to?(:raw) - if other.respond_to?(:raw) - raw == other.raw - else - raw == other - end + other.respond_to?(:raw) ? raw == other.raw : raw == other else other == self end end alias_method :eql?, :==