Skip to content

Commit

Permalink
Merge pull request #13 from kengos/master
Browse files Browse the repository at this point in the history
taputsにブロックを渡せなかった問題を修正した
  • Loading branch information
ursm committed Aug 10, 2012
2 parents e0a5d71 + 06c815c commit e89db5d
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/tapp/object_extension.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ def tapp(printer = Tapp.config.default_printer)
}
end

def taputs
tapp :puts
def taputs(&block)
tapp :puts, &block
end

def taap
Expand Down
16 changes: 16 additions & 0 deletions spec/acceptance/taputs.feature
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,19 @@ Feature: Object#taputs
3
5
"""

Scenario: Call taputs with block
Given I have the following code:
"""
(1..5).taputs(&:count).select(&:odd?).taputs
"""

When Ruby it

Then I should see:
"""
5
1
3
5
"""

0 comments on commit e89db5d

Please sign in to comment.