aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/lib/active_support/ordered_hash.rb
diff options
context:
space:
mode:
authorRafael Mendonça França <rafaelmfranca@gmail.com>2014-01-17 00:10:25 -0200
committerRafael Mendonça França <rafaelmfranca@gmail.com>2014-01-17 00:10:25 -0200
commit5402b72faafecfa1eda8afce0e0f194fcf385fe3 (patch)
tree31c5d2d901c6d80ebb8d54ab96ba8cf12bf693cd /activesupport/lib/active_support/ordered_hash.rb
parent7252b43c6ecd31a023399085165b1cea9d1306f5 (diff)
downloadrails-5402b72faafecfa1eda8afce0e0f194fcf385fe3.tar.gz
rails-5402b72faafecfa1eda8afce0e0f194fcf385fe3.tar.bz2
rails-5402b72faafecfa1eda8afce0e0f194fcf385fe3.zip
Remove warnings on Ruby 2.1
Diffstat (limited to 'activesupport/lib/active_support/ordered_hash.rb')
-rw-r--r--activesupport/lib/active_support/ordered_hash.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/activesupport/lib/active_support/ordered_hash.rb b/activesupport/lib/active_support/ordered_hash.rb
index 1a3693f766..8b320f6d05 100644
--- a/activesupport/lib/active_support/ordered_hash.rb
+++ b/activesupport/lib/active_support/ordered_hash.rb
@@ -28,6 +28,10 @@ module ActiveSupport
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