| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
https://github.com/ruby/irb/commit/cef474a76a
|
|
|
|
|
|
| |
For example, the broken code "%www" will result in only one error token.
https://github.com/ruby/irb/commit/9fa39a7cf3
|
|
|
|
|
|
| |
ref. https://github.com/ruby/reline/pull/242
https://github.com/ruby/irb/commit/54f90cb6c9
|
|
|
|
|
|
|
|
|
| |
Use the start token as the indentation criteria so that it works properly in
heredoc.
ref. https://github.com/ruby/reline/pull/242
https://github.com/ruby/irb/commit/9704808dfd
|
|
|
|
|
|
| |
This fixes ruby/irb#158.
https://github.com/ruby/irb/commit/964643400b
|
|
|
|
|
|
| |
This closes ruby/irb#132.
https://github.com/ruby/irb/commit/43456dcf5e
|
|
|
|
| |
https://github.com/ruby/irb/commit/8b83fbef69
|
|
|
|
|
|
|
|
|
| |
Co-authored-by: manga_osyo <manga.osyo@gmail.com>
Co-authored-by: ima1zumi <mariimaizumi5@gmail.com>
https://github.com/ruby/irb/commit/c59a9be82f
https://github.com/ruby/reline/commit/a7922da16b
|
|
|
|
| |
https://github.com/ruby/irb/commit/26fd1a75cf
|
|
|
|
| |
https://github.com/ruby/irb/commit/f3c8edad2a
|
|
|
|
|
|
| |
https://github.com/ruby/irb/commit/babb122a48
https://github.com/ruby/reline/commit/e6dbcb3b42
|
|
|
|
| |
https://github.com/ruby/irb/commit/ce373417f3
|
|
|
|
|
|
| |
* Fixes #38
https://github.com/ruby/irb/commit/905fb8e52e
|
|
|
|
|
|
|
|
| |
implementation-private APIs
* Fixes https://github.com/ruby/irb/issues/133
https://github.com/ruby/irb/commit/5eb3ef3293
|
|
|
|
| |
https://github.com/ruby/irb/commit/2ff1295533
|
|
|
|
| |
https://github.com/ruby/irb/commit/f1a775af47
|
|
|
|
| |
https://github.com/ruby/irb/commit/8e3f81d428
|
|
|
|
| |
https://github.com/ruby/irb/commit/826ae909c9
|
| |
|
|
|
|
| |
https://github.com/ruby/irb/commit/6de1341f5e
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
nobu-san reviewed,
https://github.com/ruby/irb/pull/106#pullrequestreview-423400033
> How about lexer = Ripper::Lexer.new(";\n#{code}", nil, 0)?
> Encoding pragma is effective only at the beginning.
> And the semicolon and newline will be skipped because the position is before
> the initial pos.
I employ the way.
Co-authored-by: Nobuyoshi Nakada <nobu@ruby-lang.org>
https://github.com/ruby/irb/commit/e593cc65b7
|
|
|
|
| |
https://github.com/ruby/irb/commit/443e90af80
|
|
|
|
| |
https://github.com/ruby/irb/commit/6a457edbd1
|
|
|
|
| |
https://github.com/ruby/irb/commit/dc59afe4f6
|
|
|
|
| |
https://github.com/ruby/irb/commit/13572d8cdc
|
|
|
|
|
|
|
|
|
|
|
|
| |
A closed brace in auto-indent shouldn't affect the next brace in the same line,
but it behaves like below:
p() {
}
It's a bug.
https://github.com/ruby/irb/commit/fbe59e344f
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
https://github.com/ruby/irb/issues/55
If we had put multiple open braces on a line the with no closing brace
spaces_of_nest array keeps getting '0' added to it. This means that when
we pop off of this array we are saying that we should be in position zero
for the next line. This is an issue because we don't always want to be
in position 0 after a closing brace.
Example:
```
[[[
]
]
]
```
In the above example the 'spaces_of_nest' array looks like this after
the first line is entered: [0,0,0]. We really want to be indented 4
spaces for the 1st closing brace 2 for the 2nd and 0 for the 3rd. i.e.
we want it to be: [0,2,4].
We also saw this issue with a heredoc inside of an array.
```
[<<FOO]
hello
FOO
```
https://github.com/ruby/irb/commit/80c69c8272
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This commit fixes the check_newline_depth_difference method to multiple
open braces on one line into account. Before this change we were
subtracting from the depth in check_newline_depth_difference on
every open brace. This is the right thing to do if the opening and
closing brace are on the same line. For example in a method definition we
have an opening and closing parentheses we want to add 1 to our depth,
and then remove it.
```
def foo()
end
```
However this isn't the correct behavior when the brace spans multiple
lines. If a brace spans multiple lines we don't want to subtract from
check_newline_depth_difference and we want to treat the braces the same
way as we do `end` and allow check_corresponding_token_depth to pop the
correct depth.
Example of bad behavior:
```
def foo()
[
]
puts 'bar'
end
```
Example of desired behavior:
```
def foo()
[
]
puts 'bar'
end
```
https://github.com/ruby/irb/commit/7dc8af01e0
|
|
|
|
|
|
| |
Follow up of the previous commit
https://github.com/ruby/irb/commit/ab207353d3
|
|
|
|
|
|
| |
Fixes #47
https://github.com/ruby/irb/commit/6b8eca4635
|
| |
|
|
|
|
|
|
| |
This reverts commit 5e275dd2af4d9d24cdb1cfc0f232f348dae9c2cd.
...The @1 type numberd parameter is reverted from Ruby syntax.
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
meth do # the preceding token of "do" has EXPR_CMDARG
end
meth() do # the preceding token of "do" has EXPR_ENDFN
end
|
| |
|
|
|
|
| |
Co-authored-by: Kazuhiro NISHIYAMA <zn@mbf.nifty.com>
|
|
|
|
|
| |
A "do" what has followed a token what has EXPR_CMDARG is for a block,
and in other cases "do" is for "while", "until" or "for".
|
|
|
|
|
| |
RubyVM is specific to CRuby and not supported on JRuby. This is
the equivalent operation.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
| |
Example:
[
1, # this is not continuation line
2
]
|
| |
|
|
|
|
|
| |
v =
3 # auto indent
|
| |
|
| |
|
| |
|
| |
|