General

Profile

avit (Andrew Vit)

  • Login: avit
  • Email: andrew@avit.ca
  • Registered on: 09/28/2013
  • Last sign in: 04/10/2022

Issues

open closed Total
Assigned issues 0 0 0
Reported issues 0 8 8

Activity

04/10/2022

06:26 AM Ruby Feature #17849: Fix Timeout.timeout so that it can be used in threaded Web servers
The handling of timeouts is [documented][1], but that only shows it with a `handle_interrupt` block set up around everything, not under `ensure`. In the examples shown here, can `ensure;begin` or `ensure;Thread.handle_interrupt` be consi... avit (Andrew Vit)

09/10/2020

09:34 PM Ruby Feature #16794: Rightward operators
For symmetry, we also have `<<-` for heredocs "take this input for..."
It might make sense to think of `->>` as "give this output to..."
avit (Andrew Vit)

05/31/2018

11:08 PM Ruby Feature #14594: Rethink yield_self's name
matz (Yukihiro Matsumoto) wrote:
> If you really wanted a non-unwrapping method for promises, use `yield_self`.
If I understand what you mean by "unwrapping" here, the new method still doesn't `call` yielded procs to make them compos...
avit (Andrew Vit)

05/29/2018

05:49 AM Ruby Bug #14793: Hash returned from CGI.parse has [] as default value
My mistake, it looks like all CGI values are always returned as arrays:
~~~
CGI.parse("x=y")
#=> {"x"=>["y"]}
~~~
Please close.
avit (Andrew Vit)
05:39 AM Ruby Bug #14793 (Closed): Hash returned from CGI.parse has [] as default value
Is there a valid reason for this behaviour? It looks like a bug to me:
~~~
require 'cgi'
params = CGI.parse("")
params["x"]
#=> []
~~~
(Expected nil)
I looked at history and it looks like it has been there from the very b...
avit (Andrew Vit)

02/25/2018

07:51 PM Ruby Feature #14550: Support keyword arguments with Date#step
If adding keyword options, would it make sense to add the possibility to enumerate by `>>` for whole months instead of only `succ` days, or is that out of scope here? avit (Andrew Vit)

12/21/2017

06:15 AM Ruby Feature #12318: Returning the evaluated value of a block
This is now implemented as `yield_self`
Close please?
avit (Andrew Vit)

11/19/2017

06:52 PM Ruby Feature #14112: Follow style conventions for Ruby code
Some elements of ruby style are hard to check statically because they encode semantics.
For example, I prefer to write blocks using [Weirich Braces][1]: this feels less arbitrary than changing syntax for single vs. multi-line blocks. ...
avit (Andrew Vit)

10/20/2017

12:56 AM Ruby Feature #14022: String#surround
An alternate (short but cryptic) way:
```
str = "one\ntwo"
str.gsub(/^.*/m, '<\0>')
```
- gsub! can do it destructively
- using `/m` can control if it wraps each line, or all
(A similar usage for wrapping characters in a str...
avit (Andrew Vit)

10/06/2017

10:35 AM Ruby Feature #5964: Make Symbols an Alternate Syntax for Strings
My only point was that symbols are not meant to be operated on the same as strings, because they do serve different purposes. They can serve as a kind of lightweight type-safety when you are dealing with an internal identifier, but in pr... avit (Andrew Vit)

Also available in: Atom