summaryrefslogtreecommitdiff
path: root/lib/irb.rb
AgeCommit message (Collapse)Author
2020-08-18[ruby/irb] Prefer require_relative to load the files in this libraryNobuyoshi Nakada
https://github.com/ruby/irb/commit/0ac3bc7296
2020-04-07[DOC] get rid of parsing as TIDYLINK unintentionallyNobuyoshi Nakada
2020-03-26[ruby/irb] Suppress crashing when EncodingError has occurred without linenoaycabta
https://github.com/ruby/irb/commit/13572d8cdc
2020-03-26[ruby/irb] Detect multiple lines output simplifyaycabta
The old implementation performance test code: require 'objspace' puts "%.5g MB" % (ObjectSpace.memsize_of_all * 0.001 * 0.001) /\A.*\Z/ !~ ('abc' * 20_000_000) puts "%.5g MB" % (ObjectSpace.memsize_of_all * 0.001 * 0.001) and run `time test.rb`: 2.5868 MB 62.226 MB real 0m1.307s user 0m0.452s sys 0m0.797s The new implementation performance test code: require 'objspace' puts "%.5g MB" % (ObjectSpace.memsize_of_all * 0.001 * 0.001) ('abc' * 20_000_000).include?("\n") puts "%.5g MB" % (ObjectSpace.memsize_of_all * 0.001 * 0.001) and run `time test.rb`: 2.5861 MB 62.226 MB real 0m0.132s user 0m0.088s sys 0m0.042s https://github.com/ruby/irb/commit/40d6610baf
2020-02-02[ruby/irb] Add a new easter egg: dancing rubyYusuke Endoh
https://github.com/ruby/irb/commit/e37dc7e58e
2020-01-21[ruby/irb] [ruby/irb] Rewrite an expression to detect multilineKenta Murata
https://github.com/ruby/irb/commit/ed5cf375a6 https://github.com/ruby/irb/commit/5b7bbf9c34
2020-01-21[ruby/irb] Add newline_before_multiline_outputKenta Murata
https://github.com/ruby/irb/commit/9eb1801a66
2019-12-24[ruby/irb] Fix typoMarcus Stollsteimer
https://github.com/ruby/irb/commit/4bb1340687
2019-12-20Fixed misspellingsNobuyoshi Nakada
Fixed misspellings reported at [Bug #16437], for default gems.
2019-11-25Remove e2mmap dependencyaycabta
2019-11-21Use more strict regexp to avoid to match naninanirb.rbKazuhiro NISHIYAMA
2019-11-21Use singleline/multiline instead of readline/reidlineaycabta
2019-11-13Suppress warnings except for when last evaluationaycabta
Co-authored-by: Kazuhiro NISHIYAMA <zn@mbf.nifty.com>
2019-11-05Only untaint line on Ruby <2.7Jeremy Evans
Untaint is deprecated and has no effect on Ruby 2.7+.
2019-10-26IRB: Document command evaluation history.zverok
Notes: Merged: https://github.com/ruby/ruby/pull/2615
2019-10-24Remove unsused output_method argumentJeremy Evans
Fixes Ruby Bug 9876.
2019-10-11set real path to __FILE__ and __dir__ in Binding#irbtakkanm
When reading Binding#irb, the file of the calling source is reflected in __FILE__ and __dir__. Notes: Merged: https://github.com/ruby/ruby/pull/1896
2019-08-16Don't echo results of assignment expressionsSteven Willis
2019-08-06Revert "Don't echo results of assignment expressions"aycabta
This reverts commit 1ee88c51b3c319b74b69540e111e4a1c24833cad.
2019-08-06Don't echo results of assignment expressionsSteven Willis
2019-08-03Use source_location instead of eval(__FILE__,binding) in Binding#irbYusuke Endoh
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]
2019-07-15Check wether prompt_i is nilaycabta
2019-07-15Save history in IRB is enabled by defaultaycabta
2019-07-15Auto indent in IRB is enabled by defaultaycabta
2019-07-01Show "-" if indent level is negativeaycabta
2019-06-19Use IRB.conf[:AUTO_INDENT] setting in multiline modeaycabta
2019-06-19Avoid auto indent in prompt when dynamic auto indentaycabta
2019-06-14irb.rb: [DOC] the default prompt includes :PROMPT_N [ci skip]Nobuyoshi Nakada
2019-06-14Use Reline.prompt_proc in IRBaycabta
2019-05-25Use Reline as Reidline multiline editor in IRBaycabta
2019-05-21Add --colorize and --nocolorize options to IRBaycabta
2019-04-30Use Ripper for IRBaycabta
The debug option of IRB is deleted because it's just for IRB's pure Ruby parser.
2019-04-26Fix rdoc in 52cfb17086Nobuyoshi Nakada
2019-04-26make sync-default-gems GEM=irbTakashi Kokubun
from https://github.com/ruby/irb/commit/e6739d8c66dc78562930adb0b96935c9b38acf74
2019-04-26Colorize IRB's code_around_bindingTakashi Kokubun
Closes: https://github.com/ruby/ruby/pull/2150
2019-04-23Revert "IRB is improved with Reline and RDoc, take 2"Nobuyoshi Nakada
Accidentally merged when 89271d4a3733bc5e70e9c56b4bd12f277e699c42 "Adjusted indents".
2019-04-23IRB is improved with Reline and RDoc, take 2aycabta
2019-04-21Revert "IRB is improved with Reline and RDoc"aycabta
This reverts commit 7f273ac6d0f05208b5b228da95205e20c0e8286c. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67691 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-04-20IRB is improved with Reline and RDocaycabta
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
2019-01-13Fix remaining syntax errors in Binding#irb docsnobu
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
2018-12-12Backport https://github.com/ruby/irb/pull/2hsbt
Fix and improve version string by @stomar git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66356 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-11-14Fix syntax on Binding.irb documentation [ci skip]k0kubun
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
2018-11-12lib/irb.rb: fix up r65674kazu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65676 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-11-12Document binding.irb on Binding [ci skip]k0kubun
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
2018-10-20Merge irb from github repository.hsbt
* IRB::VERSION is available on irb session. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65216 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-05-12irb.rb: update `_`nobu
* 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
2018-04-14irb.rb: restore the last errornobu
* 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
2018-04-13irb.rb: backtrace ordernobu
* 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
2018-04-13irb.rb: hoist out handle_exceptionnobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63144 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-25irb.rb: fix highlightnobu
* 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