Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Added comments to process_block_pass to document how crazy some peopl…

…e are

[git-p4: depot-paths = "//src/flog/dev/": change = 8286]
  • Loading branch information...
commit bbde34db4d3819b37192a26aefa21a59f03ae4e5 1 parent f8cdab9
@zenspider zenspider authored
Showing with 8 additions and 4 deletions.
  1. +8 −4 lib/flog.rb
View
12 lib/flog.rb
@@ -576,13 +576,17 @@ def process_block_pass(exp)
add_to_score :block_pass
case arg.first
- when :lvar, :dvar, :ivar, :cvar, :self, :const, :colon2, :nil then
+ when :lvar, :dvar, :ivar, :cvar, :self, :const, :colon2, :nil then # f(&b)
# do nothing
- when :lit, :call then
+ when :lit, :call then # f(&:b)
add_to_score :to_proc_normal
- when :lasgn then # blah(&l = proc { ... })
+ when :lasgn then # f(&l=b)
add_to_score :to_proc_lasgn
- when :iter, :dsym, :dstr, *BRANCHING then
+ when :iter, :dsym, :dstr, *BRANCHING then # below
+ # f(&proc { ... })
+ # f(&"#{...}")
+ # f(&:"#{...}")
+ # f(&if ... then ... end") and all other branching forms
add_to_score :to_proc_icky!
else
raise({:block_pass_even_ickier! => arg}.inspect)
Please sign in to comment.
Something went wrong with that request. Please try again.