-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* examples: fix (2020-10) * examples: fix to keep the nuance for the two cases: found and default. * examples: leave it as is about string stuffs. * examples: Modified the Log::StaticFormatter#source example to be a full setup * Update src/openssl/digest/digest_io.cr Co-authored-by: Brian J. Cardiff <[email protected]>
- Loading branch information
Showing
9 changed files
with
21 additions
and
13 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
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 |
---|---|---|
|
@@ -221,6 +221,7 @@ module HTTP | |
# *default* value when there is no such param. | ||
# | ||
# ``` | ||
# params["email"] = "[email protected]" | ||
# params.fetch("email", "[email protected]") # => "[email protected]" | ||
# params.fetch("non_existent_param", "default value") # => "default value" | ||
# ``` | ||
|
@@ -232,6 +233,7 @@ module HTTP | |
# of provided block when there is no such param. | ||
# | ||
# ``` | ||
# params.delete("email") | ||
# params.fetch("email") { raise "Email is missing" } # raises "Email is missing" | ||
# params.fetch("non_existent_param") { "default computed value" } # => "default computed value" | ||
# ``` | ||
|
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
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
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