You can edit almost every page by Creating an account and confirming your email.

Interactive Ruby Shell: Difference between revisions

From EverybodyWiki Bios & Wiki
WikiMasterBot2 (talk | contribs)
Moved page from wikipedia:en:Interactive Ruby Shell ([[Edithistory:|history]])
 
WikiMasterBot2 (talk | contribs)
m automatic correction by IA
 
Line 1: Line 1:
<!-- Please do not remove or change this AfD message until the discussion has been closed. -->
{{Article for deletion/dated|page=Interactive Ruby Shell|timestamp=20221106195809|year=2022|month=November|day=6|substed=yes}}
{{Article for deletion/dated|page=Interactive Ruby Shell|timestamp=20221106195809|year=2022|month=November|day=6|substed=yes}}
<!-- Once discussion is closed, please place on talk page: {{Old AfD multi|page=Interactive Ruby Shell|date=6 November 2022|result='''keep'''}} -->
<!-- Once discussion is closed, please place on talk page: {{Old AfD multi|page=Interactive Ruby Shell|date=6 November 2022|result='''keep'''}} -->
Line 11: Line 10:
| logo                  =
| logo                  =
| screenshot            = [[Image:Interactive Ruby Shell.png|300px|]]
| screenshot            = [[Image:Interactive Ruby Shell.png|300px|]]
| caption                = The screenshot session as same as the article example
| caption                = The screenshot session is the same as the article example
| collapsible            = yes
| collapsible            = yes
| developer              = [[Keiju Ishitsuka]] <[email protected]>
| developer              = [[Keiju Ishitsuka]] <[email protected]>
Line 26: Line 25:
'''Interactive Ruby Shell''' ('''IRB''' or '''irb''') is a [[REPL]] for programming in the [[Object-oriented programming|object-oriented]] [[scripting language]] [[Ruby (programming language)|Ruby]]. The abbreviation ''irb'' is a [[portmanteau]] of the word "interactive" and the [[filename extension]] for Ruby files, ".rb".
'''Interactive Ruby Shell''' ('''IRB''' or '''irb''') is a [[REPL]] for programming in the [[Object-oriented programming|object-oriented]] [[scripting language]] [[Ruby (programming language)|Ruby]]. The abbreviation ''irb'' is a [[portmanteau]] of the word "interactive" and the [[filename extension]] for Ruby files, ".rb".


The program is launched from a [[Command line interface|command line]] and allows the execution of Ruby commands with immediate response, experimenting in real-time. It features [[command history]], line editing capabilities, and [[job control (Unix)|job control]], and is able to communicate directly as a [[shell script]] over the Internet and interact with a live server. It was developed by [[Keiju Ishitsuka]].
The program is launched from a [[Command line interface|command line]] and allows the execution of Ruby commands with immediate response, experimenting in real-time. It features [[command history]], line editing capabilities, and [[job control (Unix)|job control]], and is able to communicate directly as a [[shell script]] over the Internet and interact with a live server. It was developed by [[Keiju Ishitsuka]].


==Syntax and use==
==Syntax and use==
Line 40: Line 39:
irb(main):004:2>    1
irb(main):004:2>    1
irb(main):005:2>  else
irb(main):005:2>  else
irb(main):006:2*     n * fact(n - 1)
irb(main):006:2>     n * fact(n - 1)
irb(main):007:2>  end
irb(main):007:2>  end
irb(main):008:1> end
irb(main):008:1> end

Latest revision as of 04:32, 14 September 2025



Interactive Ruby Shell
Screenshot
The screenshot session is the same as the article example
Developer(s)Keiju Ishitsuka
Stable release
1.2.4 / May 2, 2020; 6 years ago (2020-05-02)[1]
Written inRuby
Engine
    Operating systemCross-platform
    PlatformRuby interpreter
    TypeRuby shell
    LicenseRuby License
    BSD License
    Websitewww.ruby-lang.org/en/

    Search Interactive Ruby Shell on Amazon.

    Interactive Ruby Shell (IRB or irb) is a REPL for programming in the object-oriented scripting language Ruby. The abbreviation irb is a portmanteau of the word "interactive" and the filename extension for Ruby files, ".rb".

    The program is launched from a command line and allows the execution of Ruby commands with immediate response, experimenting in real-time. It features command history, line editing capabilities, and job control, and is able to communicate directly as a shell script over the Internet and interact with a live server. It was developed by Keiju Ishitsuka.

    Syntax and use

    Syntax:

    irb [ options ] [ programfile ] [ argument... ]
    

    Example:

    irb(main):001:0> n = 5
    => 5
    irb(main):002:0> def fact(n)
    irb(main):003:1>   if n <= 1
    irb(main):004:2>     1
    irb(main):005:2>   else
    irb(main):006:2>     n * fact(n - 1)
    irb(main):007:2>   end
    irb(main):008:1> end
    => :fact
    irb(main):009:0> fact(n)
    => 120
    
    irb(main):001:0> class Cat
    irb(main):002:1>   def meow
    irb(main):003:2>     puts 'Meow!'
    irb(main):004:2>   end
    irb(main):005:1> end
    => :meow
    
    irb(main):006:0> Cat.new.meow
    Meow!
    

    See also

    References

    1. "All versions of irb". RubyGems.org. Retrieved 2020-07-06.

    External links



    This article "Interactive Ruby Shell" is from Wikipedia. The list of its authors can be seen in its historical and/or the page Edithistory:Interactive Ruby Shell. Articles copied from Draft Namespace on Wikipedia could be seen on the Draft Namespace of Wikipedia and not main one.