I've found that usual-if and postfix-if work differently when there is an assignment in condition. In both cases, a value is assigned to a variable, but in postfix-if left part doesn't have access to a variable if it is a local variable...prijutme4ty (Ilya Vorontsov)
My use case is just a simple example showing why current behavior isn't as good as it can be. That's not about lambdas at all. That's about instance_eval being more clever, because there's no reason to yield receiver to a block when b...prijutme4ty (Ilya Vorontsov)
At a moment #instance_eval always yields an object to a given block. Though if we passed lambda as a block for instance_eval, its work depend on number of arguments. But I see no reason for such strictness when lambda gets zero arguments...prijutme4ty (Ilya Vorontsov)
Second call to `categories.collect!` works over Categories object. `Set#collect!` tries to create a new set. `Categories.collect!` in turn tries to create new `Categories`. ```ruby s=Set.new([1,2,3]) s.object_id # => 7618880 s.coll...prijutme4ty (Ilya Vorontsov)
Why introduce one more method if we can just implement `#uniq` (with or without block, sticking to `Array#uniq` semantics) for `Enumerable` and `Enumerator::Lazy`? With `Enumerator::Lazy` we do not need to create an array. ```ruby mo...prijutme4ty (Ilya Vorontsov)
Propose to make Struct subclass constructors which accept keyword arguments. Not sure, if it's reasonable to allow `.new` accept kwargs, so may be should use different method named like `.create`: ```ruby Point = Struct.new(:x,:y, ...prijutme4ty (Ilya Vorontsov)
`Struct.new(*args, &block)` creates a subclass of `Struct`. Some methods like accessors are defined right in newly created class. Others like `#initialize`, `#values` and so on are declared in a superclass, i.e. in `Struct`. The fact th...prijutme4ty (Ilya Vorontsov)