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

  • SEARCH
  • Home
  • 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 7786747
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T20:28:10+00:00 2026-06-01T20:28:10+00:00

An example is if I go into IRB and do the following: jruby-1.6.7 :026

  • 0

An example is if I go into IRB and do the following:

jruby-1.6.7 :026 > puts [1,2,3,4,5]
1
2
3
4
5
=> nil 

Is there anyway to suppress the nil? The problem is if I put in a large data structure, it spams something an other irrelevant return respond. I’m more interested in seeing output from debug statements I run through a block and have to continually scroll up and look for the real data.

  • 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-01T20:28:11+00:00Added an answer on June 1, 2026 at 8:28 pm

    If you just want to suppress long output once in a while, use ;0, like:

    a = [*1..10000];0
    # => 0
    

    If you want to suppress it generally, use the ~/.irbrc file. The IRB.conf[:INSPECT_MODE] and IRB.conf[:PROMPT][your_prompt][:RETURN] control what is returned. You can figure out what your_prompt is by checking IRB.conf[:PROMPT_MODE]

    Example:

    IRB.conf[:PROMPT][:DEFAULT][:RETURN] = "" # suppress return value completely
    

    You’ll need to restart irb after changing the value.

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

Sidebar

Related Questions

The following jQuery example should put some text into the div, but it doesn't.
I have the following example of what a user might type into a field
Following this example, I can list all elements into a pdf file import pyPdf
In the following code why does mockTest.ToString() return Null? EDIT: Added comment into example
When I paste the following text into IRB or PRY running under ruby-enterprise-2011.03, it
I've been asked to enter the following example into Eclipse Paste the following snippet
I just tossed this super simple code example into a Flash CS4 IDE frame
I am trying to read in a string from a C# Response.Write(string example) into
I am currently trying to incorporate Steve Sanderson's example code into my MVC 3
How to convert last 3 digits of number into 0 example 3444678 to 3444000

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.