diff options
| author | Cody Cutrer <cody@instructure.com> | 2021-03-16 15:45:45 -0600 |
|---|---|---|
| committer | git <svn-admin@ruby-lang.org> | 2021-04-03 00:49:29 +0900 |
| commit | 3cab8c087f0093f2d4669c283be30d01f8e17d5d (patch) | |
| tree | f33cedacd01cd3596c9914eea32f28e3ce54572b /include/ruby | |
| parent | 7e93917458cdc67399e82233ff0f13e3c8bd7065 (diff) | |
[ruby/irb] process multi-line pastes as a single entity
this allows pasting leading-dot chained methods correctly:
```ruby
class A
def a; self; end
def b; true; end
end
a = A.new
a
.a
.b
```
will properly return `true` instead of erroring on the `.a` line:
```
irb(main):001:1* class A
irb(main):002:1* def a; self; end
irb(main):003:0> end
irb(main):004:0*
irb(main):005:0> a = A.new
irb(main):006:0*
irb(main):007:0> a
irb(main):008:0> .a
irb(main):009:0> .a
=> #<A:0x00007f984211fbe8>
```
https://github.com/ruby/irb/commit/45aeb52575
Diffstat (limited to 'include/ruby')
0 files changed, 0 insertions, 0 deletions
