For the most common cases of `rotate!` one place to the right or to the left, instead of doing some reversals of the array we just keep a single value in a temporary value, use memmove and then put the temporary value where it should be.asterite (Ary Borenszweig)
Applied in changeset commit:git|96617ad1d57a13e9a282fb663ea73e4801519389. ---------- IRB colorize: take into account recursive arrays and hashes (#2555) [Bug #16250]asterite (Ary Borenszweig)
Interestingly enough, it doesn't happen when you have: ~~~ruby text1 = <<~FOO one#{" two " * 1} FOO ~~~ So it seems Ruby does this only when the interpolation has a string literal, presumably to optimize that out and em...asterite (Ary Borenszweig)
Given this program: ~~~ruby text1 = <<~FOO one#{" two "} FOO text2 = <<~FOO one#{" two "} FOO p text1 p text2 ~~~ The output is: ~~~ "one two \n" "one two \n" ~~~ The two should be equal. ...asterite (Ary Borenszweig)
You can't use keywords as names for normal arguments. For example all of these give a syntax error: ~~~ruby def foo(class); end def foo(def); end def foo(if); end # ... other keywords too ~~~ The reason is that there's no way ...asterite (Ary Borenszweig)
I think this was introduced in https://github.com/ruby/ruby/commit/9987109 Basically, any call `foo arg { }` when `arg` is a literal now gives an error. I think this is a huge breaking change, for example if you had something like:...asterite (Ary Borenszweig)
I believe a fix for this is: ~~~ Index: string.c =================================================================== --- string.c (revision 57085) +++ string.c (working copy) @@ -7409,8 +7409,9 @@ if (rb_enc_is_newline(prev...asterite (Ary Borenszweig)
I don't think this is a bug, Ruby only parses English month names, it can't possibly try to check all languages in the world. When it can't deduce a month, it uses the current month, which right now is december.asterite (Ary Borenszweig)