There isn't much consistency in the docs when it comes to blocks. So I decided to go with the style that is most often used: {|obj| block }
No spaces, only around the block.
I can fix the other classes as well but before I do this let me know if this is the preferred style.
=begin
I would prefer spaces for both the arguments and the block like ((|{ |args| block }|)) as it seems to be the modern style over no space between the curly-brace and the pipe like ((|{|args| block }|)) as it seems to older.
If you submit just a patch for enum.c I can give you better feedback for future clean-ups.
=end
ruby -v changed from ruby 1.9.2p290 (2011-07-09 revision 32553) [x86_64-darwin10.8.0] to -
Hi,
(11/10/04 8:28), Eric Hodel wrote:
I would prefer spaces for both the arguments and the block like
((|{ |args| block }|)) as it seems to be the modern style over no
space between the curly-brace and the pipe like ((|{|args| block}|))
as it seems to older.
Oops, you call me an old man ;-)
Is it in fashion these days, boy?
This issue was solved with changeset r33480.
b, thank you for reporting this issue.
Your contribution to Ruby is greatly appreciated.
May Ruby be with you.
enum.c: Reformat block args to a single standard, { |args| ... }.
Patch by b t. [Ruby 1.9 - Bug #5393]