From 0325c516b350bef9115e43b54c87e5d4cdf77bed Mon Sep 17 00:00:00 2001 From: Hiroshi SHIBATA Date: Fri, 6 Feb 2026 10:56:34 +0900 Subject: [PATCH] Document implicit file tasks --- doc/command_line_usage.rdoc | 2 +- doc/rakefile.rdoc | 13 +++++++++++++ 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/doc/command_line_usage.rdoc b/doc/command_line_usage.rdoc index c1ff39d5b..0f7113564 100644 --- a/doc/command_line_usage.rdoc +++ b/doc/command_line_usage.rdoc @@ -105,7 +105,7 @@ Options are: Require _name_ before executing the Rakefile. [--rules] - Trace the rules resolution. + Trace the resolution of rules used to create tasks. [--silent (-s)] Like --quiet, but also suppresses the 'in directory' announcement. diff --git a/doc/rakefile.rdoc b/doc/rakefile.rdoc index 4014306a1..949e40d6f 100644 --- a/doc/rakefile.rdoc +++ b/doc/rakefile.rdoc @@ -360,6 +360,19 @@ The following rule might be used for Java files ... *NOTE:* +java_compile+ is a hypothetical method that invokes the java compiler. +=== Implicit File Tasks + +When a task is not defined but a file with that name exists, Rake +automatically creates an implicit file task for it. For example: + + $ rake hello_world # Error: task not found + $ touch hello_world # Create a file with the same name + $ rake hello_world # Now succeeds automatically + +Use the --rules command line option to trace how rules are +resolved when searching for tasks; note that creation of implicit file +tasks is not traced. + == Importing Dependencies Any ruby file (including other rakefiles) can be included with a