Permalink
Browse files

Remove warnings on Ruby 2.1

Conflicts:
	activesupport/lib/active_support/hash_with_indifferent_access.rb
  • Loading branch information...
1 parent fc2641d commit 6b927b86fa77cbb0e3bd7f042aaec0b2d7cec0fb @rafaelfranca rafaelfranca committed with arthurnn Jan 17, 2014
@@ -228,7 +228,11 @@ def deep_symbolize_keys; to_hash.deep_symbolize_keys end
def to_options!; self end
def select(*args, &block)
- dup.select!(*args, &block)
+ dup.tap { |hash| hash.select!(*args, &block)}
+ end
+
+ def reject(*args, &block)
+ dup.tap { |hash| hash.reject!(*args, &block)}
end
# Convert to a regular hash with string keys.
@@ -28,6 +28,10 @@ def encode_with(coder)
coder.represent_seq '!omap', map { |k,v| { k => v } }
end
+ def reject(*args, &block)
+ dup.tap { |hash| hash.reject!(*args, &block)}
+ end
+
def nested_under_indifferent_access
self
end

0 comments on commit 6b927b8

Please sign in to comment.