* [ruby-core:101945] [Ruby master Bug#17513] Methods of shareable objects and UnboundMethods should be shareable
@ 2021-01-06 6:04 marcandre-ruby-core
2021-01-06 19:16 ` [ruby-core:101966] " eregontp
2021-01-06 20:53 ` [ruby-core:101967] " marcandre-ruby-core
0 siblings, 2 replies; 3+ messages in thread
From: marcandre-ruby-core @ 2021-01-06 6:04 UTC (permalink / raw)
To: ruby-core
Issue #17513 has been reported by marcandre (Marc-Andre Lafortune).
----------------------------------------
Bug #17513: Methods of shareable objects and UnboundMethods should be shareable
https://bugs.ruby-lang.org/issues/17513
* Author: marcandre (Marc-Andre Lafortune)
* Status: Open
* Priority: Normal
* Assignee: ko1 (Koichi Sasada)
* ruby -v: 3.0.0p0
* Backport: 2.5: UNKNOWN, 2.6: UNKNOWN, 2.7: UNKNOWN, 3.0: UNKNOWN
----------------------------------------
```ruby
class Foo
def foo
end
end
f = Foo.new.freeze
Ractor.shareable?(f) # => true
Ractor.make_shareable(f.method(:foo).to_proc) # => Proc, ok
Ractor.make_shareable(f.method(:foo)) # => Ractor::Error, expected Method
Ractor.make_shareable(Foo.instance_method(:foo)) # => Ractor::Error, expected UnboundMethod
```
--
https://bugs.ruby-lang.org/
^ permalink raw reply [flat|nested] 3+ messages in thread
* [ruby-core:101966] [Ruby master Bug#17513] Methods of shareable objects and UnboundMethods should be shareable
2021-01-06 6:04 [ruby-core:101945] [Ruby master Bug#17513] Methods of shareable objects and UnboundMethods should be shareable marcandre-ruby-core
@ 2021-01-06 19:16 ` eregontp
2021-01-06 20:53 ` [ruby-core:101967] " marcandre-ruby-core
1 sibling, 0 replies; 3+ messages in thread
From: eregontp @ 2021-01-06 19:16 UTC (permalink / raw)
To: ruby-core
Issue #17513 has been updated by Eregon (Benoit Daloze).
Methods can be defined via `define_method { capture_state }` and so rely on mutable state, so I guess this is only OK for `def` methods.
----------------------------------------
Bug #17513: Methods of shareable objects and UnboundMethods should be shareable
https://bugs.ruby-lang.org/issues/17513#change-89819
* Author: marcandre (Marc-Andre Lafortune)
* Status: Open
* Priority: Normal
* Assignee: ko1 (Koichi Sasada)
* ruby -v: 3.0.0p0
* Backport: 2.5: UNKNOWN, 2.6: UNKNOWN, 2.7: UNKNOWN, 3.0: UNKNOWN
----------------------------------------
```ruby
class Foo
def foo
end
end
f = Foo.new.freeze
Ractor.shareable?(f) # => true
Ractor.make_shareable(f.method(:foo).to_proc) # => Proc, ok
Ractor.make_shareable(f.method(:foo)) # => Ractor::Error, expected Method
Ractor.make_shareable(Foo.instance_method(:foo)) # => Ractor::Error, expected UnboundMethod
```
--
https://bugs.ruby-lang.org/
^ permalink raw reply [flat|nested] 3+ messages in thread
* [ruby-core:101967] [Ruby master Bug#17513] Methods of shareable objects and UnboundMethods should be shareable
2021-01-06 6:04 [ruby-core:101945] [Ruby master Bug#17513] Methods of shareable objects and UnboundMethods should be shareable marcandre-ruby-core
2021-01-06 19:16 ` [ruby-core:101966] " eregontp
@ 2021-01-06 20:53 ` marcandre-ruby-core
1 sibling, 0 replies; 3+ messages in thread
From: marcandre-ruby-core @ 2021-01-06 20:53 UTC (permalink / raw)
To: ruby-core
Issue #17513 has been updated by marcandre (Marc-Andre Lafortune).
Agreed, some methods can not be made shareable 👍.
----------------------------------------
Bug #17513: Methods of shareable objects and UnboundMethods should be shareable
https://bugs.ruby-lang.org/issues/17513#change-89820
* Author: marcandre (Marc-Andre Lafortune)
* Status: Open
* Priority: Normal
* Assignee: ko1 (Koichi Sasada)
* ruby -v: 3.0.0p0
* Backport: 2.5: UNKNOWN, 2.6: UNKNOWN, 2.7: UNKNOWN, 3.0: UNKNOWN
----------------------------------------
```ruby
class Foo
def foo
end
end
f = Foo.new.freeze
Ractor.shareable?(f) # => true
Ractor.make_shareable(f.method(:foo).to_proc) # => Proc, ok
Ractor.make_shareable(f.method(:foo)) # => Ractor::Error, expected Method
Ractor.make_shareable(Foo.instance_method(:foo)) # => Ractor::Error, expected UnboundMethod
```
--
https://bugs.ruby-lang.org/
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2021-01-06 20:53 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-06 6:04 [ruby-core:101945] [Ruby master Bug#17513] Methods of shareable objects and UnboundMethods should be shareable marcandre-ruby-core
2021-01-06 19:16 ` [ruby-core:101966] " eregontp
2021-01-06 20:53 ` [ruby-core:101967] " marcandre-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).