Skip to content

Commit

Permalink
check path explicitly, instead of string compare, #55
Browse files Browse the repository at this point in the history
  • Loading branch information
sriv committed Feb 6, 2018
1 parent 07a4701 commit 90e19ab
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/method_cache.rb
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ def self.clear_hooks(hook)
end

def self.clear()
class_variable_get("@@steps_map").clear
@@steps_map.clear
end

def self.add_step(step_value, step_info)
Expand Down Expand Up @@ -81,7 +81,7 @@ def self.recoverable?(step_value)

def self.remove_steps(file)
@@steps_map.each_pair do |step, info|
l = info[:locations].reject { |loc| loc[:file] == file }
l = info[:locations].reject { |loc| File.identical? loc[:file], file }
l.empty? ? @@steps_map.delete(step) : @@steps_map[step][:locations] = l
end
end
Expand Down

0 comments on commit 90e19ab

Please sign in to comment.