Created
May 10, 2018 18:20
-
-
Save lisa/d6679511c7882b3e6a16dcdc5f694a03 to your computer and use it in GitHub Desktop.
qoobaa/s3 issue with version 0.3.26
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
lisas@lisas ~ $ for v in ruby-1.8.7-p374 ruby-2.1.7 ruby-2.4.0 ruby-2.5.0; do rvm use $v; ruby tester.rb ; done | |
Using /Users/lisas/.rvm/gems/ruby-1.8.7-p374 | |
Ruby version: 1.8.7 | |
@ivar is defined | |
@notvar is not defined | |
Using /Users/lisas/.rvm/gems/ruby-2.1.7 | |
Ruby version: 2.1.7 | |
@ivar is defined | |
@notvar is not defined | |
Using /Users/lisas/.rvm/gems/ruby-2.4.0 | |
Ruby version: 2.4.0 | |
@ivar is defined | |
@notvar is not defined | |
Using /Users/lisas/.rvm/gems/ruby-2.5.0 | |
Ruby version: 2.5.0 | |
@ivar is defined | |
@notvar is not defined |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## tester.rb | |
class Test | |
def initialize | |
@ivar = nil | |
end | |
def isdef | |
if defined?(@ivar) | |
puts "@ivar is defined" | |
else | |
puts "@ivar is not defined" | |
end | |
if defined?(@notvar) | |
puts "@notvar is defined" | |
else | |
puts "@notvar is not defined" | |
end | |
end | |
end | |
puts "Ruby version: #{RUBY_VERSION}" | |
tester = Test.new | |
tester.isdef |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment