[#100689] [Ruby master Feature#17303] Make webrick to bundled gems or remove from stdlib — hsbt@...
Issue #17303 has been reported by hsbt (Hiroshi SHIBATA).
11 messages
2020/11/02
[#100852] [Ruby master Feature#17326] Add Kernel#must! to the standard library — zimmerman.jake@...
SXNzdWUgIzE3MzI2IGhhcyBiZWVuIHJlcG9ydGVkIGJ5IGpleiAoSmFrZSBaaW1tZXJtYW4pLg0K
24 messages
2020/11/14
[#100930] [Ruby master Feature#17333] Enumerable#many? — masafumi.o1988@...
Issue #17333 has been reported by okuramasafumi (Masafumi OKURA).
10 messages
2020/11/18
[#101071] [Ruby master Feature#17342] Hash#fetch_set — hunter_spawn@...
Issue #17342 has been reported by MaxLap (Maxime Lapointe).
26 messages
2020/11/25
[ruby-core:101106] [Ruby master Bug#17348] Shadowed method can not be evaluated on the line that it is shadowed
From:
marcandre-ruby-core@...
Date:
2020-11-26 20:03:21 UTC
List:
ruby-core #101106
Issue #17348 has been updated by marcandre (Marc-Andre Lafortune). In Ruby 3, you can write `a[0] => a` and that works :-) ---------------------------------------- Bug #17348: Shadowed method can not be evaluated on the line that it is shadowed https://bugs.ruby-lang.org/issues/17348#change-88781 * Author: d-snp (Tinco Andringa) * Status: Rejected * Priority: Normal * ruby -v: ruby 2.7.1p83 (2020-03-31 revision a0c7c23c9c) [x86_64-darwin19] * Backport: 2.5: UNKNOWN, 2.6: UNKNOWN, 2.7: UNKNOWN ---------------------------------------- I encountered this in the code a junior Rubyist wrote. Rewriting to more logical code solved our problem, but in my opinion it should not have been an error. I reduced the code to this: ``` ruby def a "" end a = a[0] puts a.inspect ``` Expected: `nil` Got: ``` Traceback (most recent call last): shadowed.rb:4:in `<main>': undefined method `[]' for nil:NilClass (NoMethodError) ``` Note that: ``` ruby a = "" a = a[0] puts a.inspect ``` Does work as expected, so it is specifically when a method is shadowed that this unexpected behaviour occurs. -- 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>