Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1417)

Unified Diff: sdk/lib/core/bool.dart

Issue 54623003: Change bool.fromEnvironment to recognize "true" and "false" and use default for rest. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « runtime/lib/bool.cc ('k') | tests/corelib/bool_from_environment_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/core/bool.dart
diff --git a/sdk/lib/core/bool.dart b/sdk/lib/core/bool.dart
index 62d48d364080ae9e239a92ae6bd55b6f6fc4431a..8150219d02a0105fd468df416c26bd283d5025b3 100644
--- a/sdk/lib/core/bool.dart
+++ b/sdk/lib/core/bool.dart
@@ -16,14 +16,10 @@ class bool {
* Returns the boolean value of the environment declaration [name].
*
* The boolean value of the declaration is `true` if the declared value is
- * the string `"true"`. Otherwise it is false.
+ * the string `"true"`, and `false` if the value is `"false"`.
*
- * If `name` is not declared, the result is instead [defaultValue].
- *
- * This constructor is equivalent to:
- *
- * const String.fromEnvironment(name,
- * defaultValue: "$defaultValue") == "true"
+ * In all other cases, including when there is no declaration for `name`,
+ * the result is the [defaultValue].
*
* Example:
*
« no previous file with comments | « runtime/lib/bool.cc ('k') | tests/corelib/bool_from_environment_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698