Skip to content

Commit

Permalink
Merge pull request tidyverse#434 from jimhester/feature/issue416
Browse files Browse the repository at this point in the history
save results from default_locale
  • Loading branch information
jimhester committed Jun 15, 2016
2 parents afb2a0d + 6ed28bc commit 3b677d5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
2 changes: 2 additions & 0 deletions NEWS.md
@@ -1,6 +1,8 @@
# readr 0.2.2.9000

* Supports reading into long vectors (#309, @jimhester).
* `default_locale()` now sets the default locale in `readr.default_locale`
rather than regenerating it for each call. (#416, @jimhester).

* Printing of double values now uses an
[implementation](https://github.com/juj/MathGeoLib/blob/master/src/Math/grisu3.c)
Expand Down
7 changes: 2 additions & 5 deletions R/locale.R
Expand Up @@ -90,11 +90,8 @@ print.locale <- function(x, ...) {
default_locale <- function() {
loc <- getOption("readr.default_locale")
if (is.null(loc)) {
return(locale())
}

if (interactive()) {
message("Using non-default locale")
loc <- locale()
options("readr.default_locale" = loc)
}

loc
Expand Down

0 comments on commit 3b677d5

Please sign in to comment.