[#105450] [Ruby master Feature#18228] Add a `timeout` option to `IO.copy_stream` — "byroot (Jean Boussier)" <noreply@...>
SXNzdWUgIzE4MjI4IGhhcyBiZWVuIHJlcG9ydGVkIGJ5IGJ5cm9vdCAoSmVhbiBCb3Vzc2llciku
11 messages
2021/09/27
[ruby-core:105352] [Ruby master Bug#18180] opt_newarray_min/max instructions ignore refined methods
From:
"wanabe (_ wanabe)" <noreply@...>
Date:
2021-09-20 13:36:30 UTC
List:
ruby-core #105352
Issue #18180 has been reported by wanabe (_ wanabe). ---------------------------------------- Bug #18180: opt_newarray_min/max instructions ignore refined methods https://bugs.ruby-lang.org/issues/18180 * Author: wanabe (_ wanabe) * Status: Open * Priority: Normal * Backport: 2.6: UNKNOWN, 2.7: UNKNOWN, 3.0: UNKNOWN ---------------------------------------- ``` $ ./miniruby -ve 'module M; refine Array do; def max; :max; end; def min; :min; end; end; end; using M; p [1 + 0, 2, 3].max, [1 + 0, 2, 3].min' ruby 3.1.0dev (2021-09-20T10:07:58Z master cb8434563d) [x86_64-linux] 3 1 ``` I expected :max and :min to be returned. If I avoid the opt_newarray_min/max instruction, the behavior will be as expected. ``` $ ./miniruby -ve 'module M; refine Array do; def max; :max; end; def min; :min; end; end; end; using M; p [1, 2, 3].max, [1, 2, 3].min' ruby 3.1.0dev (2021-09-20T10:07:58Z master cb8434563d) [x86_64-linux] :max :min ``` -- https://bugs.ruby-lang.org/ Unsubscribe: <mailto:[email protected]?subject=unsubscribe> <http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>