aboutsummaryrefslogtreecommitdiffstats
path: root/lib/irb
Commit message (Collapse)AuthorAgeFilesLines
* Use colorized IRB on Windows without checking `TERM`NAKAMURA Usaku2019-05-231-1/+1
|
* Copy config to make IRB::Context#use_colorize? functionalTakashi Kokubun2019-05-211-0/+1
| | | | | | on initialize This fixes https://github.com/ruby/ruby/pull/2188
* Symbol beginning token may take a constant tokenaycabta2019-05-211-1/+1
|
* IRB should eval and show an error when only `.` is inputtedaycabta2019-05-211-1/+7
|
* Check whether IRB.conf is nil in IRB::WorkSpace#code_around_bindingaycabta2019-05-211-2/+6
|
* Add --colorize and --nocolorize options to IRBaycabta2019-05-216-4/+23
|
* Use Ripper for IRBaycabta2019-04-305-1094/+192
| | | | | The debug option of IRB is deleted because it's just for IRB's pure Ruby parser.
* make sync-default-gems GEM=irbTakashi Kokubun2019-04-281-6/+6
| | | | | | from https://github.com/ruby/irb/commit/e8e79d569ed59fe4ed4fbca968917ce799f02a5e. This colorizes Range object on IRB inspect.
* make sync-default-gems GEM=irbTakashi Kokubun2019-04-281-2/+3
| | | | | | from https://github.com/ruby/irb/commit/44301d382794d91e2caa16dd4efe62439e0041d8. This includes some fixes for string interpolation highlight fixes.
* make sync-default-gems GEM=irbTakashi Kokubun2019-04-281-1/+1
| | | | | | | | | from https://github.com/ruby/irb/commit/89e9add06da3fd5f9ce91a2f5fa0b0190aa5d42f. This adds syntax highlight support for Module on inspect. In addition to that, I'm adding a trailing space in test_color.rb for testing ruby-commit-hook's auto-style.
* make sync-default-gems GEM=irbTakashi Kokubun2019-04-271-0/+4
| | | | | Synced from https://github.com/ruby/irb/commit/5feb361ed80736efa5b2c2b629837ec2a5fc2cdb. This includes a support to colorize named Class instance on IRB inspect.
* make sync-default-gems GEM=irbTakashi Kokubun2019-04-271-1/+1
| | | | Backport changes from ruby/irb.
* suppress redefinition warningsnaruse2019-04-271-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67679 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Prefer block_given? to iterator?nobu2019-04-271-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66866 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Revert "Class instance should be also colorable on IRB"Takashi Kokubun2019-04-261-1/+1
| | | | | | This reverts commit 6669c966d2744f21315047d1725ad4494d15b8ba. It seems to make tests fail... let me fix this later.
* Class instance should be also colorable on IRBTakashi Kokubun2019-04-261-1/+1
| | | | | | inspect. Change is made with: `$ make -C .ruby sync-default-gems GEM=irb`
* make sync-default-gems GEM=irbTakashi Kokubun2019-04-264-23/+31
| | | | from https://github.com/ruby/irb/commit/e6739d8c66dc78562930adb0b96935c9b38acf74
* Syntax-highlight yield in IRBTakashi Kokubun2019-04-261-1/+1
|
* Support highlighting Regexp in inspectTakashi Kokubun2019-04-261-3/+3
|
* Do not color IRB output on 'dumb' TERMPocket78782019-04-261-1/+1
| | | | | Co-Authored-By: k0kubun <takashikkbn@gmail.com> Closes: https://github.com/ruby/ruby/pull/2150
* Colorize IRB's inspect resultTakashi Kokubun2019-04-262-2/+25
| | | | Closes: https://github.com/ruby/ruby/pull/2150
* Colorize IRB's code_around_bindingTakashi Kokubun2019-04-262-4/+90
| | | | Closes: https://github.com/ruby/ruby/pull/2150
* Revert "IRB is improved with Reline and RDoc, take 2"Nobuyoshi Nakada2019-04-237-338/+1117
| | | | | Accidentally merged when 89271d4a3733bc5e70e9c56b4bd12f277e699c42 "Adjusted indents".
* IRB is improved with Reline and RDoc, take 2aycabta2019-04-237-1117/+338
|
* Revert "IRB is improved with Reline and RDoc"aycabta2019-04-217-207/+1097
| | | | | | This reverts commit 7f273ac6d0f05208b5b228da95205e20c0e8286c. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67691 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* suppress redefinition warningsnaruse2019-04-211-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67679 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* IRB is improved with Reline and RDocaycabta2019-04-207-1097/+207
| | | | | | | | 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
* Prefer block_given? to iterator?nobu2019-01-181-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66866 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Bump version to 1.0.0.hsbt2018-12-181-2/+2
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66433 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Backport https://github.com/ruby/irb/pull/2hsbt2018-12-121-1/+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
* lib/*: Prefer require_relative over require, remove explicit extensionmarcandre2018-11-0210-14/+14
| | | | | | [#15206] [Fix GH-1976] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65506 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* lib/*: Prefer require_relative over require.marcandre2018-11-028-10/+10
| | | | | | [#15206] [Fix GH-1976] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65505 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Try to load version file of github repository at first.hsbt2018-07-311-1/+6
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64145 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Fix filename in comment [ci skip]kazu2018-07-281-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64089 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Promote irb library to default gems.hsbt2018-07-092-1/+23
| | | | | | | | | * lib/irb/irb.gemspec: init. * lib/irb/version.rb: Set @RELEASE_VERSION value to IRB::VERSION for gemspec. * doc/*.rdoc: Move IRB entry to default gems category. * tool/sync_default_gems.rb: Add irb support. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63915 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* irb.rb: restore the last errornobu2018-04-141-1/+5
| | | | | | | | | | * 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/{context,workspace}.rb: use local_variable_setnobu2018-04-142-2/+10
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63149 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* irb/context.rb: using input-methodnobu2018-04-141-0/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63148 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Hash instead of Setnobu2018-03-131-3/+2
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62733 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Speed up func1.func2 completion by using Set for ignored modulesnobu2018-03-131-11/+28
| | | | | | | | | | | And thus avoiding Module#name calls. Those are slow, especially in larger projects, with lots of anonymous modules. [Fix GH-1798] From: Dmitry Gutov <dgutov@yandex.ru> git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62732 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* proc.c (bind_location): Add Binding#source_locationmame2017-12-261-1/+1
| | | | | | Fixes #14230 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61480 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Remove unnecessary `:`kazu2017-12-121-1/+1
| | | | | | | | | | | | | | Before: `.../irb/init.rb:280: warning: :LoadError: cannot load such file -- hoge` After: `.../irb/init.rb:280: warning: LoadError: cannot load such file -- hoge` [ci skip] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61175 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Add uplevel keyword to Kernel#warn and use itshyouhei2017-12-122-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If uplevel keyword is given, the warning message is prepended with caller file and line information and the string "warning: ". The use of the uplevel keyword makes Kernel#warn format output similar to how rb_warn formats output. This patch modifies net/ftp and net/imap to use Kernel#warn instead of $stderr.puts or $stderr.printf, since they are used for printing warnings. This makes lib/cgi/core and tempfile use $stderr.puts instead of warn for debug logging, since they are used for debug printing and not for warning. This does not modify bundler, rubygems, or rdoc, as those are maintained outside of ruby and probably wish to remain backwards compatible with older ruby versions. rb_warn_m code is originally from nobu, but I've changed it so that it only includes the path and lineno from uplevel (not the method), and also prepends the string "warning: ", to make it more similar to rb_warn. From: Jeremy Evans code@jeremyevans.net Signed-off-by: Urabe Shyouhei shyouhei@ruby-lang.org git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61155 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* irb/init.rb: make sure ARGV refers to toplevel onek0kubun2017-12-121-2/+2
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61151 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* irb.rb: preserve ARGV on binding.irbk0kubun2017-12-121-15/+15
| | | | | | | | | | | | | | | 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
* Fix TOCTTOU and avoid to read existing unreadable filekazu2017-11-241-2/+5
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60900 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* workspace.rb: one more spacenobu2017-11-241-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60897 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* workspace.rb: fix SCRIPT_LINES__nobu2017-11-241-9/+7
| | | | | | | | | * lib/irb/workspace.rb (code_around_binding): `SCRIPT_LINES__` values are arrays of lines. get file and line at once. moved loop-invariant format string. join without extra strings by `$,`. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60896 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* irb.rb: show source around binding.irb on startk0kubun2017-11-241-0/+21
| | | | | | [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
* Remove unnecessary `require 'thread'`kazu2017-10-082-3/+0
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60139 b2dd03c8-39d4-4d8f-98ff-823fe69b080e