| Age | Commit message (Collapse) | Author |
|
* Update reline-0.5.7
* Update irb-1.13.1
|
|
(https://github.com/ruby/irb/pull/784)
* Page evaluation result's output
This will make it easier to work with long output that exceeds the terminal's height.
* Use consistent TERM in rendering tests
This makes sure we get consistent result on all platforms.
https://github.com/ruby/irb/commit/4fedce93d3
|
|
implementation
(https://github.com/ruby/irb/pull/772)
https://github.com/ruby/irb/commit/a4868a5373
|
|
prompt
(https://github.com/ruby/irb/pull/791)
Currently, IRB just terminates if `main.to_s` raises while IRB
constructs the prompt string. This can easily happen if the user wants
to start an IRB session in the instance scope of an uninitialized
object, for example:
```
class C
def initialize
binding.irb
@values = []
end
def to_s = @values.join(',') # raises if uninitialized
end
C.new
```
This patch makes IRB rescue from such an exception and displays the
class name of the exception instead of `main.to_s` to indicate some
error has occurred.
We may display more detailed information about the exception, but this
patch chooses not to do so because 1) the prompt has limited space,
2) users can evaluate `to_s` in IRB to examine the error if they want,
and 3) obtaining the details can also raise, which requires nested
exception handling and can be complicated.
https://github.com/ruby/irb/commit/412ab26067
|
|
This reverts commit 5398bbcbab702907430ee019d07f5dcf2b0ce4af.
We explicitly load rubygems at rubygems_ext.rb
https://github.com/rubygems/rubygems/commit/8840d8507be72ff32bcbbdfb14e0b54efb364ffa
|
|
Revert "[ruby/irb] Revert "Skip TypeCompletion test in ruby ci"
This reverts commit 589e2b6782f17d5a1d55021c0395d5d73224e9da.
|
|
(https://github.com/ruby/irb/pull/748)"
(https://github.com/ruby/irb/pull/755)
This reverts commit https://github.com/ruby/irb/commit/d394af0bbce4.
https://github.com/ruby/irb/commit/a9d0145115
|
|
(https://github.com/ruby/irb/pull/748)
https://github.com/ruby/irb/commit/d394af0bbc
|
|
(https://github.com/ruby/irb/pull/708)
* Add completor using prism and rbs
* Add TypeCompletion test
* Switchable completors: RegexpCompletor and TypeCompletion::Completor
* Add completion info to irb_info
* Complete reserved words
* Fix [*] (*) {**} and prism's change of KeywordParameterNode
* Fix require, frozen_string_literal
* Drop prism<=0.16.0 support
* Add Completor.last_completion_error for debug report
* Retrieve `self` and `Module.nesting` in more safe way
* Support BasicObject
* Handle lvar and ivar get exception correctly
* Skip ivar reference test of non-self object in ruby < 3.2
* BaseScope to RootScope, move method objects constant under Methods
* Remove unused Splat struct
* Drop deeply nested array/hash type calculation from actual object. Now, calculation depth is 1
* Refactor loading rbs in test, change preload_in_thread not to cache Thread object
* Use new option added in prism 0.17.1 to parse code with localvars
* Add Prism version check and warn when :type completor cannot be enabled
* build_type_completor should skip truffleruby (because endless method definition is not supported)
https://github.com/ruby/irb/commit/1048c7ed7a
|
|
(https://github.com/ruby/irb/pull/701)
* Remove instance variable prompt and line_no from RubyLex
* Fix prompt test
* Rename prompt generating method and make it private
https://github.com/ruby/irb/commit/1ceb97fe2e
|
|
TESTS='reline irb'`
(https://github.com/ruby/irb/pull/722)
* Specify TestInputMethod in test to avoid RelineInputMethod to be used
* Reset Reline in teardown to avoid test failure of `make test-all TESTS="irb reline"`
https://github.com/ruby/irb/commit/5d67967eb1
|
|
* Encoding should be saved before creating Irb objects
* Fix unused local warning
https://github.com/ruby/irb/commit/036ec31034
|
|
(https://github.com/ruby/irb/pull/691)
They were removed in #685, but we should still keep them to avoid breaking
changes to tools like Chef.
https://github.com/chef/chef/blob/533ff089479763f29045e4e6ddf388b73fc99338/lib/chef/shell.rb#L138
https://github.com/ruby/irb/commit/b585e0c835
|
|
(https://github.com/ruby/irb/pull/685)
https://github.com/ruby/irb/commit/66e69fa0dc
|
|
(https://github.com/ruby/irb/pull/670)
Since assignment check relies on tokenization with `Ripper`, it feels like
the responsibility of `RubyLex`. `Irb#eval_input` should simply get the result
when calling `each_top_level_statement` on `RubyLex`.
https://github.com/ruby/irb/commit/89d1adb3fd
|
|
the value is always nil
(https://github.com/ruby/irb/pull/617)
https://github.com/ruby/irb/commit/62691384f8
|
|
of prefix
(https://github.com/ruby/irb/pull/603)
https://github.com/ruby/irb/commit/359cb28def
|
|
(https://github.com/ruby/irb/pull/555)
* Remove all Ruby 2.6 support
* Drop Ruby 2.6 specific testing conditions
* Only run Ruby 2.7+ on CI
* Bump Ruby requirement to 2.7+
https://github.com/ruby/irb/commit/3f714b616c
|
|
(https://github.com/ruby/irb/pull/541)
https://github.com/ruby/irb/commit/1dc2a406a3
|
|
(https://github.com/ruby/irb/pull/527)
https://github.com/ruby/irb/commit/8473d0bc0f
Co-authored-by: Stan Lo <stan.lo@shopify.com>
|
|
(https://github.com/ruby/irb/pull/535)
https://github.com/ruby/irb/commit/09f16259db
|
|
If the main object of the context has `#delete` method, the following
warning is printed.
```
irb: warn: can't alias delete from irb_delete.
```
https://github.com/ruby/irb/commit/00b39be61f
|
|
string
(https://github.com/ruby/irb/pull/528)
* Handle long inspect and control characters in prompt string
* Add constants for prompt truncate length, omission and replace pattern
* Simply compare string instead of regexp in prompt truncation test
|
|
`IRB::Inspector#inspect_value` errors
(https://github.com/ruby/irb/pull/511)
**Before**
```
irb(main):001:0> c = Cat.new "foo"
(Object doesn't support #inspect)
=>
```
**After**
```
irb(main):001:0> c = Cat.new "foo"
An error occurred when inspecting the object: #<NoMethodError: undefined method `is_a?' for foo:Cat
if obj.is_a?(String)
^^^^^^>
Result of Kernel#inspect: #<Cat:0x0000000109090d80 @name="foo">
=>
```
|
|
(https://github.com/ruby/irb/pull/514)
* Improve encoding error test case
The test input IRB currently uses happen to hit a compatibility bug in
TruffleRuby, which has been documented in
https://github.com/oracle/truffleruby/issues/2848
Although it'll eventually be fixed, we can make the test case support TruffleRuby
now by tweaking it just a little bit.
Co-authored-by: Kevin Menard <kevin@nirvdrum.com>
* Remove redundant TruffleRuby omits/pends
Co-authored-by: Kevin Menard <kevin@nirvdrum.com>
* Use a different way to test warning emission
The test case was added in https://github.com/ruby/irb/commit/d08ef68d2dfbf041d363f65686d78a937954513c
to verify that IRB emits Ruby warning as expected.
But the subject it uses relies on CRuby's regexp engine, which isn't always
used in other language implementations, like TruffleRuby. That's why we
ended up skipping TruffleRuby in this test case.
Since the test isn't about regexp itself, we can change the testing subject
and just remove the special condition for TruffleRuby.
Co-authored-by: Kevin Menard <kevin@nirvdrum.com>
---------
https://github.com/ruby/irb/commit/6fdf4f3e97
Co-authored-by: Kevin Menard <kevin@nirvdrum.com>
|
|
Because it has reached EOL for more than 1.5 years and it won't be
supported by the next reline version either.
|
|
https://github.com/ruby/irb/commit/4b831d02e1
|
|
conveniently
(https://github.com/ruby/irb/pull/429)
* Create a base TestIRB::TestCase class
* Save/restore encodings for tests that initializes InputMethod classes
Because `RelineInputMethod#initializes` calls `set_encoding`, which
changes stdio/out/err and Encoding's default encoding values, we need to
make sure any test that directly or indirectly (e.g. through Context)
initializes `RelineInputMethod` restores encodings.
`ReadlineInputMethod` also changes encodings but currently no tests
cover it.
* Remove unnecessary TestHelper module
Since we now have a base TestCase, without_rdoc can just live there.
https://github.com/ruby/irb/commit/c2874ec121
|
|
(https://github.com/ruby/irb/pull/397)
* Use local_variables for colorize, code_block_open check, nesting_level and assignment_expression check
* Check if expression is an assignment BEFORE evaluating it. evaluate might define new localvars and change result of assignment_expression?
* Add local_variables dependent code test
* pend local variable dependent test on truffleruby
code_block_open is not working on truffleruby
* Always pass context to RubyLex#lex
* Rename local_variable_assign_code generator method name
* Add assignment expression truncate test
* Add Context#local_variables and make generate_local_variables_assign_code more simple
* Update lib/irb/input-method.rb
Co-authored-by: Stan Lo <stan001212@gmail.com>
* Add a comment why assignment expression check should be done before evaluate
https://github.com/ruby/irb/commit/c8b3877281
Co-authored-by: Stan Lo <stan001212@gmail.com>
Co-authored-by: Takashi Kokubun <takashikkbn@gmail.com>
|
|
Some context tests assigns USE_COLORIZE to false and never change it
back. This can potentially affect other tests' result as the default
should be nil (activated) instead.
https://github.com/ruby/irb/commit/986eb16ece
|
|
* Use colorable: argument as the only coloring control
* Centalize color controling logic at Color.colorable?
There are 2 requirements for coloring output:
1. It's supported on the platform
2. The user wants it: `IRB.conf[:USE_COLORIZE] == true`
Right now we check 1 and 2 separately whenever we colorize things.
But it's error-prone because while 1 is the default of `colorable`
parameter, 2 always need to manually checked. When 2 is overlooked, it
causes issues like https://github.com/ruby/irb/pull/362
And there's 0 case where we may want to colorize even when the user
disables it. So I think we should merge 2 into `Color.colorable?` so it
can be automatically picked up.
* Add tests for all inspect modes
* Simplify inspectors' coloring logic
* Replace use_colorize? with Color.colorable?
* Remove Context#use_colorize cause it's redundant
https://github.com/ruby/irb/commit/1c53023ac4
|
|
Fix https://github.com/ruby/irb/pull/353
https://github.com/ruby/irb/commit/7db93f9326
|
|
https://github.com/ruby/irb/commit/e024ab716b
|
|
When outputting a (possibly truncated) value, IRB will query the
window size. However, if IRB was piped to another process, stdout
will no longer be a TTY and will not support the `winsize` method.
This fix ensure that stdout is a TTY.
https://github.com/ruby/irb/commit/125de5eeea
|
|
it for tests
https://github.com/ruby/irb/commit/de561cafeb
|
|
https://github.com/ruby/irb/commit/7ee15bc668
|
|
https://github.com/ruby/irb/commit/fb637bc68f
|
|
https://github.com/ruby/irb/commit/b153d587a1
|
|
https://github.com/ruby/irb/commit/077e4ae7de
|
|
https://github.com/ruby/irb/commit/f441ce35bf
|
|
|
|
https://github.com/ruby/irb/commit/7aed8fe3b1
|
|
http://ci.rvm.jp/logfiles/brlog.trunk-random1.20210119-074232
https://github.com/ruby/irb/commit/ea87592d4a
|
|
https://github.com/ruby/irb/commit/8e9e6c4037
|
|
* due to the difference of backtrace pointed out by @aycabta
https://github.com/ruby/irb/commit/5e00a0ae61
|
|
https://github.com/ruby/irb/commit/fcf6b34bc5
|
|
https://github.com/ruby/irb/commit/30dc5d43fe
|
|
[Bug #17466]
https://github.com/ruby/irb/commit/1c76845cca
|
|
* moved rescue clause to `#inspect_value` to catch all failures in inspectors
* test with all (currently five kind of) inspect modes
- tweaked the input due to only `Marshal` can inspect(dump) a `BasicObject`
https://github.com/ruby/irb/commit/9d112fab8e
|
|
https://github.com/ruby/irb/commit/7723ade899
|