diff options
author | Dominik Picheta <dominikpicheta@gmail.com> | 2018-02-17 22:24:43 +0000 |
---|---|---|
committer | Dominik Picheta <dominikpicheta@gmail.com> | 2018-02-17 22:24:43 +0000 |
commit | c74a65662a052b01cf5946133dc7d77af20650da (patch) | |
tree | c838b68c79465a7b2efadc37e400131ee690fa5f | |
parent | fe6fddb9d83c099ee407bced8d59e11e351ecd58 (diff) | |
download | Nim-c74a65662a052b01cf5946133dc7d77af20650da.tar.gz |
Revert "Fixes #4265."
This reverts commit fe6fddb9d83c099ee407bced8d59e11e351ecd58.
-rw-r--r-- | changelog.md | 2 | ||||
-rw-r--r-- | lib/pure/strtabs.nim | 2 |
2 files changed, 1 insertions, 3 deletions
diff --git a/changelog.md b/changelog.md index 194e098a8..73d7e7d9b 100644 --- a/changelog.md +++ b/changelog.md @@ -257,8 +257,6 @@ bar() - The ``securehash`` module is now deprecated. Instead import ``std / sha1``. - ``db_mysql`` module: ``DbConn`` is now a ``distinct`` type that doesn't expose the details of the underlying ``PMySQL`` type. -- ``strtabs.getOrDefault`` now returns ``nil`` instead of ``""``. See - [#4265](https://github.com/nim-lang/Nim/issues/4265) for more info. - Standard library modules can now also be imported via the ``std`` pseudo-directory. This is useful in order to distinguish between standard library and nimble package imports: diff --git a/lib/pure/strtabs.nim b/lib/pure/strtabs.nim index 942c2eb72..75c5e171d 100644 --- a/lib/pure/strtabs.nim +++ b/lib/pure/strtabs.nim @@ -129,7 +129,7 @@ proc mget*(t: StringTableRef, key: string): var string {.deprecated.} = ## ``KeyError`` exception is raised. Use ```[]``` instead. get(t, key) -proc getOrDefault*(t: StringTableRef; key: string, default: string = nil): string = +proc getOrDefault*(t: StringTableRef; key: string, default: string = ""): string = var index = rawGet(t, key) if index >= 0: result = t.data[index].val else: result = default |