Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

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.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7906923
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T11:11:14+00:00 2026-06-03T11:11:14+00:00

Example: puts <<BLOCK … BLOCK with BLOCK being any other identifier that doesn’t clash

  • 0

Example:

puts <<BLOCK
...
BLOCK

with BLOCK being any other identifier that doesn’t clash with a keyword.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-03T11:11:15+00:00Added an answer on June 3, 2026 at 11:11 am

    Yes; you can–any legal symbol or quoted string may be used.

    For example, if you want to throw a bang in it, you have to use the quoted form:

    pry(main)> s = <<"foo!bar"
    pry(main)* yo
    pry(main)* foo!bar
    => "yo\n"
    pry(main)> puts s
    yo
    

    If it’s a symbol then you don’t need to quote it.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Can someone post the simplest thread example for Delphi 2010 that for example puts
Example: I have an class that inherits from UIImageView. An object creates an instance
Example: I have a method -myFooBarMethod:withFoo:bar:moreFoo: and inside the implementation of that method I
I have a Ruby script that outputs a heap of text. As an example:
I'm struggling with code that looks like the example below (but actually does something
There's a method in a library out of my control that uses a block
I'm traversing an object graph and want to pass it a block that will
RubyMine can toggle block syntax between do;end and { } block notation. For example,
SOLVED - the problem is that doing a rotation puts half of the element
Here is the code I'm using: location = block.xpath(*/img) puts location And this outputs:

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.