* [ruby-core:91852] [Ruby trunk Bug#15670] Ripper treats :"sym" as xstring
[not found] <redmine.issue-15670.20190316035425@ruby-lang.org>
@ 2019-03-16 3:54 ` kazuki
2019-03-28 3:26 ` [ruby-core:92030] " naruse
` (2 subsequent siblings)
3 siblings, 0 replies; 4+ messages in thread
From: kazuki @ 2019-03-16 3:54 UTC (permalink / raw)
To: ruby-core
Issue #15670 has been reported by ktsj (Kazuki Tsujimoto).
----------------------------------------
Bug #15670: Ripper treats :"sym" as xstring
https://bugs.ruby-lang.org/issues/15670
* Author: ktsj (Kazuki Tsujimoto)
* Status: Open
* Priority: Normal
* Assignee:
* Target version:
* ruby -v: ruby 2.7.0dev (2019-03-15 master 67269) [x86_64-linux]
* Backport: 2.4: UNKNOWN, 2.5: REQUIRED, 2.6: REQUIRED
----------------------------------------
Ripperで `:"sym"` をパースするとxstringとして扱われるようになっていますが、
`{"sym": ...}` と同様にstringとして扱われるべきだと思います。
~~~
$ ruby -rripper -e '_, (_, _, s) = Ripper.sexp_raw(%q{:"sym"}); p s'
[:dyna_symbol, [:xstring_add, [:xstring_new], [:@tstring_content, "sym", [1, 2]]]]
$ ruby -rripper -e '_, (_, _, (_, (_, ((_, s))))) = Ripper.sexp_raw(%q{{"sym": 0}}); p s'
[:dyna_symbol, [:string_add, [:string_content], [:@tstring_content, "sym", [1, 2]]]]
~~~
バックポートすべきか微妙な修正のような気もしますが、一応バックポートチケットとして起票しておきます。
--
https://bugs.ruby-lang.org/
^ permalink raw reply [flat|nested] 4+ messages in thread
* [ruby-core:92030] [Ruby trunk Bug#15670] Ripper treats :"sym" as xstring
[not found] <redmine.issue-15670.20190316035425@ruby-lang.org>
2019-03-16 3:54 ` [ruby-core:91852] [Ruby trunk Bug#15670] Ripper treats :"sym" as xstring kazuki
@ 2019-03-28 3:26 ` naruse
2019-04-13 5:19 ` [ruby-core:92269] " ujihisa
2019-05-09 2:55 ` [ruby-core:92601] " skalee
3 siblings, 0 replies; 4+ messages in thread
From: naruse @ 2019-03-28 3:26 UTC (permalink / raw)
To: ruby-core
Issue #15670 has been updated by naruse (Yui NARUSE).
Backport changed from 2.4: UNKNOWN, 2.5: REQUIRED, 2.6: REQUIRED to 2.4: UNKNOWN, 2.5: REQUIRED, 2.6: DONE
ruby_2_6 r67352 merged revision(s) 67270.
----------------------------------------
Bug #15670: Ripper treats :"sym" as xstring
https://bugs.ruby-lang.org/issues/15670#change-77354
* Author: ktsj (Kazuki Tsujimoto)
* Status: Closed
* Priority: Normal
* Assignee:
* Target version:
* ruby -v: ruby 2.7.0dev (2019-03-15 master 67269) [x86_64-linux]
* Backport: 2.4: UNKNOWN, 2.5: REQUIRED, 2.6: DONE
----------------------------------------
Ripperで `:"sym"` をパースするとxstringとして扱われるようになっていますが、
`{"sym": ...}` と同様にstringとして扱われるべきだと思います。
~~~
$ ruby -rripper -e '_, (_, _, s) = Ripper.sexp_raw(%q{:"sym"}); p s'
[:dyna_symbol, [:xstring_add, [:xstring_new], [:@tstring_content, "sym", [1, 2]]]]
$ ruby -rripper -e '_, (_, _, (_, (_, ((_, s))))) = Ripper.sexp_raw(%q{{"sym": 0}}); p s'
[:dyna_symbol, [:string_add, [:string_content], [:@tstring_content, "sym", [1, 2]]]]
~~~
バックポートすべきか微妙な修正のような気もしますが、一応バックポートチケットとして起票しておきます。
--
https://bugs.ruby-lang.org/
^ permalink raw reply [flat|nested] 4+ messages in thread
* [ruby-core:92269] [Ruby trunk Bug#15670] Ripper treats :"sym" as xstring
[not found] <redmine.issue-15670.20190316035425@ruby-lang.org>
2019-03-16 3:54 ` [ruby-core:91852] [Ruby trunk Bug#15670] Ripper treats :"sym" as xstring kazuki
2019-03-28 3:26 ` [ruby-core:92030] " naruse
@ 2019-04-13 5:19 ` ujihisa
2019-05-09 2:55 ` [ruby-core:92601] " skalee
3 siblings, 0 replies; 4+ messages in thread
From: ujihisa @ 2019-04-13 5:19 UTC (permalink / raw)
To: ruby-core
Issue #15670 has been updated by ujihisa (Tatsuhiro Ujihisa).
This change broke a library preval https://github.com/kddeisz/preval/issues/1, and potentially also breaks other libraries that uses Ripper. Since this is an incompatible change for Ripper.sexp, I guess backport requires a loud changelog note for developers who use ripper.
----------------------------------------
Bug #15670: Ripper treats :"sym" as xstring
https://bugs.ruby-lang.org/issues/15670#change-77602
* Author: ktsj (Kazuki Tsujimoto)
* Status: Closed
* Priority: Normal
* Assignee:
* Target version:
* ruby -v: ruby 2.7.0dev (2019-03-15 master 67269) [x86_64-linux]
* Backport: 2.4: UNKNOWN, 2.5: REQUIRED, 2.6: DONE
----------------------------------------
Ripperで `:"sym"` をパースするとxstringとして扱われるようになっていますが、
`{"sym": ...}` と同様にstringとして扱われるべきだと思います。
~~~
$ ruby -rripper -e '_, (_, _, s) = Ripper.sexp_raw(%q{:"sym"}); p s'
[:dyna_symbol, [:xstring_add, [:xstring_new], [:@tstring_content, "sym", [1, 2]]]]
$ ruby -rripper -e '_, (_, _, (_, (_, ((_, s))))) = Ripper.sexp_raw(%q{{"sym": 0}}); p s'
[:dyna_symbol, [:string_add, [:string_content], [:@tstring_content, "sym", [1, 2]]]]
~~~
バックポートすべきか微妙な修正のような気もしますが、一応バックポートチケットとして起票しておきます。
--
https://bugs.ruby-lang.org/
^ permalink raw reply [flat|nested] 4+ messages in thread
* [ruby-core:92601] [Ruby trunk Bug#15670] Ripper treats :"sym" as xstring
[not found] <redmine.issue-15670.20190316035425@ruby-lang.org>
` (2 preceding siblings ...)
2019-04-13 5:19 ` [ruby-core:92269] " ujihisa
@ 2019-05-09 2:55 ` skalee
3 siblings, 0 replies; 4+ messages in thread
From: skalee @ 2019-05-09 2:55 UTC (permalink / raw)
To: ruby-core
Issue #15670 has been updated by skalee (Sebastian Skalacki).
YARD is also broken, though I'm not sure how severe is that: https://github.com/lsegal/yard/issues/1243. I suspect this very change.
----------------------------------------
Bug #15670: Ripper treats :"sym" as xstring
https://bugs.ruby-lang.org/issues/15670#change-77960
* Author: ktsj (Kazuki Tsujimoto)
* Status: Closed
* Priority: Normal
* Assignee:
* Target version:
* ruby -v: ruby 2.7.0dev (2019-03-15 master 67269) [x86_64-linux]
* Backport: 2.4: WONTFIX, 2.5: DONE, 2.6: DONE
----------------------------------------
Ripperで `:"sym"` をパースするとxstringとして扱われるようになっていますが、
`{"sym": ...}` と同様にstringとして扱われるべきだと思います。
~~~
$ ruby -rripper -e '_, (_, _, s) = Ripper.sexp_raw(%q{:"sym"}); p s'
[:dyna_symbol, [:xstring_add, [:xstring_new], [:@tstring_content, "sym", [1, 2]]]]
$ ruby -rripper -e '_, (_, _, (_, (_, ((_, s))))) = Ripper.sexp_raw(%q{{"sym": 0}}); p s'
[:dyna_symbol, [:string_add, [:string_content], [:@tstring_content, "sym", [1, 2]]]]
~~~
バックポートすべきか微妙な修正のような気もしますが、一応バックポートチケットとして起票しておきます。
--
https://bugs.ruby-lang.org/
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2019-05-09 2:55 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-15670.20190316035425@ruby-lang.org>
2019-03-16 3:54 ` [ruby-core:91852] [Ruby trunk Bug#15670] Ripper treats :"sym" as xstring kazuki
2019-03-28 3:26 ` [ruby-core:92030] " naruse
2019-04-13 5:19 ` [ruby-core:92269] " ujihisa
2019-05-09 2:55 ` [ruby-core:92601] " skalee
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).