bigdecimal.c: expand buffer

* 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-11

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44559 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
test_bigmath.rb: test_log

* test/bigdecimal/test_bigmath.rb (test_log): add basic test for BigMath.log.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44560 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
test_bigmath.rb: r44558

* test/bigdecimal/test_bigmath.rb (test_log): add assertion for r44558.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44561 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
ruby/util.h: DECIMAL_SIZE_OF_BITS

* 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-12

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44563 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
iseq.c: potential memory leak

* iseq.c (iseq_load): keep type_map to get rid of memory leak.
  based on a patch by Eric Wong at [ruby-core:59699].  [Bug #9399]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44568 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
iseq.c: linear search

* iseq.c (iseq_type_from_id): linear search instead of hash lookup for
  small fixed number keys.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44569 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
tcltklib.c: create_ip_exc format argument

* ext/tk/tcltklib.c (create_ip_exc): format argument must not be a
  dynamic string, not to contain unescaped %.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44570 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
stubs.c: library name strings

* ext/tk/stubs.c (ruby_open_tcl_dll, ruby_open_tk_dll): make library
  names by string literal concatenation at compilation time, not by
  sprintf() at runtime.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44571 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
ext: use rb_sprintf() and rb_vsprintf() with PRIsVALUE

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44572 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
test_bigmath.rb: ignore on unrelated platforms

* test/bigdecimal/test_bigmath.rb (test_log): ignore the result of log
  which is not a finite number.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44573 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* ext/tk/extconf.rb: --with-tcllib and --with-tklib configure options
  don't work correctly. Patch by jeremyevans0 (Jeremy Evans).
  [ruby-core:59483] [Bug #9348]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44574 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
cptr.c: unused variable

* ext/dl/cptr.c (rb_dlptr_inspect): remove no longer used variable.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44577 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
ext: real class name

* ext/dl/cptr.c (rb_dlptr_inspect): use real class name, not
  singleton class.

* ext/fiddle/pointer.c (rb_fiddle_ptr_inspect): ditto.

* ext/strscan/strscan.c (strscan_inspect): ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44578 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
ext: use PRIsVALUE for rb_raise and rb_warn

* 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-13

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44580 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
ext: use rb_sprintf() and rb_vsprintf() with PRIsVALUE

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44581 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
openssl/ossl.h: calculate as long

* ext/openssl/ossl.h (ossl_str_adjust): calculate as long, not
  casting to int.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44582 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* ext/thread/thread.c (rb_szqueue_push): check GET_SZQUEUE_WAITERS
  instead of GET_QUEUE_WAITERS to prevent deadlock. Patch by Eric Wong.
  [Bug #9302] [ruby-core:59324]

* test/thread/test_queue.rb: add test

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44583 b2dd03c8-39d4-4d8f-98ff-823fe69b080e