ruby-core@ruby-lang.org archive (unofficial mirror)
 help / color / mirror / Atom feed
* [ruby-core:111010] [Ruby master Bug#19150] pack/unpack silently ignores unknown directives
@ 2022-11-25 16:24 Eregon (Benoit Daloze)
  2022-12-01  8:25 ` [ruby-core:111118] " matz (Yukihiro Matsumoto)
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Eregon (Benoit Daloze) @ 2022-11-25 16:24 UTC (permalink / raw)
  To: ruby-core

Issue #19150 has been reported by Eregon (Benoit Daloze).

----------------------------------------
Bug #19150: pack/unpack silently ignores unknown directives
https://bugs.ruby-lang.org/issues/19150

* Author: Eregon (Benoit Daloze)
* Status: Open
* Priority: Normal
* Backport: 2.7: UNKNOWN, 3.0: UNKNOWN, 3.1: UNKNOWN
----------------------------------------
But I believe it should be an error instead.
Typically when a parser sees a syntax error it should fail not continue silently.

For instance `[1].pack('<L')` succeeds and only emits a warning if `$VERBOSE` is true.
This behavior caused confusion in https://github.com/oracle/truffleruby/issues/2791

I think it should fail with an `ArgumentError` instead.

Extracted from https://bugs.ruby-lang.org/issues/19108#note-3



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

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

* [ruby-core:111118] [Ruby master Bug#19150] pack/unpack silently ignores unknown directives
  2022-11-25 16:24 [ruby-core:111010] [Ruby master Bug#19150] pack/unpack silently ignores unknown directives Eregon (Benoit Daloze)
@ 2022-12-01  8:25 ` matz (Yukihiro Matsumoto)
  2022-12-16 10:45 ` [ruby-core:111321] " mame (Yusuke Endoh) via ruby-core
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: matz (Yukihiro Matsumoto) @ 2022-12-01  8:25 UTC (permalink / raw)
  To: ruby-core

Issue #19150 has been updated by matz (Yukihiro Matsumoto).


For 3.2 unknown directives always warn; for 3.3 they raise exceptions.

Matz.


----------------------------------------
Bug #19150: pack/unpack silently ignores unknown directives
https://bugs.ruby-lang.org/issues/19150#change-100392

* Author: Eregon (Benoit Daloze)
* Status: Open
* Priority: Normal
* Backport: 2.7: UNKNOWN, 3.0: UNKNOWN, 3.1: UNKNOWN
----------------------------------------
But I believe it should be an error instead.
Typically when a parser sees a syntax error it should fail not continue silently.

For instance `[1].pack('<L')` succeeds and only emits a warning if `$VERBOSE` is true.
This behavior caused confusion in https://github.com/oracle/truffleruby/issues/2791

I think it should fail with an `ArgumentError` instead.

Extracted from https://bugs.ruby-lang.org/issues/19108#note-3



-- 
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/postorius/lists/ruby-core.ml.ruby-lang.org/

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

* [ruby-core:111321] [Ruby master Bug#19150] pack/unpack silently ignores unknown directives
  2022-11-25 16:24 [ruby-core:111010] [Ruby master Bug#19150] pack/unpack silently ignores unknown directives Eregon (Benoit Daloze)
  2022-12-01  8:25 ` [ruby-core:111118] " matz (Yukihiro Matsumoto)
@ 2022-12-16 10:45 ` mame (Yusuke Endoh) via ruby-core
  2022-12-19 17:14 ` [ruby-core:111337] " byroot (Jean Boussier) via ruby-core
  2023-01-05 18:11 ` [ruby-core:111656] " Eregon (Benoit Daloze) via ruby-core
  3 siblings, 0 replies; 5+ messages in thread
From: mame (Yusuke Endoh) via ruby-core @ 2022-12-16 10:45 UTC (permalink / raw)
  To: ruby-core; +Cc: mame (Yusuke Endoh)

Issue #19150 has been updated by mame (Yusuke Endoh).


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

----------------------------------------
Bug #19150: pack/unpack silently ignores unknown directives
https://bugs.ruby-lang.org/issues/19150#change-100696

* Author: Eregon (Benoit Daloze)
* Status: Open
* Priority: Normal
* Backport: 2.7: UNKNOWN, 3.0: UNKNOWN, 3.1: UNKNOWN
----------------------------------------
But I believe it should be an error instead.
Typically when a parser sees a syntax error it should fail not continue silently.

For instance `[1].pack('<L')` succeeds and only emits a warning if `$VERBOSE` is true.
This behavior caused confusion in https://github.com/oracle/truffleruby/issues/2791

I think it should fail with an `ArgumentError` instead.

Extracted from https://bugs.ruby-lang.org/issues/19108#note-3



-- 
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/postorius/lists/ruby-core.ml.ruby-lang.org/

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

* [ruby-core:111337] [Ruby master Bug#19150] pack/unpack silently ignores unknown directives
  2022-11-25 16:24 [ruby-core:111010] [Ruby master Bug#19150] pack/unpack silently ignores unknown directives Eregon (Benoit Daloze)
  2022-12-01  8:25 ` [ruby-core:111118] " matz (Yukihiro Matsumoto)
  2022-12-16 10:45 ` [ruby-core:111321] " mame (Yusuke Endoh) via ruby-core
@ 2022-12-19 17:14 ` byroot (Jean Boussier) via ruby-core
  2023-01-05 18:11 ` [ruby-core:111656] " Eregon (Benoit Daloze) via ruby-core
  3 siblings, 0 replies; 5+ messages in thread
From: byroot (Jean Boussier) via ruby-core @ 2022-12-19 17:14 UTC (permalink / raw)
  To: ruby-core; +Cc: byroot (Jean Boussier)

Issue #19150 has been updated by byroot (Jean Boussier).

Status changed from Closed to Open

Reopening so we remember to make it raise in 3.3

----------------------------------------
Bug #19150: pack/unpack silently ignores unknown directives
https://bugs.ruby-lang.org/issues/19150#change-100711

* Author: Eregon (Benoit Daloze)
* Status: Open
* Priority: Normal
* Backport: 2.7: UNKNOWN, 3.0: UNKNOWN, 3.1: UNKNOWN
----------------------------------------
But I believe it should be an error instead.
Typically when a parser sees a syntax error it should fail not continue silently.

For instance `[1].pack('<L')` succeeds and only emits a warning if `$VERBOSE` is true.
This behavior caused confusion in https://github.com/oracle/truffleruby/issues/2791

I think it should fail with an `ArgumentError` instead.

Extracted from https://bugs.ruby-lang.org/issues/19108#note-3



-- 
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/postorius/lists/ruby-core.ml.ruby-lang.org/

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

* [ruby-core:111656] [Ruby master Bug#19150] pack/unpack silently ignores unknown directives
  2022-11-25 16:24 [ruby-core:111010] [Ruby master Bug#19150] pack/unpack silently ignores unknown directives Eregon (Benoit Daloze)
                   ` (2 preceding siblings ...)
  2022-12-19 17:14 ` [ruby-core:111337] " byroot (Jean Boussier) via ruby-core
@ 2023-01-05 18:11 ` Eregon (Benoit Daloze) via ruby-core
  3 siblings, 0 replies; 5+ messages in thread
From: Eregon (Benoit Daloze) via ruby-core @ 2023-01-05 18:11 UTC (permalink / raw)
  To: ruby-core; +Cc: Eregon (Benoit Daloze)

Issue #19150 has been updated by Eregon (Benoit Daloze).

Status changed from Open to Closed
Backport changed from 2.7: UNKNOWN, 3.0: UNKNOWN, 3.1: UNKNOWN to 2.7: DONTNEED, 3.0: DONTNEED, 3.1: DONTNEED

Done in https://github.com/ruby/ruby/commit/03dd37775afb40eef392ae2920d728235af302c8, also needed changes in specs: https://github.com/ruby/spec/commit/9d69b95a7bbac3d89e7218a98bd50ecf173d9c6f

----------------------------------------
Bug #19150: pack/unpack silently ignores unknown directives
https://bugs.ruby-lang.org/issues/19150#change-101046

* Author: Eregon (Benoit Daloze)
* Status: Closed
* Priority: Normal
* Target version: 3.3
* Backport: 2.7: DONTNEED, 3.0: DONTNEED, 3.1: DONTNEED
----------------------------------------
But I believe it should be an error instead.
Typically when a parser sees a syntax error it should fail not continue silently.

For instance `[1].pack('<L')` succeeds and only emits a warning if `$VERBOSE` is true.
This behavior caused confusion in https://github.com/oracle/truffleruby/issues/2791

I think it should fail with an `ArgumentError` instead.

Extracted from https://bugs.ruby-lang.org/issues/19108#note-3



-- 
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/postorius/lists/ruby-core.ml.ruby-lang.org/

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

end of thread, other threads:[~2023-01-05 18:11 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-11-25 16:24 [ruby-core:111010] [Ruby master Bug#19150] pack/unpack silently ignores unknown directives Eregon (Benoit Daloze)
2022-12-01  8:25 ` [ruby-core:111118] " matz (Yukihiro Matsumoto)
2022-12-16 10:45 ` [ruby-core:111321] " mame (Yusuke Endoh) via ruby-core
2022-12-19 17:14 ` [ruby-core:111337] " byroot (Jean Boussier) via ruby-core
2023-01-05 18:11 ` [ruby-core:111656] " Eregon (Benoit Daloze) 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 read-only IMAP folder(s) and NNTP newsgroup(s).