Skip to content

Commit

Permalink
Remove warnings on Ruby 2.1
Browse files Browse the repository at this point in the history
Conflicts:
	activesupport/lib/active_support/hash_with_indifferent_access.rb
  • Loading branch information
rafaelfranca authored and arthurnn committed Feb 26, 2014
1 parent fc2641d commit 6b927b8
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
Expand Up @@ -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.
Expand Down
4 changes: 4 additions & 0 deletions activesupport/lib/active_support/ordered_hash.rb
Expand Up @@ -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
Expand Down

0 comments on commit 6b927b8

Please sign in to comment.