Skip to content

Commit

Permalink
Merge pull request hashie#1 from kgrz/fix-stack-error
Browse files Browse the repository at this point in the history
Fix SystemStackError in IndifferentAccess
  • Loading branch information
numinit committed Jun 12, 2014
2 parents 160643b + f916824 commit 4137935
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/hashie/extensions/indifferent_access.rb
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,11 @@ module Extensions
module IndifferentAccess
def self.included(base)
base.class_eval do
alias_method :regular_writer, :[]=
alias_method :regular_writer, :[]= unless method_defined?(:regular_writer)
alias_method :[]=, :indifferent_writer
alias_method :store, :indifferent_writer
%w(default update replace fetch delete key? values_at).each do |m|
alias_method "regular_#{m}", m
alias_method "regular_#{m}", m unless method_defined?("regular_#{m}")
alias_method m, "indifferent_#{m}"
end

Expand Down

0 comments on commit 4137935

Please sign in to comment.