Interactive Ruby Shell: Difference between revisions
m automatic correction by IA |
m remove duplicates internal links |
||
| Line 17: | Line 17: | ||
| operating system = [[Cross-platform]] | | operating system = [[Cross-platform]] | ||
| platform = [[Ruby (programming language)|Ruby interpreter]] | | platform = [[Ruby (programming language)|Ruby interpreter]] | ||
| programming language = | | programming language = Ruby | ||
| genre = | | genre = Ruby [[shell (computing)|shell]] | ||
| license = [http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/COPYING?view=markup Ruby License]<br />[[BSD licenses|BSD License]] | | license = [http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/COPYING?view=markup Ruby License]<br />[[BSD licenses|BSD License]] | ||
| website = {{url|http://www.ruby-lang.org/en/}} | | website = {{url|http://www.ruby-lang.org/en/}} | ||
}} | }} | ||
'''Interactive Ruby Shell''' ('''IRB''' or '''irb''') is a [[REPL]] for programming in the [[Object-oriented programming|object-oriented]] [[scripting language]] | '''Interactive Ruby Shell''' ('''IRB''' or '''irb''') is a [[REPL]] for programming in the [[Object-oriented programming|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 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 | 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 69: | Line 69: | ||
*[https://ruby.github.io/TryRuby/ "Try Ruby"] Online IRB | *[https://ruby.github.io/TryRuby/ "Try Ruby"] Online IRB | ||
*[http://ruby-doc.org/docs/ProgrammingRuby/html/trouble.html "When Trouble Strikes"] chapter from ''[[Programming Ruby]]'' | *[http://ruby-doc.org/docs/ProgrammingRuby/html/trouble.html "When Trouble Strikes"] chapter from ''[[Programming Ruby]]'' | ||
*[http://ruby-doc.org/docs/ProgrammingRuby/html/irb.html "Interactive Ruby Shell"] chapter from '' | *[http://ruby-doc.org/docs/ProgrammingRuby/html/irb.html "Interactive Ruby Shell"] chapter from ''Programming Ruby'' | ||
{{Ruby programming language}} | {{Ruby programming language}} | ||
Latest revision as of 04:17, 3 August 2026
This article is written like a manual or guidebook. (August 2021) (Learn how and when to remove this template message) |
| Developer(s) | Keiju Ishitsuka |
|---|---|
| Stable release | 1.2.4
/ May 2, 2020[1] |
| Written in | Ruby |
| Engine | |
| Operating system | Cross-platform |
| Platform | Ruby interpreter |
| Type | Ruby shell |
| License | Ruby License BSD License |
| Website | www |
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
- ↑ "All versions of irb". RubyGems.org. Retrieved 2020-07-06.
External links
- "Code and run Ruby online" A powerful interactive Ruby shell
- "Try Ruby" Online IRB
- "When Trouble Strikes" chapter from Programming Ruby
- "Interactive Ruby Shell" chapter from Programming Ruby
| This programming-language-related article is a stub. You can help EverybodyWiki by expanding it. |
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.

