Skip to content

Commit

Permalink
rename variable
Browse files Browse the repository at this point in the history
  • Loading branch information
Alex Gaynor committed Apr 15, 2013
1 parent 74c3351 commit cc6dcca
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions lib-topaz/hash.rb
Original file line number Diff line number Diff line change
Expand Up @@ -137,14 +137,14 @@ def inspect
def select!(&block)
return enum_for(:select!) unless block
raise RuntimeError.new("can't modify frozen #{self.class}") if frozen?
delete_p = false
modified = false
each_pair do |key, value|
unless yield key, value
delete key
delete_p = true
modified = true
end
end
delete_p ? self : nil
modified ? self : nil
end

def keep_if(&block)
Expand All @@ -162,14 +162,14 @@ def select(&block)
def reject!(&block)
return enum_for(:reject!) unless block
raise RuntimeError.new("can't modify frozen #{self.class}") if frozen?
delete_p = false
modified = false
each_pair do |key, value|
if yield key, value
delete key
delete_p = true
modified = true
end
end
delete_p ? self : nil
modified ? self : nil
end

def delete_if(&block)
Expand Down

2 comments on commit cc6dcca

@kachick
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm sorry to trouble you. :(

@alex
Copy link
Member

@alex alex commented on cc6dcca Apr 15, 2013

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't worry about it!

Please sign in to comment.