Skip to content

Instantly share code, notes, and snippets.

@harrisi

harrisi/foo.rb Secret

Created July 20, 2016 07:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save harrisi/a7a8ec19b24ee6187f6f55a24c4151d2 to your computer and use it in GitHub Desktop.
Save harrisi/a7a8ec19b24ee6187f6f55a24c4151d2 to your computer and use it in GitHub Desktop.
expression interpolation in heredoc
puts <<ENDDOC
\tCP[#{index + 1}]: #{case cp_info.tag
when CONSTANT_Class_info
"Class"
else
cp_info.tag
end
}
ENDDOC
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment