The name "insert" seems good to me because it implies a *new* entry and unable to change an *old* entry. But key-value pair must be thought of as an *entry* too for it to make sense (I guess I get that notion from Java http://docs.oracle...atlas (Atlas Prime)
I watched Matz recent keynote about the future of Ruby. I wonder if Ruby can become an immutable language? That could be expedited by a port of Clojure's immutable types. Then add concurrency and distributed computing (perhaps modeled af...atlas (Atlas Prime)
Hash doesn't appear to have a "safe" way to insert an entry that won't clobber another key if it is already there. So how about: ~~~ class Hash # Like Hash#store but only stores if the key isn't already # in the hash. Returns...atlas (Atlas Prime)
Some objects can't use #dup or #clone b/c they are singleton, like Integer. So an error is raised if one tries. > 5.dup TypeError: can't dup Fixnum It would helpful if there was an easy way to check if this is so on an a...atlas (Atlas Prime)
Daniel, that does seem like an even better idea. But it's also a much bigger change. I wonder what effect would that have on performance? Also, I wonder if there could still some type of "severity" level. For instance I could imagine wan...atlas (Atlas Prime)
That's a great idea! Abstracting the interface away as a method leaves the underpinnings free for adjustment. With that, it seems most intuitive that `-W[level]` would simply translate directly into $WARN=level. And `-W0` flag would stil...atlas (Atlas Prime)
I realized if `-W0` is to remain the same meaning as it does now than one modification to the above idea is required: The warning levels must start with `1` instead of `0`. Zero would be equivalent to `nil`. So given that, and `example.r...atlas (Atlas Prime)
Two suggestions for future version of Ruby that wold make warning levels more intuitive easier to work with. First, rename $VERBOSE to $WARN for these reasons: * `ruby` flags that set $VERBOSE are `-w` and `-W` (warnings levels). ...atlas (Atlas Prime)
@nobu I found that out but it seems kind of hackish way to have to do it. (Also a little counter-intuitive since Kernel is not in BasicObject). I ended up with: def to_enum(meth=:each) Enumerator.new{ |y| __send__(meth) { |...atlas (Atlas Prime)
P.S. This interface for bug reports is buggy (and I see no way to fix what I submitted). Not to offend, but why do it when there is GitHub issues?atlas (Atlas Prime)