Permalink
Browse files

Get rid of a few more gratuitous &blocks.

This time, only removing things that are *actually* gratuitous.
  • Loading branch information...
1 parent ffae097 commit 03b9d5ebd21b04e43c378a078d33e0fad41c82d6 @nex3 nex3 committed Feb 21, 2012
Showing with 6 additions and 6 deletions.
  1. +2 −2 lib/sass/scss/parser.rb
  2. +2 −2 lib/sass/tree/node.rb
  3. +2 −2 lib/sass/tree/visitors/check_nesting.rb
View
@@ -792,11 +792,11 @@ def str
@strs.pop
end
- def str?(&block)
+ def str?
pos = @scanner.pos
line = @line
@strs.push ""
- throw_error(&block) && @strs.last
+ throw_error {yield} && @strs.last
rescue Sass::SyntaxError => e
@scanner.pos = pos
@line = line
View
@@ -158,9 +158,9 @@ def do_extend(extends)
#
# @yield node
# @yieldparam node [Node] a node in the tree
- def each(&block)
+ def each
yield self
- children.each {|c| c.each(&block)}
+ children.each {|c| c.each {|n| yield n}}
end
# Converts a node to Sass code that will generate it.
@@ -125,9 +125,9 @@ def is_any_of?(val, classes)
return false
end
- def try_send(method, *args, &block)
+ def try_send(method, *args)
return unless respond_to?(method)
- send(method, *args, &block)
+ send(method, *args)
end
end

0 comments on commit 03b9d5e

Please sign in to comment.