{"id":13878319,"url":"https://github.com/ruby/irb","last_synced_at":"2025-10-04T00:02:56.101Z","repository":{"id":33649624,"uuid":"138372496","full_name":"ruby/irb","owner":"ruby","description":"interactive Ruby","archived":false,"fork":false,"pushed_at":"2025-05-08T15:09:58.000Z","size":3093,"stargazers_count":411,"open_issues_count":66,"forks_count":126,"subscribers_count":49,"default_branch":"master","last_synced_at":"2025-05-10T12:03:22.805Z","etag":null,"topics":["hacktoberfest","repl","ruby"],"latest_commit_sha":null,"homepage":"https://ruby.github.io/irb/","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-2-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ruby.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2018-06-23T04:55:54.000Z","updated_at":"2025-05-08T15:20:00.000Z","dependencies_parsed_at":"2023-12-21T21:31:08.387Z","dependency_job_id":"6b08ab14-4a96-4db3-b42e-c18f046ec0b6","html_url":"https://github.com/ruby/irb","commit_stats":{"total_commits":1538,"total_committers":130,"mean_commits":"11.830769230769231","dds":0.8003901170351105,"last_synced_commit":"7bbb885163d6c03f27c4b89509de0e7d74ce7d2e"},"previous_names":[],"tags_count":72,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ruby%2Firb","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ruby%2Firb/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ruby%2Firb/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ruby%2Firb/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ruby","download_url":"https://codeload.github.com/ruby/irb/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253568660,"owners_count":21928906,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["hacktoberfest","repl","ruby"],"created_at":"2024-08-06T08:01:46.241Z","updated_at":"2025-10-04T00:02:51.073Z","avatar_url":"https://github.com/ruby.png","language":"Ruby","readme":"# IRB\n\n[![Gem Version](https://badge.fury.io/rb/irb.svg)](https://badge.fury.io/rb/irb)\n[![Static Badge](https://img.shields.io/badge/RDoc-flat?style=flat\u0026label=documentation\u0026link=https%3A%2F%2Fruby.github.io%2Firb%2F)](https://ruby.github.io/irb/)\n[![build](https://github.com/ruby/irb/actions/workflows/test.yml/badge.svg)](https://github.com/ruby/irb/actions/workflows/test.yml)\n\n\nIRB stands for \"interactive Ruby\" and is a tool to interactively execute Ruby expressions read from the standard input.\n\nThe `irb` command from your shell will start the interpreter.\n\n## Installation\n\n\u003e [!Note]\n\u003e\n\u003e IRB is a default gem of Ruby so you shouldn't need to install it separately.\n\u003e\n\u003e But if you're using Ruby 2.6 or later and want to upgrade/install a specific version of IRB, please follow these steps.\n\nTo install it with `bundler`, add this line to your application's Gemfile:\n\n```ruby\ngem 'irb'\n```\n\nAnd then execute:\n\n```shell\n$ bundle\n```\n\nOr install it directly with:\n\n```shell\n$ gem install irb\n```\n\n## Usage\n\n\u003e [!Note]\n\u003e\n\u003e We're working hard to match Pry's variety of powerful features in IRB, and you can track our progress or find contribution ideas in [this document](https://ruby.github.io/irb/COMPARED_WITH_PRY_md.html).\n\n### The `irb` Executable\n\nYou can start a fresh IRB session by typing `irb` in your terminal.\n\nIn the session, you can evaluate Ruby expressions or even prototype a small Ruby script. An input is executed when it is syntactically complete.\n\n```shell\n$ irb\nirb(main):001\u003e 1 + 2\n=\u003e 3\nirb(main):002* class Foo\nirb(main):003*   def foo\nirb(main):004*     puts 1\nirb(main):005*   end\nirb(main):006\u003e end\n=\u003e :foo\nirb(main):007\u003e Foo.new.foo\n1\n=\u003e nil\n```\n\n### The `binding.irb` Breakpoint\n\nIf you use Ruby 2.5 or later versions, you can also use `binding.irb` in your program as breakpoints.\n\nOnce a `binding.irb` is evaluated, a new IRB session will be started with the surrounding context:\n\n```shell\n$ ruby test.rb\n\nFrom: test.rb @ line 2 :\n\n    1: def greet(word)\n =\u003e 2:   binding.irb\n    3:   puts \"Hello #{word}\"\n    4: end\n    5:\n    6: greet(\"World\")\n\nirb(main):001:0\u003e word\n=\u003e \"World\"\nirb(main):002:0\u003e exit\nHello World\n```\n\n### Debugging\n\nYou can use IRB as a debugging console with `debug.gem` with these options:\n\n- In `binding.irb`, use the `debug` command to start an `irb:rdbg` session with access to all `debug.gem` commands.\n- Use the `RUBY_DEBUG_IRB_CONSOLE=1` environment variable to make `debug.gem` use IRB as the debugging console.\n\nTo learn more about debugging with IRB, see [Debugging with IRB](https://ruby.github.io/irb/#label-Debugging+with+IRB).\n\n## Documentation\n\nhttps://ruby.github.io/irb/ provides a comprehensive guide to IRB's features and usage.\n\n## Configuration\n\nSee the [Configuration page](https://ruby.github.io/irb/Configurations_md.html) in the documentation.\n\n## Extending IRB\n\nIRB `v1.13.0` and later versions allows users/libraries to extend its functionality through official APIs.\n\nFor more information, please visit the [IRB Extension Guide](https://ruby.github.io/irb/EXTEND_IRB_md.html).\n\n## Contributing\n\nSee [CONTRIBUTING.md](./CONTRIBUTING.md) for more information.\n\n## Releasing\n\n```\nrake release\ngh release create vX.Y.Z --generate-notes\n```\n\n## License\n\nThe gem is available as open source under the terms of the [2-Clause BSD License](https://opensource.org/licenses/BSD-2-Clause).\n","funding_links":[],"categories":["Ruby"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fruby%2Firb","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fruby%2Firb","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fruby%2Firb/lists"}