summaryrefslogtreecommitdiff
path: root/lib/irb.rb
AgeCommit message (Collapse)Author
2021-02-27[ruby/irb] Update help message for next context-mode of 4Jeremy Evans
While here, fixing tab/space issues in help message, and sync rdoc for IRB class to match the help message. https://github.com/ruby/irb/commit/ef8e3901cc
2021-01-27[ruby/irb] use `RubyLex::TerminateLineInput` appropriately [Bug #17564]Nobuhiro IMAI
* using the appropriciate exception instead of `break` so that the session can be continue after the `irb_source` and `irb_load` commands * suppress extra new line due to one more `#prompt` call https://github.com/ruby/irb/commit/bdefaa7cfd
2021-01-18[ruby/irb] handle repeated exception separatelyNobuhiro IMAI
https://github.com/ruby/irb/commit/fcf6b34bc5
2021-01-08[ruby/irb] Fix comment, irb gem supports 2.5.0 or olderaycabta
https://github.com/ruby/irb/commit/36118015ba
2021-01-08[ruby/irb] Fix BACK_TRACE_LIMIT logicaycabta
https://github.com/ruby/irb/commit/30dc5d43fe
2021-01-08[ruby/irb] Use Exception#full_message to show backtrace in the correct orderaycabta
[Bug #17466] https://github.com/ruby/irb/commit/1c76845cca
2021-01-08[ruby/irb] fix typo in `IRB::Irb#convert_invalid_byte_sequence`Nobuhiro IMAI
https://github.com/ruby/irb/commit/d09d3c3d68
2021-01-05[ruby/irb] Escape invalid byte sequence in Exceptionaycabta
This fixes ruby/irb#141. https://github.com/ruby/irb/commit/0815317d42
2020-12-22[ruby/irb] Support arg for measure commandaycabta
https://github.com/ruby/irb/commit/b43f35d8f3
2020-12-20[ruby/irb] Add measure commandaycabta
You can use "measure" command to check performance in IRB like below: irb(main):001:0> 3 => 3 irb(main):002:0> measure TIME is added. => nil irb(main):003:0> 3 processing time: 0.000058s => 3 irb(main):004:0> measure :off => nil irb(main):005:0> 3 => 3 You can set "measure :on" by "IRB.conf[:MEASURE] = true" in .irbrc, and, also, set custom performance check method: IRB.conf[:MEASURE_PROC][:CUSTOM] = proc { |context, code, line_no, &block| time = Time.now result = block.() now = Time.now puts 'custom processing time: %fs' % (Time.now - time) if IRB.conf[:MEASURE] result } https://github.com/ruby/irb/commit/3899eaf2e2
2020-11-22[ruby/irb] Stop using bang version for #inspect of resultaycabta
https://github.com/ruby/irb/commit/fc1426d34e
2020-10-22Fix small typo in comment in lib/irb.cAndrew Kerr
Notes: Merged: https://github.com/ruby/ruby/pull/3688
2020-09-19[ruby/irb] Drop OMIT_ON_ASSIGNMENT and add :truncate option for ↵aycabta
ECHO_ON_ASSIGNMENT https://github.com/ruby/irb/commit/4c89b0775b
2020-09-14[ruby/irb] Omit output if first line of multiline is too longaycabta
https://github.com/ruby/irb/commit/0feeae38c5
2020-09-14[ruby/irb] Add OMIT_ON_ASSIGNMENTaycabta
Omit the results evaluated at assignment if they are too long. The behavior of ECHO_ON_ASSIGNMENT being on by default is hard to understand, so I change it to off by default. Instead, we turn OMIT_ON_ASSIGNMENT on by default. The result is displayed on assignment, but it will always be short and within one line of the screen. https://github.com/ruby/irb/commit/c5ea79d5ce
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