An empty Hash passed to a method taking a keyword rest argument is not dup'd. A modification to the keyword rest Hash in the method modifies the object passed to the method. This behavior differs from passing a non-empty Hash. http...brixen (Brian Shirai)
Case 1: If a method takes a single argument, and the method is called with a keyword splat, the method receives the passed object, not the result of calling `#to_hash` on the object: ~~~ruby # kw1.rb def m(a) a end o = Object.new ...brixen (Brian Shirai)
The `Numeric#step` documentation states: "If any of the arguments are floating point numbers, all are converted to floats..." https://github.com/ruby/ruby/blob/trunk/numeric.c#L1921 Is the following code intended to be described...brixen (Brian Shirai)
> It would be a very bad idea to have a directive that completely changes the meaning of code from one file to another. For consistency sake, it should be noted that, in fact, this is exactly what the existing encoding pragma does, an...brixen (Brian Shirai)
In 2.1, Symbol, Fixnum, Bignum, and Float (at least) have been changed to frozen by default. Consequently, calling #taint on an instance of those classes raises a RuntimeError because a frozen object cannot be modified to be tainted. How...brixen (Brian Shirai)
Martin, what do you mean by: "However, the question is whether the resulting string should always be BINARY (exactly mirroring what happens with real IO)..."? If StringIO is going to fake aliasing #pos across instances that have been ...brixen (Brian Shirai)
=begin In the following script, an ASCII-8BIT String is written to a StringIO created with a UTF-8 String without error. However, a << b or a + b will raise an exception, as will writing an ASCII-8BIT String to a File with UTF-8 externa...brixen (Brian Shirai)
#set_encoding accepts ("bom|utf-16be:euc-jp") but rejects ("bom|utf-16be", "euc-jp"). This is inconsistent, confusing, and has nothing to do with the artificial mode vs encoding justification above. This inconsistency requires additional...brixen (Brian Shirai)