ruby-core@ruby-lang.org archive (unofficial mirror)
 help / color / mirror / Atom feed
* [ruby-core:97641] [Ruby master Bug#16501] Support marshaling of ruby2_keywords flag
       [not found] <redmine.issue-16501.20200111063117.18@ruby-lang.org>
@ 2020-03-31 12:06 ` mame
  2020-07-23  7:59 ` [ruby-core:99292] " nagachika00
  1 sibling, 0 replies; 2+ messages in thread
From: mame @ 2020-03-31 12:06 UTC (permalink / raw
  To: ruby-core

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

Backport set to 2.5: DONTNEED, 2.6: DONTNEED, 2.7: REQUIRED
Tracker changed from Feature to Bug

This might not be a bug, but the change is needed for #16634 commit:2339be74e737b4c5f5330f845af2e7db0c7450e1, so please backport to 2.7.

----------------------------------------
Bug #16501: Support marshaling of ruby2_keywords flag
https://bugs.ruby-lang.org/issues/16501#change-84839

* Author: mame (Yusuke Endoh)
* Status: Closed
* Priority: Normal
* Backport: 2.5: DONTNEED, 2.6: DONTNEED, 2.7: REQUIRED
----------------------------------------
This patch makes Marshal.dump and load aware of ruby2_keywords flag.

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

```
def bar(key:)
  key
end

ruby2_keywords def foo(*args)
  args = Marshal.load(Marshal.dump(args))
  bar(*args)
end

foo(key: 42) #=> 42
```

Honestly, I'm not fully convinced if this is really needed.  It would be helpful for applications and libraries that serializes the whole arguments by using Marshal, e.g., drb.  (Currently, drb does not support keyword separation.)  But I'm unsure how many applications does so; ActiveJob and Sidekiq use their own dedicated serialization mechanism based on JSON.  This patch does not help them, and they should use #16486 to support ruby2_keywords flag.  I'd like to hear opinions.



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

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

* [ruby-core:99292] [Ruby master Bug#16501] Support marshaling of ruby2_keywords flag
       [not found] <redmine.issue-16501.20200111063117.18@ruby-lang.org>
  2020-03-31 12:06 ` [ruby-core:97641] [Ruby master Bug#16501] Support marshaling of ruby2_keywords flag mame
@ 2020-07-23  7:59 ` nagachika00
  1 sibling, 0 replies; 2+ messages in thread
From: nagachika00 @ 2020-07-23  7:59 UTC (permalink / raw
  To: ruby-core

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

Backport changed from 2.5: DONTNEED, 2.6: DONTNEED, 2.7: REQUIRED to 2.5: DONTNEED, 2.6: DONTNEED, 2.7: DONE

ruby_2_7 ae804b143455075687c8b4a401fba48fda72a217 merged revision(s) b23fd59cbb3f097bcd559d0c85a86ff7a1eeeb7e.

----------------------------------------
Bug #16501: Support marshaling of ruby2_keywords flag
https://bugs.ruby-lang.org/issues/16501#change-86681

* Author: mame (Yusuke Endoh)
* Status: Closed
* Priority: Normal
* Backport: 2.5: DONTNEED, 2.6: DONTNEED, 2.7: DONE
----------------------------------------
This patch makes Marshal.dump and load aware of ruby2_keywords flag.

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

```
def bar(key:)
  key
end

ruby2_keywords def foo(*args)
  args = Marshal.load(Marshal.dump(args))
  bar(*args)
end

foo(key: 42) #=> 42
```

Honestly, I'm not fully convinced if this is really needed.  It would be helpful for applications and libraries that serializes the whole arguments by using Marshal, e.g., drb.  (Currently, drb does not support keyword separation.)  But I'm unsure how many applications does so; ActiveJob and Sidekiq use their own dedicated serialization mechanism based on JSON.  This patch does not help them, and they should use #16486 to support ruby2_keywords flag.  I'd like to hear opinions.



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

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

end of thread, other threads:[~2020-07-23  7:59 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <redmine.issue-16501.20200111063117.18@ruby-lang.org>
2020-03-31 12:06 ` [ruby-core:97641] [Ruby master Bug#16501] Support marshaling of ruby2_keywords flag mame
2020-07-23  7:59 ` [ruby-core:99292] " nagachika00

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).