summaryrefslogtreecommitdiff
path: root/ext/bigdecimal
AgeCommit message (Collapse)Author
2016-06-18Integer conversionnobu
* ext/bigdecimal/bigdecimal.c: use NUM2INT and NUM2USHORT to reject nil. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55438 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-06-17Unnecessary checksnobu
* ext/bigdecimal/bigdecimal.c: FIX2INT and FIX2UINT imply the check for Fixnum. * ext/zlib/zlib.c: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55430 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-05-23missing.h: isfinitenobu
* include/ruby/missing.h (isfinite): move from numeric.c. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55136 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-05-23* ext/bigdecimal/bigdecimal.c (isfinite): get rid of a warning onusa
cygwin. [Bug #12417][ruby-core:75691] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55133 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-05-23* ext/bigdecimal/bigdecimal.c (isfinite): isfinite does not alwaysusa
exist. fixed build error on Windows itroduced at r55123. I found that more complex definition of isfinite in numeric.c. But it's unused because it inplicitly checks not defined _WIN32. I don't know why the code do that. IMO, the definition of isfinite should be put at missing.h. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55129 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-05-23bigdecimal.c: fix FloatDomainErrornobu
* ext/bigdecimal/bigdecimal.c (GetVpValueWithPrec): consider non-finite float values not to raise FloatDomainError. [ruby-core:75682] [Bug #12414] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55123 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-04-25* encoding.c: Fix return value of `Encoding::ISO8859_1.name`hsbt
[Bug #12313][ruby-core:75147][ci skip] * ext/bigdecimal/bigdecimal.c: Fix code sample of `BigDecimal.new` git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54755 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-04-11Update dependencies.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54544 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-12-22* ext/bigdecimal/bigdecimal.gemspec: bump version to 1.2.8.mrkn
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53239 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-12-16handle ext/ as r53141naruse
g -L frozen_string_literal ext/**/*.rb|xargs ruby -Ka -e'ARGV.each{|fn|puts fn;open(fn,"r+"){|f|s=f.read.sub(/\A(#!.*\n)?(#.*coding.*\n)?/,"\\&# frozen_string_literal: false\n");f.rewind;f.write s}}' git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53143 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-12-09* ext/**/*.c (*_memsize): same as r52986 for extensions.ko1
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52988 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-12-02* ext/bigdecimal/bigdecimal.c: Fix double word typo.hsbt
[ci skip][fix GH-1120] Patch by @jwworth git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52846 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-11-08bigdecimal.c: suppress warningsnobu
* ext/bigdecimal/bigdecimal.c (AddExponent): suppress strict-overflow warnings. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52493 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-11-05ext: use RARRAY_AREFnobu
* ext/**/*.c: prefer RARRAY_AREF to indexing RARRAY_CONST_PTR. pointed out by hanmac. https://github.com/ruby/ruby/commit/3553a86#commitcomment-14187670 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52453 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-11-04ext: use RARRAY_CONST_PTRnobu
* ext/bigdecimal/bigdecimal.c: use RARRAY_CONST_PTR just fore reference instead of RARRAY_PTR, to keep the array WB-protected. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52448 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-06-13* ext/bigdecimal/bigdecimal.gemspec: Fix require paths for released gem.hsbt
[fix GH-929] Patch by @voxik * ext/io/console/io-console.gemspec: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50860 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-05-27bigdecimal.c: wrapper object before allocnobu
* ext/bigdecimal/bigdecimal.c (VpNewRbClass): make wrapper object before result structs allocation and manage refcount for each elements to get rid of potential memory leak. * ext/bigdecimal/bigdecimal.c (BigDecimal_global_new): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50650 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-04-08* bigdecimal: conform to ruby's license. [ruby-core:68466] [Bug #10952]mrkn
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50185 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-02-04bigdecimal.c: format specifiersnobu
* ext/bigdecimal/bigdecimal.c (VpInit, VpPower, VpVarCheck): fix format specifiers of BDIGIT. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49492 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-02-04bigdecimal.c: fix a typonobu
* ext/bigdecimal/bigdecimal.c (VpSetPTR): fix a typo, 'expoennt' to 'exponent'. [ruby-core:67980] [Bug #10823] [Fix GH-825] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49491 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-01-29* ext/bigdecimal/bigdecimal.c (rb_rational_num): add fallback functionmrkn
for rubies lower than 2.2.0. * ext/bigdecimal/bigdecimal.c (rb_rational_den): ditto. * ext/bigdecimal/extconf.rb: check the existences of struct RRational, rb_rational_num, and rb_rational_den. * ext/bigdecimal/bigdecimal.bundle: bump version. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49440 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-01-12* ext/bigdecimal/bigdecimal.c: fixes documentation like labeled lists,hsbt
code examples etc. [ruby-core:66730][Bug #10576][ci skip] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49219 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-12-26fix printf format conversion specifiersnobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49021 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-12-19* ext/bigdecimal/depend: Fix dependencies to make bigdecimalmrkn
installable by rubygems. * ext/bigdecimal/bigdecimal.gemspec: version 1.2.6. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48896 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-12-01use 0 for reservednobu
use 0 for rb_data_type_t::reserved instead of NULL, since its type may be changed in the future and possibly not a pointer type. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48662 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-11-21Update dependency.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48526 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-11-15Mark auogenerated part.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48441 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-11-15* common.mk: Remove comments in Dependency lines.akr
Notified by usa. * enc/depend: Ditto. * ext/**/depend: Ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48434 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-11-15* tool/update-deps: Extend to fix dependencies.akr
* common.mk: Dependencies updated by tool/update-deps. * enc/depend: Ditto. * ext/**/depend: Ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48431 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-07-31* ext/bigdecimal/bigdecimal.c: [DOC] Add description ofmrkn
`BigDecimal.new` exceptions. Patched by @joker1007 and @prathamesh-sonpatki [Fixes GH-690] https://github.com/ruby/ruby/pull/690 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47021 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-06-28bigdecimal/math.rb: error message in BigMath#PInobu
* ext/bigdecimal/lib/bigdecimal/math.rb (BigMath#PI): change error message about zero or negative precision for clarity and consistency with other methods. [GH-644] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46600 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-05-17* include/ruby/ruby.h: Hide Rational internal.akr
(RRational): Moved to internal.h (RRATIONAL): Ditto. (RRATIONAL_SET_NUM): Moved to rational.c. (RRATIONAL_SET_DEN): Ditto. * rational.c (rb_rational_num): New function. (rb_rational_den): Ditto. * include/ruby/intern.h (rb_rational_num): Declared. (rb_rational_den): Ditto. * ext/bigdecimal/bigdecimal.c: Follow the above change. * ext/date/date_core.c: Ditto. [ruby-core:60665] [Feature #9513] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45976 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-02-21class.c: do nothing if copying selfnobu
* class.c (rb_mod_init_copy): do nothing if copying self. [ruby-dev:47989] [Bug #9535] * hash.c (rb_hash_initialize_copy): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45076 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-02-16* ext/bigdecimal/bigdecimal.c (BigDecimal_initialize): Insert GC guard.mrkn
* ext/bigdecimal/bigdecimal.c (BigDecimal_global_new): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45015 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-02-16bigdecimal.c: refine macrosnobu
* ext/bigdecimal/bigdecimal.c (PUSH, SAVE): remove extra semicolons. * ext/bigdecimal/bigdecimal.c (GUARD_OBJ): add parentheses and make an expression instead of a statement. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45002 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-02-15* ext/bigdecimal/bigdecimal.c (BIGNUM_ZERO_P): Unused macro removed.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44991 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-02-15* internal.h: Rename macro names: RBIGNUM_FOO to BIGNUM_FOO.akr
(BIGNUM_EMBED_LEN_NUMBITS): Renamed from RBIGNUM_EMBED_LEN_NUMBITS. (BIGNUM_EMBED_LEN_MAX): Renamed from RBIGNUM_EMBED_LEN_MAX. (BIGNUM_SIGN_BIT): Renamed from RBIGNUM_SIGN_BIT. (BIGNUM_SIGN): Renamed from RBIGNUM_SIGN. (BIGNUM_SET_SIGN): Renamed from RBIGNUM_SET_SIGN. (BIGNUM_POSITIVE_P): Renamed from RBIGNUM_POSITIVE_P. (BIGNUM_NEGATIVE_P): Renamed from RBIGNUM_NEGATIVE_P. (BIGNUM_EMBED_FLAG): Renamed from RBIGNUM_EMBED_FLAG. (BIGNUM_EMBED_LEN_MASK): Renamed from RBIGNUM_EMBED_LEN_MASK. (BIGNUM_EMBED_LEN_SHIFT): Renamed from RBIGNUM_EMBED_LEN_SHIFT. (BIGNUM_LEN): Renamed from RBIGNUM_LEN. (RBIGNUM_DIGITS): Renamed from RBIGNUM_DIGITS. (BIGNUM_LENINT): Renamed from RBIGNUM_LENINT. * bignum.c: Follow the above change. * gc.c: Ditto. * marshal.c: Ditto. * math.c: Ditto. * numeric.c: Ditto. * random.c: Ditto. * rational.c: Ditto. * sprintf.c: Ditto. * ext/-test-/bignum/bigzero.c: Ditto. * ext/-test-/bignum/intpack.c: Ditto. * ext/bigdecimal/bigdecimal.c: Ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44989 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-02-12bigdecimal.h: suppress warningsnobu
* ext/bigdecimal/bigdecimal.h (VpSetZero, VpSetInf): get rid of unused-value warnings by gcc 4.9. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44915 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-02-11* ext/bigdecimal/bigdecimal.c (BigMath_s_log): Use rb_big_cmp instead ofakr
RBIGNUM_NEGATIVE_P. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44912 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-02-11* bignum.c (rb_big_cmp): Specialize a comparison to zero.akr
* ext/bigdecimal/bigdecimal.c (is_negative): Use rb_big_cmp instead of RBIGNUM_NEGATIVE_P. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44910 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-01-15* ext/bigdecimal/bigdecimal.gemspec: bigdecimal version 1.2.5.mrkn
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44620 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-01-15bigdecimal.c: rename macrosnobu
* ext/bigdecimal/bigdecimal.c (RB_OBJ_CLASSNAME): rename from CLASS_NAME(). * ext/bigdecimal/bigdecimal.c (RB_OBJ_STRING): for object itself. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44608 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-01-14bigdecimal.c: backword compatibility as gemnobu
* ext/bigdecimal/bigdecimal.c (CLASS_NAME): macro to wrap depending on PRIsVALUE for 1.9. [Backport #9406] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44594 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-01-14bigdecimal.c: backword compatibility as gemnobu
* ext/bigdecimal/bigdecimal.c (DECIMAL_SIZE_OF_BITS): fallback definition for 2.1 or older. [ruby-core:59750] [Backport #9406] * ext/bigdecimal/bigdecimal.c (raise_with_class): fallback definition for 1.9. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44593 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-01-13* ext/bigdecimal/bigdecimal.c (BigDecimal_divide): Add an additionalmrkn
digit for the quotient to be compatible with bigdecimal 1.2.1 and the former. [ruby-core:59365] [#9316] [#9305] * test/bigdecimal/test_bigdecimal.rb: tests for the above change. * ext/bigdecimal/bigdecimal.gemspec: bigdecimal version 1.2.4. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44588 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-01-13ext: use PRIsVALUE for rb_raise and rb_warnnobu
* ext/bigdecimal/bigdecimal.c (BigDecimal_new): use PRIsVALUE for rb_raise() and rb_warn(). * ext/openssl/ossl_cipher.c (ossl_cipher_init): ditto. * ext/racc/cparse/cparse.c (extract_user_token): ditto. * ext/syslog/syslog.c (mSyslog_log): ditto. * ext/openssl/ossl.h (OSSL_Check_Kind, OSSL_Check_Instance): now ossl_raise() also accepts PRIsVALUE. * ext/openssl/ossl_asn1.c (ossl_asn1_default_tag): git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44579 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-01-12ruby/util.h: DECIMAL_SIZE_OF_BITSnobu
* include/ruby/util.h (DECIMAL_SIZE_OF_BITS): a preprocessor constant macro to approximate decimal representation size of n-bits integer. * iseq.c (register_label): use DECIMAL_SIZE_OF_BITS for better approximation. * ext/bigdecimal/bigdecimal.c (BigMath_s_log): ditto. * common.mk (iseq.o), ext/bigdecimal/depend (bigdecimal.o): add dependency to ruby/util.h for DECIMAL_SIZE_OF_BITS. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44562 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-01-11bigdecimal.c: expand buffernobu
* ext/bigdecimal/bigdecimal.c (BigMath_s_log): expand buffer size for 64bit platforms. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44558 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-01-02* ext/bigdecimal: update class method call style from :: to .eregon
in documentation and usage. * ext/bigdecimal/lib/bigdecimal/math.rb: [DOC] fix examples values. Computations were made using ruby 2.0.0p247 to ensure no effect of the recent BigDecimal bug. * ext/bigdecimal/sample/nlsolve.rb: fix indent. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44486 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-12* ext/bigdecimal/bigdecimal.c (VpSetPTR): fix for limitation of the resultingmrkn
precision. * test/bigdecimal/test_bigdecimal.rb (test_limit): add tests for the above change. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44153 b2dd03c8-39d4-4d8f-98ff-823fe69b080e