ruby-core@ruby-lang.org archive (unofficial mirror)
 help / color / mirror / Atom feed
* [ruby-core:118676] [Ruby master Bug#20649] Ripper fails to tokenize `def f; (x)::A =`
@ 2024-07-24  7:06 tompng (tomoya ishida) via ruby-core
  2024-07-24 12:32 ` [ruby-core:118678] " nobu (Nobuyoshi Nakada) via ruby-core
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: tompng (tomoya ishida) via ruby-core @ 2024-07-24  7:06 UTC (permalink / raw)
  To: ruby-core; +Cc: tompng (tomoya ishida)

Issue #20649 has been reported by tompng (tomoya ishida).

----------------------------------------
Bug #20649: Ripper fails to tokenize `def f; (x)::A =`
https://bugs.ruby-lang.org/issues/20649

* Author: tompng (tomoya ishida)
* Status: Open
* ruby -v: ruby 3.4.0dev (2024-07-24T05:44:32Z master e642ddf7ae) [x86_64-linux]
* Backport: 3.1: UNKNOWN, 3.2: UNKNOWN, 3.3: UNKNOWN
----------------------------------------
Ripper fails to tokenize some dynamic constant assignment syntax error code.
`''::A=` `(x)::A=` `(x).y::Z=` `[]::A=` `{}::A=` ``` ``::A=``` `//::A=` `%()::A=` in method body seems to fail.
Same for `for ''::A in` and `rescue => ''::A;` in method body.
~~~ruby
Ripper.tokenize 'def f; (x)::A ='
#=>
/opt/ruby/lib/ruby/3.4.0+0/ripper/lexer.rb:245:in 'Ripper::Lexer#on_error2': undefined method 'pos' for nil (NoMethodError)

      @errors.push Elem.new(elem.pos, __callee__, elem.tok, elem.state, mesg)
                                ^^^^
	from /opt/ruby/lib/ruby/3.4.0+0/ripper/lexer.rb:176:in 'Ripper#parse'
	from /opt/ruby/lib/ruby/3.4.0+0/ripper/lexer.rb:176:in 'Ripper::Lexer#parse'
	from /opt/ruby/lib/ruby/3.4.0+0/ripper/lexer.rb:150:in 'Ripper::Lexer#tokenize'
	from /opt/ruby/lib/ruby/3.4.0+0/ripper/lexer.rb:26:in 'Ripper.tokenize'
	from -e:1:in '<main>'
~~~




-- 
https://bugs.ruby-lang.org/
 ______________________________________________
 ruby-core mailing list -- ruby-core@ml.ruby-lang.org
 To unsubscribe send an email to ruby-core-leave@ml.ruby-lang.org
 ruby-core info -- https://ml.ruby-lang.org/mailman3/lists/ruby-core.ml.ruby-lang.org/

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

* [ruby-core:118678] [Ruby master Bug#20649] Ripper fails to tokenize `def f; (x)::A =`
  2024-07-24  7:06 [ruby-core:118676] [Ruby master Bug#20649] Ripper fails to tokenize `def f; (x)::A =` tompng (tomoya ishida) via ruby-core
@ 2024-07-24 12:32 ` nobu (Nobuyoshi Nakada) via ruby-core
  2024-08-18  2:20 ` [ruby-core:118872] " nagachika (Tomoyuki Chikanaga) via ruby-core
  2024-09-02 10:07 ` [ruby-core:119009] " k0kubun (Takashi Kokubun) via ruby-core
  2 siblings, 0 replies; 4+ messages in thread
From: nobu (Nobuyoshi Nakada) via ruby-core @ 2024-07-24 12:32 UTC (permalink / raw)
  To: ruby-core; +Cc: nobu (Nobuyoshi Nakada)

Issue #20649 has been updated by nobu (Nobuyoshi Nakada).


https://github.com/ruby/ruby/pull/11235

----------------------------------------
Bug #20649: Ripper fails to tokenize `def f; (x)::A =`
https://bugs.ruby-lang.org/issues/20649#change-109213

* Author: tompng (tomoya ishida)
* Status: Open
* ruby -v: ruby 3.4.0dev (2024-07-24T05:44:32Z master e642ddf7ae) [x86_64-linux]
* Backport: 3.1: REQUIRED, 3.2: REQUIRED, 3.3: REQUIRED
----------------------------------------
Ripper fails to tokenize some dynamic constant assignment syntax error code.
`''::A=` `(x)::A=` `(x).y::Z=` `[]::A=` `{}::A=` ``` ``::A=``` `//::A=` `%()::A=` in method body seems to fail.
Same for `for ''::A in` and `rescue => ''::A;` in method body.
~~~ruby
Ripper.tokenize 'def f; (x)::A ='
#=>
/opt/ruby/lib/ruby/3.4.0+0/ripper/lexer.rb:245:in 'Ripper::Lexer#on_error2': undefined method 'pos' for nil (NoMethodError)

      @errors.push Elem.new(elem.pos, __callee__, elem.tok, elem.state, mesg)
                                ^^^^
	from /opt/ruby/lib/ruby/3.4.0+0/ripper/lexer.rb:176:in 'Ripper#parse'
	from /opt/ruby/lib/ruby/3.4.0+0/ripper/lexer.rb:176:in 'Ripper::Lexer#parse'
	from /opt/ruby/lib/ruby/3.4.0+0/ripper/lexer.rb:150:in 'Ripper::Lexer#tokenize'
	from /opt/ruby/lib/ruby/3.4.0+0/ripper/lexer.rb:26:in 'Ripper.tokenize'
	from -e:1:in '<main>'
~~~




-- 
https://bugs.ruby-lang.org/
 ______________________________________________
 ruby-core mailing list -- ruby-core@ml.ruby-lang.org
 To unsubscribe send an email to ruby-core-leave@ml.ruby-lang.org
 ruby-core info -- https://ml.ruby-lang.org/mailman3/lists/ruby-core.ml.ruby-lang.org/

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

* [ruby-core:118872] [Ruby master Bug#20649] Ripper fails to tokenize `def f; (x)::A =`
  2024-07-24  7:06 [ruby-core:118676] [Ruby master Bug#20649] Ripper fails to tokenize `def f; (x)::A =` tompng (tomoya ishida) via ruby-core
  2024-07-24 12:32 ` [ruby-core:118678] " nobu (Nobuyoshi Nakada) via ruby-core
@ 2024-08-18  2:20 ` nagachika (Tomoyuki Chikanaga) via ruby-core
  2024-09-02 10:07 ` [ruby-core:119009] " k0kubun (Takashi Kokubun) via ruby-core
  2 siblings, 0 replies; 4+ messages in thread
From: nagachika (Tomoyuki Chikanaga) via ruby-core @ 2024-08-18  2:20 UTC (permalink / raw)
  To: ruby-core; +Cc: nagachika (Tomoyuki Chikanaga)

Issue #20649 has been updated by nagachika (Tomoyuki Chikanaga).

Backport changed from 3.1: REQUIRED, 3.2: REQUIRED, 3.3: REQUIRED to 3.1: REQUIRED, 3.2: DONE, 3.3: REQUIRED

ruby_3_2 commit:a8a25291447e3630d455e82851ca58fc8ac372ec merged revision(s) commit:97449338d6cb42d9dd7c9ca61550616e7e6b6ef6.

----------------------------------------
Bug #20649: Ripper fails to tokenize `def f; (x)::A =`
https://bugs.ruby-lang.org/issues/20649#change-109444

* Author: tompng (tomoya ishida)
* Status: Closed
* ruby -v: ruby 3.4.0dev (2024-07-24T05:44:32Z master e642ddf7ae) [x86_64-linux]
* Backport: 3.1: REQUIRED, 3.2: DONE, 3.3: REQUIRED
----------------------------------------
Ripper fails to tokenize some dynamic constant assignment syntax error code.
`''::A=` `(x)::A=` `(x).y::Z=` `[]::A=` `{}::A=` ``` ``::A=``` `//::A=` `%()::A=` in method body seems to fail.
Same for `for ''::A in` and `rescue => ''::A;` in method body.
~~~ruby
Ripper.tokenize 'def f; (x)::A ='
#=>
/opt/ruby/lib/ruby/3.4.0+0/ripper/lexer.rb:245:in 'Ripper::Lexer#on_error2': undefined method 'pos' for nil (NoMethodError)

      @errors.push Elem.new(elem.pos, __callee__, elem.tok, elem.state, mesg)
                                ^^^^
	from /opt/ruby/lib/ruby/3.4.0+0/ripper/lexer.rb:176:in 'Ripper#parse'
	from /opt/ruby/lib/ruby/3.4.0+0/ripper/lexer.rb:176:in 'Ripper::Lexer#parse'
	from /opt/ruby/lib/ruby/3.4.0+0/ripper/lexer.rb:150:in 'Ripper::Lexer#tokenize'
	from /opt/ruby/lib/ruby/3.4.0+0/ripper/lexer.rb:26:in 'Ripper.tokenize'
	from -e:1:in '<main>'
~~~




-- 
https://bugs.ruby-lang.org/
 ______________________________________________
 ruby-core mailing list -- ruby-core@ml.ruby-lang.org
 To unsubscribe send an email to ruby-core-leave@ml.ruby-lang.org
 ruby-core info -- https://ml.ruby-lang.org/mailman3/lists/ruby-core.ml.ruby-lang.org/

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

* [ruby-core:119009] [Ruby master Bug#20649] Ripper fails to tokenize `def f; (x)::A =`
  2024-07-24  7:06 [ruby-core:118676] [Ruby master Bug#20649] Ripper fails to tokenize `def f; (x)::A =` tompng (tomoya ishida) via ruby-core
  2024-07-24 12:32 ` [ruby-core:118678] " nobu (Nobuyoshi Nakada) via ruby-core
  2024-08-18  2:20 ` [ruby-core:118872] " nagachika (Tomoyuki Chikanaga) via ruby-core
@ 2024-09-02 10:07 ` k0kubun (Takashi Kokubun) via ruby-core
  2 siblings, 0 replies; 4+ messages in thread
From: k0kubun (Takashi Kokubun) via ruby-core @ 2024-09-02 10:07 UTC (permalink / raw)
  To: ruby-core; +Cc: k0kubun (Takashi Kokubun)

Issue #20649 has been updated by k0kubun (Takashi Kokubun).

Backport changed from 3.1: REQUIRED, 3.2: DONE, 3.3: REQUIRED to 3.1: REQUIRED, 3.2: DONE, 3.3: DONE

ruby_3_3 commit:b210c86a0201f6a97c4da8266908260746f53ae0 merged revision(s) commit:97449338d6cb42d9dd7c9ca61550616e7e6b6ef6.

----------------------------------------
Bug #20649: Ripper fails to tokenize `def f; (x)::A =`
https://bugs.ruby-lang.org/issues/20649#change-109584

* Author: tompng (tomoya ishida)
* Status: Closed
* ruby -v: ruby 3.4.0dev (2024-07-24T05:44:32Z master e642ddf7ae) [x86_64-linux]
* Backport: 3.1: REQUIRED, 3.2: DONE, 3.3: DONE
----------------------------------------
Ripper fails to tokenize some dynamic constant assignment syntax error code.
`''::A=` `(x)::A=` `(x).y::Z=` `[]::A=` `{}::A=` ``` ``::A=``` `//::A=` `%()::A=` in method body seems to fail.
Same for `for ''::A in` and `rescue => ''::A;` in method body.
~~~ruby
Ripper.tokenize 'def f; (x)::A ='
#=>
/opt/ruby/lib/ruby/3.4.0+0/ripper/lexer.rb:245:in 'Ripper::Lexer#on_error2': undefined method 'pos' for nil (NoMethodError)

      @errors.push Elem.new(elem.pos, __callee__, elem.tok, elem.state, mesg)
                                ^^^^
	from /opt/ruby/lib/ruby/3.4.0+0/ripper/lexer.rb:176:in 'Ripper#parse'
	from /opt/ruby/lib/ruby/3.4.0+0/ripper/lexer.rb:176:in 'Ripper::Lexer#parse'
	from /opt/ruby/lib/ruby/3.4.0+0/ripper/lexer.rb:150:in 'Ripper::Lexer#tokenize'
	from /opt/ruby/lib/ruby/3.4.0+0/ripper/lexer.rb:26:in 'Ripper.tokenize'
	from -e:1:in '<main>'
~~~




-- 
https://bugs.ruby-lang.org/
 ______________________________________________
 ruby-core mailing list -- ruby-core@ml.ruby-lang.org
 To unsubscribe send an email to ruby-core-leave@ml.ruby-lang.org
 ruby-core info -- https://ml.ruby-lang.org/mailman3/lists/ruby-core.ml.ruby-lang.org/

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

end of thread, other threads:[~2024-09-02 10:08 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-07-24  7:06 [ruby-core:118676] [Ruby master Bug#20649] Ripper fails to tokenize `def f; (x)::A =` tompng (tomoya ishida) via ruby-core
2024-07-24 12:32 ` [ruby-core:118678] " nobu (Nobuyoshi Nakada) via ruby-core
2024-08-18  2:20 ` [ruby-core:118872] " nagachika (Tomoyuki Chikanaga) via ruby-core
2024-09-02 10:07 ` [ruby-core:119009] " k0kubun (Takashi Kokubun) via ruby-core

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 NNTP newsgroup(s).