From 72558391a2e30726d200a5310f2030f78aeaf7a1 Mon Sep 17 00:00:00 2001 From: Josh Holtrop Date: Fri, 8 Nov 2013 15:45:24 -0500 Subject: [PATCH] clarify documentation about cloning Environments --- README.md | 6 +++--- lib/rscons/environment.rb | 8 ++++---- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 34fb08f..bc72a66 100644 --- a/README.md +++ b/README.md @@ -127,9 +127,9 @@ An Rscons::Environment consists of: * a collection of targets to build * a collection of build hooks -When cloning an environment, the construction variables, builders, and build -directories are cloned, but the new environment does not inherit any of the -targets or build hooks from the source environment. +When cloning an environment, the construction variables and builders are +cloned, but the new environment does not inherit any of the targets, build +hooks, build directories, or the build root from the source environment. Cloned environments contain "deep copies" of construction variables. For example, in: diff --git a/lib/rscons/environment.rb b/lib/rscons/environment.rb index 982eaf1..48f803f 100644 --- a/lib/rscons/environment.rb +++ b/lib/rscons/environment.rb @@ -45,10 +45,10 @@ module Rscons # Make a copy of the Environment object. # The cloned environment will contain a copy of all environment options, - # construction variables, builders, and build directories. It will not - # contain a copy of the targets or build hooks. - # If a block is given, the Environment object is yielded to the block and - # when the block returns, the {#process} method is automatically called. + # construction variables, and builders. It will not contain a copy of the + # targets, build hooks, build directories, or the build root. If a block + # is given, the Environment object is yielded to the block and when the + # block returns, the {#process} method is automatically called. def clone(variables = {}) env = Environment.new() @builders.each do |builder_name, builder|