-
-
Save anonymous/fa7581f9ca2256df9e21 to your computer and use it in GitHub Desktop.
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