I want to run:
> ruby --version
ruby 1.9.2p0 (2010-08-18 revision 29034) [x86_64-darwin10.4.0]
and then see if 1.9.2 is printed out. If so, i return true.
How would this method look like using a regexp?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
I’d recommend using ‘RUBY_VERSION’, however you could do something like: