Skip to content

Commit

Permalink
Use custom alternative to __method__ if we're using 1.8.7 or above, n…
Browse files Browse the repository at this point in the history
…ot just above 1.8.7.
  • Loading branch information
marcel committed Apr 20, 2009
1 parent e2a13a6 commit 65228fc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/aws/s3/extensions.rb
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ def __called_from__
end if RUBY_VERSION > '1.8.7'

def expirable_memoize(reload = false, storage = nil)
current_method = RUBY_VERSION >= '1.8.7' ? __called_from__ : __method__(1)
current_method = RUBY_VERSION > '1.8.7' ? __called_from__ : __method__(1)
storage = "@#{storage || current_method}"
if reload
instance_variable_set(storage, nil)
Expand Down

0 comments on commit 65228fc

Please sign in to comment.