/ruby.rb Secret
Created
July 22, 2015 15:36
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
Class foo | |
def bar () | |
# Prints "Yes" | |
if ( /(?<=bodyContent=\').*(?=\')/ =~ message ) | |
puts "Yes" | |
else | |
puts "No" | |
end | |
@body_data = /(?<=bodyContent=\').*(?=\')/.match(message) | |
puts body_data # undefined local variable or method `body_data' for ... NameError | |
def other () | |
# Do something with body_data |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment