[#101179] Spectre Mitigations — Amel <amel.smajic@...>
Hi there!
5 messages
2020/12/01
[#101180] Re: Spectre Mitigations
— Chris Seaton <chris@...>
2020/12/01
I wouldn’t recommend using Ruby to run in-process untrusted code in the first place. Are people doing that?
[#101694] Ruby 3.0.0 Released — "NARUSE, Yui" <naruse@...>
We are pleased to announce the release of Ruby 3.0.0. From 2015 we
4 messages
2020/12/25
[ruby-core:101785] [Ruby master Bug#15857] <=> の右辺が <=> を実装していない場合の振る舞い
From:
kevin.olbrich@...
Date:
2020-12-28 16:42:03 UTC
List:
ruby-core #101785
Issue #15857 has been updated by kolbrich (Kevin Olbrich). In doing a bit of maintenance work for the ruby-units gem this issue came up. I think there may be some additional methods that now need to be generated in the C code. See the following example. ``` c = Complex(1,0) c <=> 1 # => 0 c > 1 # => NoMethodError (undefined method `>' for (1+0i):Complex) c < 1 # => NoMethodError (undefined method `<' for (1+0i):Complex) c <= 1 # => NoMethodError (undefined method `<=' for (1+0i):Complex) c >= 1 # => NoMethodError (undefined method `>=' for (1+0i):Complex) ``` I would expect these methods to exist and behave in a way that is consistent with the new definition of <=>. ---------------------------------------- Bug #15857: <=> の右辺が <=> を実装していない場合の振る舞い https://bugs.ruby-lang.org/issues/15857#change-89613 * Author: shuujii (Shuji KOBAYASHI) * Status: Closed * Priority: Normal * ruby -v: ruby 2.6.3p62 (2019-04-16 revision 67580) [x86_64-linux] * Backport: 2.4: UNKNOWN, 2.5: UNKNOWN, 2.6: UNKNOWN ---------------------------------------- `<=>` の右辺が `<=>` を実装していないとき、`nil` が返却される場合と例外が発生する場合があり一貫性がないように思えるのですが、意図的でしょうか。 ```ruby 0 <=> 0i #=> NoMethodError (undefined method `<=>' for (0+0i):Complex) 0 <=> BasicObject.new #=> nil :a <=> 0i #=> nil "a" <=> 0i #=> NoMethodError (undefined method `<=>' for (0+0i):Complex) ``` なお、`0 <=> 0i` に関しては、`0 == 0i` は `true` になるのでそれとも一貫性がないように思えるのもやや気になりました。 ---Files-------------------------------- complex-real-spaceship.patch (8.75 KB) complex-real-spaceship-v2.patch (8.08 KB) complex-real-spaceship-v3.patch (7.79 KB) -- https://bugs.ruby-lang.org/ Unsubscribe: <mailto:ruby-core-request@ruby-lang.org?subject=unsubscribe> <http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>