stephencelis (Stephen Celis)
- Login: stephencelis
- Email: stephen.celis@gmail.com
- Registered on: 06/10/2013
- Last sign in: 11/09/2016
Issues
| open | closed | Total | |
|---|---|---|---|
| Assigned issues | 0 | 0 | 0 |
| Reported issues | 0 | 1 | 1 |
Activity
01/26/2016
-
11:15 PM Ruby Misc #12004: Code of Conduct
- I'd like to add my vote in favor of a CoC, too. The Swift team put a lot of thought into its community and currently adopts CC 1.3.
07/17/2014
-
06:38 PM Ruby Bug #8507: Keyword splat does not convert arg to Hash
- Another issue with keyword args and consistency with args:
- *args are immutable
- **kwargs are mutable
~~~ruby
def splat *args
args << 'foobar'
end
arr = []
splat(*arr)
arr # => []
def double_splat **kwargs
kwargs[:...
07/15/2013
-
05:38 AM Ruby Bug #8507: Keyword splat does not convert arg to Hash
- Thanks for weighing in. Given that nil is so prevalent in the language, I don't think we can ignore it.
Also, `**foo` does already exist in the language, and it does do something (validates that the hash acts like kwargs and raises a ...
07/07/2013
-
10:23 AM Ruby Bug #8507: Keyword splat does not convert arg to Hash
- Tried my best to thoughtfully address questions before: http://bugs.ruby-lang.org/issues/8507#note-6
Does anyone have any additional thoughts on the matter?
06/11/2013
-
05:56 AM Ruby Bug #8507: Keyword splat does not convert arg to Hash
- Hm... `nil.to_h => {}` is brand-new and creates an analog to `nil.to_a`, so why would we remove `nil.to_a`?
`(**nil)` would be another tool that a programmer could use when handing arguments off between methods. One can currently use ...
06/10/2013
-
01:32 PM Ruby Bug #8507: Keyword splat does not convert arg to Hash
- To return to the original question:
> Do you really want to do `splat(**nil)`?
I find that Ruby's flexibility has been nice when providing public interfaces in gems and libraries. It's nice to be able to pass in `*nil` to a public ... -
01:29 PM Ruby Bug #8507: Keyword splat does not convert arg to Hash
- Is there logic behind the current state that I'm unaware of? Consistency is predictability, which is important when learning a new interface. If splatted nils are swallowed, why not double-splatted nils? One raising where the other doesn...
-
03:27 AM Ruby Bug #8507 (Rejected): Keyword splat does not convert arg to Hash
- A single splat is useful to convert an object to an array as it passes from one method to the next, so I expected the double-splat to do the same and convert the object to a hash.
~~~ruby
def splat *args
p args
end
def double_sp...