Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Remove warnings on Ruby 2.1

Conflicts:
	activesupport/lib/active_support/hash_with_indifferent_access.rb
  • Loading branch information...
commit 6b927b86fa77cbb0e3bd7f042aaec0b2d7cec0fb 1 parent fc2641d
@rafaelfranca rafaelfranca authored arthurnn committed
View
6 activesupport/lib/active_support/hash_with_indifferent_access.rb
@@ -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.
View
4 activesupport/lib/active_support/ordered_hash.rb
@@ -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
Please sign in to comment.
Something went wrong with that request. Please try again.