lib/hanami/utils/duplicable.rb in hanami-utils-0.7.2 vs lib/hanami/utils/duplicable.rb in hanami-utils-0.8.0

- old
+ new

@@ -43,11 +43,11 @@ # puts object.object_id # => 70172661782360 # # result = Hanami::Utils::Duplicable.dup(object) # # puts result # => "hello" - # puts result.object_id # => 70172671467020 – Different object + # puts result.object_id # => 70172671467020 - Different object # # @example Custom Logic # require 'hanami/utils/duplicable' # require 'hanami/utils/hash' # @@ -62,10 +62,10 @@ # Hanami::Utils::Hash.new(value).deep_dup.to_h # end # end # # puts result # => "{:a=>1}" - # puts result.object_id # => 70207105185500 – Different object + # puts result.object_id # => 70207105185500 - Different object def self.dup(value, &blk) case value when NilClass, FalseClass, TrueClass, Symbol, Numeric value when v = blk && blk.call(value)