Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fixes instance of Ruby version = 1.8.7 for Kernel method (for real)

  • Loading branch information...
commit d8997822cfd4de9fe628f7478dbc11da623df976 1 parent b8e4538
Harry Love authored
Showing with 4 additions and 4 deletions.
  1. +3 −3 lib/aws/s3/extensions.rb
  2. +1 −1  test/extensions_test.rb
View
6 lib/aws/s3/extensions.rb
@@ -127,14 +127,14 @@ def to_header
module Kernel
def __method__(depth = 0)
caller[depth][/`([^']+)'/, 1]
- end if RUBY_VERSION < '1.8.7'
+ end if RUBY_VERSION <= '1.8.7'
def __called_from__
caller[1][/`([^']+)'/, 1]
- end if RUBY_VERSION >= '1.8.7'
+ 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)
View
2  test/extensions_test.rb
@@ -139,7 +139,7 @@ def test___method___depth
assert_equal 'foo', b.foo
assert_equal 'bar', b.bar
end
-end if RUBY_VERSION < '1.8.7'
+end if RUBY_VERSION <= '1.8.7'
class ModuleExtensionsTest < Test::Unit::TestCase
class Foo
Please sign in to comment.
Something went wrong with that request. Please try again.