naruse
106595827a
* ext/openssl/ossl_bn.c (ossl_bn_to_i): Use bn2hex to speed up.
...
In general, binary to/from decimal needs extra cost.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40094 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-04-04 02:35:07 +00:00
akr
da39199964
* ext/socket/extconf.rb: Specify arguments to test functions.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40092 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-04-03 22:24:57 +00:00
naruse
7b58445ebd
* ext/openssl/ossl_bn.c (ossl_bn_initialize): fix can't create from bn.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40090 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-04-03 18:28:56 +00:00
akr
7181490def
* ext/socket/extconf.rb: Test functions and libraries after headers.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40086 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-04-03 13:10:04 +00:00
akr
ee2b218293
* ext/extmk.rb (extmake): Invoke Logging::log_close in a ensure
...
clause.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40081 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-04-03 11:28:10 +00:00
akr
1d339ff212
* ext/extmk.rb (extmake): Use Logging.open to switch stdout and
...
stderr. Delay Logging::log_close until the failure message is
written. Write the failure message only if log file is opened.
* lib/mkmf.rb (Logging.log_opened?): New method.
[ruby-dev:47215] [Bug #8209 ]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40080 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-04-03 10:00:49 +00:00
nobu
b30a6b8d1d
bignum.c: Bignum zero comparison
...
* bignum.c (rb_big_eq): test as Fixnum if possible and get rid of zero
length Bignum. [ruby-core:53893] [Bug #8204 ]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40076 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-04-03 07:34:31 +00:00
akr
6d0c59f156
* ext/-test-/num2int/num2int.c: Define utility methods
...
as module methods of Num2int.
* test/-ext-/num2int/test_num2int.rb: Follow the above change.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40066 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-04-02 10:26:02 +00:00
akr
d40335aa36
* ext/-test-/num2int/num2int.c: Rename utility methods
...
to global functions to ease manual experiments.
* test/-ext-/num2int/test_num2int.rb: Follow the above change.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40044 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-04-01 21:49:55 +00:00
akr
87877eb04f
* ext/zlib/zlib.c (rb_gzfile_set_mtime): Use NUM2UINT.
...
The old logic doesn't work well on LP64 platforms as:
.. -2**63-1 => error,
-2**63 .. -2**62-1 => success,
-2**62 .. -2**31-1 => error,
-2**31 .. 2**31-1 => success,
2**31 .. 2**62-1 => error,
2**62 .. 2**64-1 => success,
2**64 .. => error.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40040 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-04-01 13:34:52 +00:00
eregon
f4eeca1d16
* ext/zlib/zlib.c (Zlib::Inflate.new):
...
Fix documentation syntax and naming errors.
Based on patch by Robin Dupret. Fix GH-271.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40039 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-04-01 13:08:28 +00:00
akr
0cbe2f4902
* ext/-test-/num2int/num2int.c: Return string for result, instead of
...
printing.
* test/-ext-/num2int/test_num2int.rb: updated to follow above change.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40036 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-04-01 11:58:55 +00:00
nobu
3eb4b0aa06
sha2.c: suppress warnings
...
* ext/digest/sha2/sha2.c (SHA256_Final, SHA512_Last): suppress
strict-aliasing warnings on gcc 4.8.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40033 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-04-01 09:39:19 +00:00
akr
a7526797a6
* include/ruby/ruby.h (FIX2ULONG): Make it consistent with NUM2ULONG.
...
* ext/-test-/num2int/num2int.c: Add utility methods for FIX2XXX tests.
* test/-ext-/num2int/test_num2int.rb: Add tests for FIX2XXX.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40023 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-03-31 16:14:15 +00:00
hsbt
0cfc4866d4
code cleanup by @vipulnsward [GH fixes #267 ]
...
* lib/cgi/core.rb: change each to each_value
* ext/bigdecimal/lib/bigdecimal/{jacobian,math}.rb:
remove unused variables from bigdecimal lib
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39992 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-03-29 00:42:32 +00:00
nobu
f25e55cb87
tcltklib.c: rb_thread_alive_p macro
...
* ext/tk/tcltklib.c (rb_thread_alive_p): turn into a macro, so that
same code is generated.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39986 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-03-28 13:11:00 +00:00
nobu
bb6a7778fe
tcltklib.c: suppress warnings
...
* ext/tk/tcltklib.c (lib_eventloop_core, lib_thread_callback),
(ip_rbUpdateCommand, ip_rb_threadUpdateCommand, lib_toUTF8_core),
(ip_invoke_core): remove unused variables.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39975 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-03-28 04:50:15 +00:00
nobu
78598ebf51
ext/tk/tcltklib.c: adjust nesting
...
* ext/tk/extconf.rb: check for rb_thread_alive_p and
rb_thread_check_trap_pending.
* ext/tk/tcltklib.c (rb_thread_alive_p, rb_thread_check_trap_pending):
define substitutions if not available.
* ext/tk/tcltklib.c (lib_eventloop_core, lib_eventloop_ensure),
(lib_thread_callback, ip_rbUpdateCommand, ip_rbVwaitCommand),
(ip_rbTkWaitCommand, call_queue_handler, eval_queue_handler),
(invoke_queue_handler): adjust nesting.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39974 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-03-28 04:50:12 +00:00
akr
7371736e49
* ext/socket/socket.c (sockaddr_len): return the shortest length for
...
unknown socket address.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39941 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-03-26 14:34:20 +00:00
naruse
20219afd83
Suppress warnings
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39893 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-03-23 19:50:47 +00:00
mrkn
bc43842252
* ext/bigdecimal/bigdecimal.c (BigDecimal_divide): Use Qnil and NIL_P
...
instead of (VALUE)0 as a return value.
* ext/bigdecimal/bigdecimal.c (BigDecimal_div): ditto.
* ext/bigdecimal/bigdecimal.c (BigDecimal_divremain): ditto.
* ext/bigdecimal/bigdecimal.c (BigDecimal_remainder): ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39885 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-03-23 14:30:56 +00:00
mrkn
e52a4a70a9
* ext/bigdecimal/bigdecimal.c: Fix style.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39872 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-03-22 01:38:55 +00:00
kazu
7e052c7b81
use rb_pid_t instead of pid_t.
...
* process.c (rb_execarg_addopt, run_exec_pgroup): use rb_pid_t
instead of pid_t.
* ext/pty/pty.c (raise_from_check, pty_check): ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39868 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-03-21 16:11:32 +00:00
zzak
5d402803ee
* ext/date/date_core.c: Typo in Date::MONTHNAMES by Matt Gauger
...
[GH fixes #261 ]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39853 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-03-20 22:35:38 +00:00
ayumin
49636da490
* ext/bigdecimal/bigdecimal.c: fixed typo. same as r39830
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39831 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-03-19 19:23:15 +00:00
ayumin
6f072a36c0
* ext/bigdecimal/bigdecimal.c: fixed typo.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39830 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-03-19 19:19:46 +00:00
sorah
3ee89c6277
* ext/objspace/objspace.c: Fix typo in doc. Patch by Sho Hashimoto.
...
[Bug #8116 ] [ruby-dev:47177]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39817 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-03-19 01:09:46 +00:00
kosaki
326dd6e0cc
* ext/date/date_core.c: include sys/time.h for avoiding implicit
...
declaration of gettimeofday().
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39784 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-03-16 17:40:16 +00:00
nobu
4002be60c0
console.c: supppress warnings
...
* ext/io/console/console.c (console_iflush, console_oflush): supppress
unused-but-set-variable warnings on no tcflush.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39778 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-03-16 08:05:45 +00:00
kosaki
798ff850e4
* configure.in: check struct timeval exist or not.
...
* include/ruby/missing.h (struct timeval): check HAVE_STRUCT_TIMEVAL
properly. and don't include sys/time.h if struct timeval exist.
* file.c: include sys/time.h explicitly.
* random.c: ditto.
* thread_pthread.c: ditto.
* time.c: ditto.
* ext/date/date_strftime.c: ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39772 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-03-16 05:06:47 +00:00
nobu
a7e5f0b5ee
internal.h: export rb_sys_fail_path_with_func
...
* internal.h (rb_sys_fail_path_with_func): export for
socket/basicsocket.c.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39761 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-03-15 06:08:13 +00:00
akr
ca4397ad2c
update doc.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39750 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-03-14 03:49:30 +00:00
kazu
b1f2460f8d
fix typos
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39745 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-03-13 10:50:21 +00:00
takano32
976a3041ef
* date_core.c: clearly specify operator precedence.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39734 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-03-12 08:05:16 +00:00
zzak
7d183dab15
* ext/pathname/pathname.c (path_f_pathname): rdoc for Pathname()
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39634 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-03-08 04:21:43 +00:00
kazu
dbec401c11
use INT2FIX(0) instead of INT2NUM(0).
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39604 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-03-05 16:31:19 +00:00
nobu
b4a117f8d3
objspace.c: newly added nodes
...
* ext/objspace/objspace.c (count_nodes): count also newly added nodes,
and fix key for unknown node. patch by tmm1 (Aman Gupta) in
[ruby-core:53130] [Bug #8014 ]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39595 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-03-05 01:40:52 +00:00
zzak
2a5b45ddc5
* ext/socket/tcpserver.c: Grammar for TCPServer.new from r39554
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39571 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-03-02 22:34:29 +00:00
akr
fa0630558f
update doc.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39554 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-03-02 15:01:44 +00:00
zzak
6213b8370c
* lib/psych.rb: specify in rdoc what object is returned in parser
...
By Adam Stankiewicz [Github tenderlove/psych#133 ]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39543 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-03-01 00:18:50 +00:00
zzak
9460a750e1
* ext/psych/lib/psych.rb: rdoc for Psych overview by Adam Stankiewicz
...
[Github tenderlove/psych#134 ]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39540 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-02-28 18:27:00 +00:00
akr
338ec3cee7
* ext/socket/raddrinfo.c (inspect_sockaddr): don't show that Unix
...
domain socket filename is bigger than sizeof(sun_path).
This limit is not rigid on some platforms such as Darwin and SunOS.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39538 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-02-28 13:29:55 +00:00
akr
bf96ea6362
* ext/socket/rubysocket.h (union_sockaddr): make it longer for SunOS
...
and Darwin.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39529 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-02-27 13:55:19 +00:00
nobu
e05392ea77
* ext/Setup.nt: this file has not been used by default.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39499 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-02-25 15:54:00 +00:00
nobu
5919370363
configure.in: find Setup file automatically
...
* configure.in (setup): find Setup file from target_os 1. by
suffix (e.g. Setup.nacl, Setup.atheos), 2. by "platform"
option (e.g. Setup.nt, Setup.emx), and 3. default Setup. And
Setup.dj had been removed.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39486 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-02-25 04:12:45 +00:00
akr
1580dd29dd
* ext/socket/extconf.rb: don't test ss_family and ss_len member of
...
struct sockaddr_storage. They are not used now except SunOS
specific code.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39483 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-02-25 03:40:16 +00:00
akr
c89844dbc5
* ext/socket: define and use union_sockaddr instead of struct
...
sockaddr_storage for less casts.
* ext/socket/rubysocket.h (union_sockaddr): defined.
* ext/socket/socket.c (sock_accept): use union_sockaddr.
(sock_accept_nonblock): ditto.
(sock_sysaccept): ditto.
(sock_s_getnameinfo): ditto.
* ext/socket/basicsocket.c (bsock_getsockname): ditto.
(bsock_getpeername): ditto.
(bsock_local_address): ditto.
(bsock_remote_address): ditto.
* ext/socket/ancdata.c (bsock_recvmsg_internal): ditto.
* ext/socket/init.c (recvfrom_arg): ditto.
(recvfrom_blocking): ditto.
(rsock_s_recvfrom): ditto.
(rsock_s_recvfrom_nonblock): ditto.
(rsock_getfamily): ditto.
* ext/socket/raddrinfo.c (rb_addrinfo_t): ditto.
(ai_get_afamily): ditto.
(inspect_sockaddr): ditto.
(addrinfo_mdump): ditto.
(addrinfo_mload): ditto.
(addrinfo_getnameinfo): ditto.
(addrinfo_ip_port): ditto.
(extract_in_addr): ditto.
(addrinfo_ipv6_to_ipv4): ditto.
(addrinfo_unix_path): ditto.
* ext/socket/tcpserver.c (tcp_accept): ditto.
(tcp_accept_nonblock): ditto.
(tcp_sysaccept): ditto.
* ext/socket/ipsocket.c (ip_addr): ditto.
(ip_peeraddr): ditto.
(ip_s_getaddress): ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39477 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-02-24 17:51:17 +00:00
tadf
66f9135726
* ext/date/date_core.c: [ruby-core:52303]
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39475 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-02-24 12:16:07 +00:00
naruse
e525bcd1b3
Add test for [Backport #7896 ] [ruby-core:52607]
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39359 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-02-21 08:31:47 +00:00
nobu
9041f262e0
extmk.rb: extract SUBMAKEOPTS
...
* ext/extmk.rb (SUBMAKEOPTS): extract common sub make options.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39337 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-02-20 12:06:13 +00:00