diff --git a/lib/aws/s3/extensions.rb b/lib/aws/s3/extensions.rb index 2c9677f..1cc9da5 100644 --- a/lib/aws/s3/extensions.rb +++ b/lib/aws/s3/extensions.rb @@ -127,7 +127,7 @@ 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] diff --git a/test/extensions_test.rb b/test/extensions_test.rb index 8bbe100..2ad770a 100644 --- a/test/extensions_test.rb +++ b/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