aboutsummaryrefslogtreecommitdiffstats
path: root/lib/irb.rb
Commit message (Collapse)AuthorAgeFilesLines
* [ruby/irb] Fix typoMarcus Stollsteimer2019-12-241-1/+1
| | | | https://github.com/ruby/irb/commit/4bb1340687
* Fixed misspellingsNobuyoshi Nakada2019-12-201-1/+1
| | | | Fixed misspellings reported at [Bug #16437], for default gems.
* Remove e2mmap dependencyaycabta2019-11-251-1/+0
|
* Use more strict regexp to avoid to match naninanirb.rbKazuhiro NISHIYAMA2019-11-211-1/+1
|
* Use singleline/multiline instead of readline/reidlineaycabta2019-11-211-9/+9
|
* Suppress warnings except for when last evaluationaycabta2019-11-131-1/+4
| | | | Co-authored-by: Kazuhiro NISHIYAMA <zn@mbf.nifty.com>
* Only untaint line on Ruby <2.7Jeremy Evans2019-11-051-1/+1
| | | | Untaint is deprecated and has no effect on Ruby 2.7+.
* IRB: Document command evaluation history.zverok2019-10-261-2/+12
|
* Remove unsused output_method argumentJeremy Evans2019-10-241-2/+2
| | | | Fixes Ruby Bug 9876.
* set real path to __FILE__ and __dir__ in Binding#irbtakkanm2019-10-111-1/+3
| | | | When reading Binding#irb, the file of the calling source is reflected in __FILE__ and __dir__.
* Don't echo results of assignment expressionsSteven Willis2019-08-161-1/+43
|
* Revert "Don't echo results of assignment expressions"aycabta2019-08-061-43/+1
| | | | This reverts commit 1ee88c51b3c319b74b69540e111e4a1c24833cad.
* Don't echo results of assignment expressionsSteven Willis2019-08-061-1/+43
|
* Use source_location instead of eval(__FILE__,binding) in Binding#irbYusuke Endoh2019-08-031-1/+1
| | | | | | | | | | | | | e9e17cbc051e894dfd27eda5feca2939f65552db (enabling the warning by default) caused a warning in test-spec: ``` /data/chkbuild/tmp/build/20190802T213005Z/ruby/spec/ruby/core/binding/irb_spec.rb Binding#irb - creates an IRB session with the binding in scope/data/chkbuild/tmp/build/20190802T213005Z/ruby/spec/ruby/core/binding/fixtures/irb.rb:3: warning: __FILE__ in eval may not return location in binding; use Binding#source_location instead ``` https://rubyci.org/logs/rubyci.s3.amazonaws.com/debian/ruby-master/log/20190802T213005Z.log.html.gz ref: [Bug #4352]
* Check wether prompt_i is nilaycabta2019-07-151-1/+2
|
* Save history in IRB is enabled by defaultaycabta2019-07-151-5/+4
|
* Auto indent in IRB is enabled by defaultaycabta2019-07-151-3/+3
|
* Show "-" if indent level is negativeaycabta2019-07-011-3/+11
|
* Use IRB.conf[:AUTO_INDENT] setting in multiline modeaycabta2019-06-191-0/+2
|
* Avoid auto indent in prompt when dynamic auto indentaycabta2019-06-191-1/+1
|
* irb.rb: [DOC] the default prompt includes :PROMPT_N [ci skip]Nobuyoshi Nakada2019-06-141-0/+1
|
* Use Reline.prompt_proc in IRBaycabta2019-06-141-0/+1
|
* Use Reline as Reidline multiline editor in IRBaycabta2019-05-251-2/+4
|
* Add --colorize and --nocolorize options to IRBaycabta2019-05-211-0/+3
|
* Use Ripper for IRBaycabta2019-04-301-3/+0
| | | | | The debug option of IRB is deleted because it's just for IRB's pure Ruby parser.
* Fix rdoc in 52cfb17086Nobuyoshi Nakada2019-04-261-3/+3
|
* make sync-default-gems GEM=irbTakashi Kokubun2019-04-261-3/+3
| | | | from https://github.com/ruby/irb/commit/e6739d8c66dc78562930adb0b96935c9b38acf74
* Colorize IRB's code_around_bindingTakashi Kokubun2019-04-261-0/+1
| | | | Closes: https://github.com/ruby/ruby/pull/2150
* Revert "IRB is improved with Reline and RDoc, take 2"Nobuyoshi Nakada2019-04-231-4/+5
| | | | | Accidentally merged when 89271d4a3733bc5e70e9c56b4bd12f277e699c42 "Adjusted indents".
* IRB is improved with Reline and RDoc, take 2aycabta2019-04-231-5/+4
|
* Revert "IRB is improved with Reline and RDoc"aycabta2019-04-211-0/+4
| | | | | | This reverts commit 7f273ac6d0f05208b5b228da95205e20c0e8286c. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67691 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* IRB is improved with Reline and RDocaycabta2019-04-201-4/+0
| | | | | | | | Reline is a readline stdlib compatible library. It also supports multiline input. IRB is improved with Reline and supports multiline. Besides, supports showing documents when completed. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67645 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Fix remaining syntax errors in Binding#irb docsnobu2019-01-131-3/+3
| | | | | | | | | | Apologies for catching those so late. [Fix GH-2067] [ci skip] From: Olivier Lacan <hi@olivierlacan.com> git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66801 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Backport https://github.com/ruby/irb/pull/2hsbt2018-12-121-2/+1
| | | | | | Fix and improve version string by @stomar git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66356 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Fix syntax on Binding.irb documentation [ci skip]k0kubun2018-11-141-4/+4
| | | | | | | | | | | There was incorrect backticks (`) instead of plus signs to denote method references, and a typo. [Fix GH-2016] From: Olivier Lacan <hi@olivierlacan.com> git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65729 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* lib/irb.rb: fix up r65674kazu2018-11-121-3/+3
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65676 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Document binding.irb on Binding [ci skip]k0kubun2018-11-121-1/+57
| | | | | | | | | | | | | | | | For some reason this very useful method was undocumented since it was added in 493e48897421d176a8faf0f0820323d79ecdf94a which makes finding it in the docs impossible before this change. I've added a detailed example with sample code because it's one of the most powerful tools to debug Ruby code and I believe very few people are aware of it due to the lack of documentation. [Fix GH-2010] From: Olivier Lacan <hi@olivierlacan.com> git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65674 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Merge irb from github repository.hsbt2018-10-201-1/+2
| | | | | | * IRB::VERSION is available on irb session. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65216 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* irb.rb: update `_`nobu2018-05-121-7/+6
| | | | | | | * lib/irb.rb (IRB::Irb#eval_input): update `_` after exception. [ruby-core:86989] [Bug #14749] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63409 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* irb.rb: restore the last errornobu2018-04-141-1/+4
| | | | | | | | | | * lib/irb.rb (eval_input): restore the last error `$!`, as the previous result. [Feature #14684] * lib/irb/context.rb (evaluate): add `exception` keyword argument to set the last error. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63150 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* irb.rb: backtrace ordernobu2018-04-131-10/+28
| | | | | | | * lib/irb.rb (handle_exception): show backtrace from the topmost if stdout is not a tty. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63146 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* irb.rb: hoist out handle_exceptionnobu2018-04-131-33/+37
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63144 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* irb.rb: fix highlightnobu2017-12-251-1/+3
| | | | | | | * lib/irb.rb (IRB::Irb#eval_input): fix highlight for multiple lines exception messages. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61469 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* lib/irb.rb: highlight exceptionsnobu2017-12-241-2/+8
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61435 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* lib/irb.rb: simplified backtrace filteringnobu2017-12-241-18/+11
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61434 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Print backtrace in reverse order on IRB toosorah2017-12-231-6/+11
| | | | | | [Feature #8861] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61431 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* irb.rb: preserve ARGV on binding.irbk0kubun2017-12-121-1/+1
| | | | | | | | | | | | | | | This is not perfectly good solution (at least we don't want to have ARGV as default value of `argv` argument), but unfortunately IRB.setup and IRB.parse_opts are public methods and we can't make breaking change to those methods. We may deprecate using them and then make them private in the future, but the removal should not be in Ruby 2.5. So I kept their interface for now. [Bug #14162] [close GH-1770] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61149 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* prelude.rb: suppress redefinition warningsnobu2017-12-011-1/+0
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60952 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* irb.rb: show source around binding.irb on startk0kubun2017-11-241-1/+3
| | | | | | [Feature #14124] [ruby-dev:50319] [close GH-1764] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60888 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Removed obsoleted safe level checks on irb.hsbt2017-10-211-3/+0
| | | | | | | | https://github.com/ruby/ruby/pull/1713 Patch by @y-yagi [fix GH-1713] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60278 b2dd03c8-39d4-4d8f-98ff-823fe69b080e