summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
Diffstat (limited to 'ext')
-rw-r--r--ext/bigdecimal/bigdecimal.c2
-rw-r--r--ext/bigdecimal/bigdecimal.gemspec2
-rw-r--r--ext/bigdecimal/depend2
-rw-r--r--ext/bigdecimal/extconf.rb7
4 files changed, 10 insertions, 3 deletions
diff --git a/ext/bigdecimal/bigdecimal.c b/ext/bigdecimal/bigdecimal.c
index 64d7f20078..052fdc57b9 100644
--- a/ext/bigdecimal/bigdecimal.c
+++ b/ext/bigdecimal/bigdecimal.c
@@ -4271,7 +4271,7 @@ VpAlloc(size_t mx, const char *szVal, int strict_p, int exc)
while (ISSPACE(szVal[j])) ++j;
/* Invalid character */
- if (szVal[j]) {
+ if (szVal[j] && strict_p) {
goto invalid_value;
}
}
diff --git a/ext/bigdecimal/bigdecimal.gemspec b/ext/bigdecimal/bigdecimal.gemspec
index 2475de7881..c20dada329 100644
--- a/ext/bigdecimal/bigdecimal.gemspec
+++ b/ext/bigdecimal/bigdecimal.gemspec
@@ -1,6 +1,6 @@
# coding: utf-8
-bigdecimal_version = '1.4.0.pre.20181214a'
+bigdecimal_version = '1.4.0.pre.20181220a'
Gem::Specification.new do |s|
s.name = "bigdecimal"
diff --git a/ext/bigdecimal/depend b/ext/bigdecimal/depend
index 4c797d7966..943bd6c38c 100644
--- a/ext/bigdecimal/depend
+++ b/ext/bigdecimal/depend
@@ -1,5 +1,5 @@
extconf.h: $(srcdir)/$(GEMSPEC)
-Makefile: $(srcdir)/lib/bigdecimal.rb
+Makefile: $(BIGDECIMAL_RB)
# AUTOGENERATED DEPENDENCIES START
bigdecimal.o: $(RUBY_EXTCONF_H)
diff --git a/ext/bigdecimal/extconf.rb b/ext/bigdecimal/extconf.rb
index 2ae5e1b720..a6a36304cc 100644
--- a/ext/bigdecimal/extconf.rb
+++ b/ext/bigdecimal/extconf.rb
@@ -28,6 +28,13 @@ have_func("rb_rational_den", "ruby.h")
have_func("rb_array_const_ptr", "ruby.h")
have_func("rb_sym2str", "ruby.h")
+if File.file?(File.expand_path('../lib/bigdecimal.rb', __FILE__))
+ bigdecimal_rb = "$(srcdir)/lib/bigdecimal.rb"
+else
+ bigdecimal_rb = "$(srcdir)/../../lib/bigdecimal.rb"
+end
+
create_makefile('bigdecimal') {|mf|
mf << "GEMSPEC = #{gemspec_name}\n"
+ mf << "BIGDECIMAL_RB = #{bigdecimal_rb}\n"
}