[#83773] [Ruby trunk Bug#14108] Seg Fault with MinGW on svn 60769 — usa@...
Issue #14108 has been updated by usa (Usaku NAKAMURA).
9 messages
2017/11/15
[#83774] Re: [Ruby trunk Bug#14108] Seg Fault with MinGW on svn 60769
— Eric Wong <normalperson@...>
2017/11/15
usa@garbagecollect.jp wrote:
[#83775] Re: [Ruby trunk Bug#14108] Seg Fault with MinGW on svn 60769
— "U.NAKAMURA" <usa@...>
2017/11/15
Hi, Eric
[#83779] Re: [Ruby trunk Bug#14108] Seg Fault with MinGW on svn 60769
— Eric Wong <normalperson@...>
2017/11/15
"U.NAKAMURA" <usa@garbagecollect.jp> wrote:
[#83781] Re: [Ruby trunk Bug#14108] Seg Fault with MinGW on svn 60769
— "U.NAKAMURA" <usa@...>
2017/11/15
Hi, Eric,
[#83782] Re: [Ruby trunk Bug#14108] Seg Fault with MinGW on svn 60769
— Eric Wong <normalperson@...>
2017/11/15
"U.NAKAMURA" <usa@garbagecollect.jp> wrote:
[ruby-core:83956] [Ruby trunk Feature#3450][Closed] Format Strings with Named Arguments & Hash#default
From:
matz@...
Date:
2017-11-29 08:29:16 UTC
List:
ruby-core #83956
Issue #3450 has been updated by matz (Yukihiro Matsumoto).
Status changed from Assigned to Closed
Already fixed.
Matz.
----------------------------------------
Feature #3450: Format Strings with Named Arguments & Hash#default
https://bugs.ruby-lang.org/issues/3450#change-68025
* Author: runpaint (Run Paint Run Run)
* Status: Closed
* Priority: Normal
* Assignee: nobu (Nobuyoshi Nakada)
* Target version: next minor
----------------------------------------
=begin
Is it intentional that the, undocumented, feature #442 (named arguments in format strings) ignores the Hash's default value?
>> hash = {greeting: 'Hello'}.tap{|h| h.default = 'World'}
>> '%{greeting}, %{greeted}' % hash
#=> KeyError: key{greeted} not found
It's quite common for templates to use default values. In interface localisation, untranslated strings may need to be substituted for the equivalent in the native language, or replaced with a generic string in the target language. When building reports with format strings, a default value of an empty string allows unexpanded format sequences to be non-fatal. In both cases, a default proc would provide even further flexibility.
Another perspective is that this behavior unnecessarily breaks the abstraction that default values are just like any other.
=end
---Files--------------------------------
3450.patch (578 Bytes)
--
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>