[#85940] [Ruby trunk Bug#14578] Forking a child process inside of a mutex crashes the ruby interpreter — ben.govero@...
Issue #14578 has been reported by bengovero (Ben Govero).
3 messages
2018/03/05
[#86205] [Ruby trunk Feature#14618] Add display width method to String for CLI — aycabta@...
Issue #14618 has been reported by aycabta (aycabta .).
3 messages
2018/03/19
[#86366] Re: [ruby-cvs:70102] usa:r63008 (trunk): get rid of test error/failure on Windows introduced at r62955 — Eric Wong <normalperson@...>
usa@ruby-lang.org wrote:
3 messages
2018/03/28
[ruby-core:85916] [Ruby trunk Feature#14574] percent literals and binary encoding strings
From:
matthew@...
Date:
2018-03-04 04:49:11 UTC
List:
ruby-core #85916
Issue #14574 has been updated by phluid61 (Matthew Kerwin).
I think runtime-customisable percent-literal strings are a bit of a hard ask, since things like %w, %r, %x are so tightly integrated with the parser itself.
Even the question of when to stop consuming (nested brackets? escape characters?) means there will be messy and confusing edge-cases.
I'm not against the idea *per se*, I just think it's not workable in the Ruby we have today.
----------------------------------------
Feature #14574: percent literals and binary encoding strings
https://bugs.ruby-lang.org/issues/14574#change-70772
* Author: pb (pumbur _)
* Status: Open
* Priority: Normal
* Assignee:
* Target version:
----------------------------------------
coding `"\x00".force_encoding('binary')` or `["\x00"].pack('a*')` is a hassle, is there a chance to have special percent literal for it?
i.e: `%b"\x00"` would return binary string. (note, signle-character \x00 there is accidental, the idea is force any string from script encoding to binary)
or, more general suggestion:
allow percent literal with any [a-z] character, move all logic to user-level and allow it to be redefinable:
~~~ ruby
define_percent_literal(:b){|q| q.force_encoding('binary') }
%b'\x00' #=> "\x00"
~~~
--
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>