forked from ruby/rake
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
103 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
|
||
|
||
|
||
###################################################### | ||
# | ||
# **** DO NOT EDIT **** | ||
# | ||
# **** THIS IS A GENERATED FILE ***** | ||
# | ||
###################################################### | ||
|
||
|
||
|
||
unless respond_to? :tap | ||
module Kernel | ||
def tap | ||
yield self | ||
self | ||
end | ||
end | ||
end | ||
|
||
|
||
|
||
###################################################### | ||
# | ||
# **** DO NOT EDIT **** | ||
# | ||
# **** THIS IS A GENERATED FILE ***** | ||
# | ||
###################################################### | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
|
||
|
||
|
||
###################################################### | ||
# | ||
# **** DO NOT EDIT **** | ||
# | ||
# **** THIS IS A GENERATED FILE ***** | ||
# | ||
###################################################### | ||
|
||
|
||
|
||
require 'comptree/quix/builtin/kernel/tap' | ||
|
||
module CompTree::Quix | ||
module Diagnostic | ||
def show(desc = nil, stream = STDOUT, &block) | ||
if desc | ||
stream.puts(desc) | ||
end | ||
if block | ||
expression = block.call | ||
eval(expression, block.binding).tap { |result| | ||
stream.printf("%-16s => %s\n", expression, result.inspect) | ||
} | ||
end | ||
end | ||
|
||
if $DEBUG | ||
def debug | ||
yield | ||
end | ||
|
||
def debugging? | ||
true | ||
end | ||
|
||
def trace(desc = nil, &block) | ||
if desc | ||
show("#{desc}.".sub(%r!\.\.+\Z!, ""), STDERR, &block) | ||
else | ||
show(nil, STDERR, &block) | ||
end | ||
end | ||
else | ||
# non-$DEBUG | ||
def debug ; end | ||
def debugging? ; end | ||
def trace(*args) ; end | ||
end | ||
|
||
extend self | ||
end | ||
end | ||
|
||
|
||
|
||
|
||
###################################################### | ||
# | ||
# **** DO NOT EDIT **** | ||
# | ||
# **** THIS IS A GENERATED FILE ***** | ||
# | ||
###################################################### | ||
|
||
|