ruby-core@ruby-lang.org archive (unofficial mirror)
 help / color / mirror / Atom feed
* [ruby-core:91867] [Ruby trunk Bug#15673] Number args + Ripper
       [not found] <redmine.issue-15673.20190318141322@ruby-lang.org>
@ 2019-03-18 14:13 ` kevin.deisz
  2019-03-18 18:20 ` [ruby-core:91871] " kevin.deisz
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 4+ messages in thread
From: kevin.deisz @ 2019-03-18 14:13 UTC (permalink / raw)
  To: ruby-core

Issue #15673 has been reported by kddeisz (Kevin Deisz).

----------------------------------------
Bug #15673: Number args + Ripper
https://bugs.ruby-lang.org/issues/15673

* Author: kddeisz (Kevin Deisz)
* Status: Open
* Priority: Normal
* Assignee: 
* Target version: 
* ruby -v: ruby 2.7.0dev (2019-03-18 trunk 67295) [x86_64-darwin18]
* Backport: 2.4: UNKNOWN, 2.5: UNKNOWN, 2.6: UNKNOWN
----------------------------------------
Hi there -

Love the new number args for blocks. When I run

``` ruby
[1, 2, 3].map { @1 * 2 }
```

everything works. However, when I run:

```ruby
require 'ripper'; Ripper.new('[1, 2, 3].map { @1 * 2 }').parse
```

it returns nothing and says there's an error. 




-- 
https://bugs.ruby-lang.org/

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [ruby-core:91871] [Ruby trunk Bug#15673] Number args + Ripper
       [not found] <redmine.issue-15673.20190318141322@ruby-lang.org>
  2019-03-18 14:13 ` [ruby-core:91867] [Ruby trunk Bug#15673] Number args + Ripper kevin.deisz
@ 2019-03-18 18:20 ` kevin.deisz
  2019-03-18 18:28 ` [ruby-core:91872] " kevin.deisz
  2019-03-18 19:33 ` [ruby-core:91874] " kevin.deisz
  3 siblings, 0 replies; 4+ messages in thread
From: kevin.deisz @ 2019-03-18 18:20 UTC (permalink / raw)
  To: ruby-core

Issue #15673 has been updated by kddeisz (Kevin Deisz).


To be clear, I mean that:

``` ruby
require 'ripper'; Ripper.new('[1, 2, 3].map { @1 * 2 }').tap(&:parse).error?
```

returns true


----------------------------------------
Bug #15673: Number args + Ripper
https://bugs.ruby-lang.org/issues/15673#change-77139

* Author: kddeisz (Kevin Deisz)
* Status: Open
* Priority: Normal
* Assignee: 
* Target version: 
* ruby -v: ruby 2.7.0dev (2019-03-18 trunk 67295) [x86_64-darwin18]
* Backport: 2.4: UNKNOWN, 2.5: UNKNOWN, 2.6: UNKNOWN
----------------------------------------
Hi there -

Love the new number args for blocks. When I run

``` ruby
[1, 2, 3].map { @1 * 2 }
```

everything works. However, when I run:

```ruby
require 'ripper'; Ripper.new('[1, 2, 3].map { @1 * 2 }').parse
```

it returns nothing and says there's an error. 




-- 
https://bugs.ruby-lang.org/

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [ruby-core:91872] [Ruby trunk Bug#15673] Number args + Ripper
       [not found] <redmine.issue-15673.20190318141322@ruby-lang.org>
  2019-03-18 14:13 ` [ruby-core:91867] [Ruby trunk Bug#15673] Number args + Ripper kevin.deisz
  2019-03-18 18:20 ` [ruby-core:91871] " kevin.deisz
@ 2019-03-18 18:28 ` kevin.deisz
  2019-03-18 19:33 ` [ruby-core:91874] " kevin.deisz
  3 siblings, 0 replies; 4+ messages in thread
From: kevin.deisz @ 2019-03-18 18:28 UTC (permalink / raw)
  To: ruby-core

Issue #15673 has been updated by kddeisz (Kevin Deisz).


Some more investigation yields that `compile_error` is called with:

identifier false is not valid to get

----------------------------------------
Bug #15673: Number args + Ripper
https://bugs.ruby-lang.org/issues/15673#change-77140

* Author: kddeisz (Kevin Deisz)
* Status: Open
* Priority: Normal
* Assignee: 
* Target version: 
* ruby -v: ruby 2.7.0dev (2019-03-18 trunk 67295) [x86_64-darwin18]
* Backport: 2.4: UNKNOWN, 2.5: UNKNOWN, 2.6: UNKNOWN
----------------------------------------
Hi there -

Love the new number args for blocks. When I run

``` ruby
[1, 2, 3].map { @1 * 2 }
```

everything works. However, when I run:

```ruby
require 'ripper'; Ripper.new('[1, 2, 3].map { @1 * 2 }').parse
```

it returns nothing and says there's an error. 




-- 
https://bugs.ruby-lang.org/

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [ruby-core:91874] [Ruby trunk Bug#15673] Number args + Ripper
       [not found] <redmine.issue-15673.20190318141322@ruby-lang.org>
                   ` (2 preceding siblings ...)
  2019-03-18 18:28 ` [ruby-core:91872] " kevin.deisz
@ 2019-03-18 19:33 ` kevin.deisz
  3 siblings, 0 replies; 4+ messages in thread
From: kevin.deisz @ 2019-03-18 19:33 UTC (permalink / raw)
  To: ruby-core

Issue #15673 has been updated by kddeisz (Kevin Deisz).

File ripper.patch added

I think I found it. I've attached a patch file. Please forgive me if I'm doing this wrong, this is my first contribution.

----------------------------------------
Bug #15673: Number args + Ripper
https://bugs.ruby-lang.org/issues/15673#change-77142

* Author: kddeisz (Kevin Deisz)
* Status: Open
* Priority: Normal
* Assignee: 
* Target version: 
* ruby -v: ruby 2.7.0dev (2019-03-18 trunk 67295) [x86_64-darwin18]
* Backport: 2.4: UNKNOWN, 2.5: UNKNOWN, 2.6: UNKNOWN
----------------------------------------
Hi there -

Love the new number args for blocks. When I run

``` ruby
[1, 2, 3].map { @1 * 2 }
```

everything works. However, when I run:

```ruby
require 'ripper'; Ripper.new('[1, 2, 3].map { @1 * 2 }').parse
```

it returns nothing and says there's an error. 


---Files--------------------------------
ripper.patch (824 Bytes)


-- 
https://bugs.ruby-lang.org/

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2019-03-18 19:34 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <redmine.issue-15673.20190318141322@ruby-lang.org>
2019-03-18 14:13 ` [ruby-core:91867] [Ruby trunk Bug#15673] Number args + Ripper kevin.deisz
2019-03-18 18:20 ` [ruby-core:91871] " kevin.deisz
2019-03-18 18:28 ` [ruby-core:91872] " kevin.deisz
2019-03-18 19:33 ` [ruby-core:91874] " kevin.deisz

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).