With_value.rb

This content was produced by an LLM and could include errors.

This script demonstrates Ruby string handling. It assigns a variable, then uses a heredoc (<<~EOL) to embed that variable’s content into a multi-line string format, successfully capturing the value.

value = 'ruby'
#=> "ruby"
doc = <<~EOL
#{value}
EOL
#=> "ruby\n"

Ruby 4.0.3