summaryrefslogtreecommitdiff
path: root/ext/bigdecimal
diff options
context:
space:
mode:
authorKenta Murata <mrkn@mrkn.jp>2019-12-23 11:07:23 +0900
committerNobuyoshi Nakada <nobu@ruby-lang.org>2020-07-06 01:15:47 +0900
commit6a826eb4b08484cb3b6279da905f5b9e03e0df5f (patch)
tree000e618b343805cb4c63792b2a1aea8d54581604 /ext/bigdecimal
parente794d96ca439a698483b2e76d104b77a1cfdcc94 (diff)
[ruby/bigdecimal] Return US-ASCII string from BigDecimal#to_s
Fixes #159 https://github.com/ruby/bigdecimal/commit/57ee92e700
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/3295
Diffstat (limited to 'ext/bigdecimal')
-rw-r--r--ext/bigdecimal/bigdecimal.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/bigdecimal/bigdecimal.c b/ext/bigdecimal/bigdecimal.c
index 3800152..e0e1c68 100644
--- a/ext/bigdecimal/bigdecimal.c
+++ b/ext/bigdecimal/bigdecimal.c
@@ -2092,7 +2092,7 @@ BigDecimal_to_s(int argc, VALUE *argv, VALUE self)
nc += (nc + mc - 1) / mc + 1;
}
- str = rb_str_new(0, nc);
+ str = rb_usascii_str_new(0, nc);
psz = RSTRING_PTR(str);
if (fmt) {