From 7f4add8136a94f8caf42ebee52f272eec9fe98f8 Mon Sep 17 00:00:00 2001 From: Fredrik Ekre Date: Fri, 30 Nov 2018 19:31:22 +0100 Subject: [PATCH] News and compat annotation for #29997 (parse(Bool, str)). --- NEWS.md | 1 + base/parse.jl | 3 +++ 2 files changed, 4 insertions(+) diff --git a/NEWS.md b/NEWS.md index 78fc1742d80e89..30fa7eb8a7fe6f 100644 --- a/NEWS.md +++ b/NEWS.md @@ -78,6 +78,7 @@ Standard library changes * `mean` and `var` now handles the empty case ([#29033]). * New `sort!(::AbstractArray; dims)` method that can sort the array along the `dims` dimension ([#28902]). * `range` now accept `stop` as a positional argument ([#28708]). + * `parse(Bool, str)` is now supported ([#29997]). Compiler/Runtime improvements ----------------------------- diff --git a/base/parse.jl b/base/parse.jl index 15edab83c33d88..b21d85f7faf99a 100644 --- a/base/parse.jl +++ b/base/parse.jl @@ -14,6 +14,9 @@ of the form `"RĀ±Iim"` as a `Complex(R,I)` of the requested type; `"i"` or `"j"` used instead of `"im"`, and `"R"` or `"Iim"` are also permitted. If the string does not contain a valid number, an error is raised. +!!! compat "Julia 1.1" + `parse(Bool, str)` requires at least Julia 1.1. + # Examples ```jldoctest julia> parse(Int, "1234")