naruse
694826d7e2
Refix for r29493; it is unsigned.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29494 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-10-14 00:09:07 +00:00
naruse
51427700cc
* file.c (DEVT2NUM): added. Size of dev_t is depend on the
...
environment even if POSIX defines dev_t as unsigned integer.
For example, OpenVMS, 64bit Solaris 9, and NetBSD 6 defines
dev_t as 64bit unsigned integer.
* file.c (rb_stat_dev): use DEVT2NUM.
* file.c (rb_stat_dev_major): dev_t is not long. major(3)'s return
value is int.
* file.c (rb_stat_dev_minor): dev_t is not long. minor(3)'s return
value is int.
* configure.in: check size of dev_t.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29493 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-10-13 23:09:56 +00:00
nobu
7735e63593
* array.c (rb_ary_and, rb_ary_or), class.c (rb_mod_init_copy),
...
gc.c (undefine_final), time.c (time_mload): get rid of
type-punning casts.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29492 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-10-13 22:22:18 +00:00
svn
421076be67
* 2010-10-14
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29491 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-10-13 19:17:51 +00:00
naruse
ded94d1c8c
* numeric.c (ruby_float_step): fix Numeric#step with infinity unit
...
doesn't works well. [ruby-core:32779]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29490 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-10-13 19:17:49 +00:00
nobu
b238a3f3fd
* tool/enc-unicode.rb: get rid of lots of warnings.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29489 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-10-13 14:16:49 +00:00
nobu
e0a7c207ff
* vm_dump.c (dump_thread): suppress a warning.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29488 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-10-13 14:08:29 +00:00
nobu
e69bba13a0
* iseq.c (insn_operand_intern, rb_iseq_disasm): fix format specifiers.
...
* vm.c (thread_free): ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29487 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-10-13 14:07:22 +00:00
nobu
9d0c732f0d
* numeric.c (check_uint): get rid of overflow on LLP64 platforms.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29486 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-10-13 13:53:22 +00:00
nobu
dc647aea2e
* insns.def (opt_case_dispatch): use st_data_t.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29485 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-10-13 13:51:20 +00:00
xibbar
fc6d58ccc4
* lib/cgi/util.rb (CGI::unescape): bugfix to unescape the multibyte
...
string. Thanks nobu and tDiary dev members. [Bug #3909 ]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29484 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-10-13 13:39:13 +00:00
naruse
74dcda0d41
* numeric.c (int_chr): raise error when the value is negative.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29483 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-10-13 12:13:53 +00:00
shyouhei
7724d13635
* vm.c (ruby_vm_destruct): This function type was wrong; correct to the prototype.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29482 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-10-13 10:28:25 +00:00
naruse
e79fbf3dfe
* numeric.c (rb_num_to_uint): fix 32bit logic.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29481 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-10-13 05:58:35 +00:00
naruse
a01e628318
* numeric.c (rb_num_to_uint): added to check the range of arguments.
...
Mainly for negative value with NUM2UINT on 32bit environment.
* string.c (rb_str_concat): use rb_num_to_uint.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29480 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-10-13 03:56:31 +00:00
akr
acd98555b5
move a non-combinational test.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29479 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-10-13 03:36:20 +00:00
usa
c94c6a1a16
* thread_win32.c (w32_error): get English message first, instead
...
of system default. see [ruby-core:32765].
[experimental]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29478 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-10-13 03:10:49 +00:00
nobu
8022385ba4
* debug.c (ruby_set_debug_option): define always for binary
...
compatibility with debug env enabled binary.
* signal.c (ruby_enable_coredump): ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29477 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-10-13 02:04:10 +00:00
nobu
5ba5d4c889
* include/ruby/ruby.h (ruby_executable_node): missing prototype.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29476 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-10-13 01:52:54 +00:00
naruse
82ff894c04
Fix style for ruby-mode.el.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29475 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-10-13 00:27:41 +00:00
naruse
769f5fc41c
Clean warnings.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29474 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-10-12 21:04:35 +00:00
naruse
0ba69794c6
Fix test; escape a backslash.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29473 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-10-12 20:54:29 +00:00
naruse
e7413bc6ec
* missing/strchr.c: add strlen's prototype.
...
* missing/strtrr.c: ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29472 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-10-12 20:23:53 +00:00
nobu
2d4e8b4e22
* ext/syck/rubyext.c (struct mktime_arg): constified.
...
* ext/syck/rubyext.c (mktime_do, mktime_r, rb_syck_mktime): fix
function signatures.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29471 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-10-12 15:21:20 +00:00
nobu
537d7ff140
* st.c (MurmurMagic): get rid of literal overflow.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29470 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-10-12 15:18:22 +00:00
nobu
a176b065d2
* io.c (rb_io_ctl), parse.y (LVAR_USED): suppress warnings.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29469 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-10-12 15:10:04 +00:00
nobu
cea3919ae6
* configure.in (RUBY_CHECK_PRINTF_PREFIX): check for printf format
...
specifier if possible.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29468 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-10-12 15:03:51 +00:00
nobu
150b4efa55
* win32/win32.c (rb_w32_open_osfhandle, rb_w32_wopen, rb_w32_pipe):
...
use uintptr_t instead of long for win64.
* win32/win32.c (socketpair_internal): suppress warnings.
* win32/win32.c (ftruncate): use HANDLE instead of long for win64.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29467 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-10-12 14:58:23 +00:00
nobu
85d1cba883
* vsnprintf.c (BSD_vfprintf): fix cast.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29466 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-10-12 14:55:14 +00:00
nobu
2f0b8e2793
* numeric.c (rb_num2fix): result of rb_num2long is SIGNED_VALUE.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29465 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-10-12 14:54:06 +00:00
nobu
b736c9b5dc
* ext/socket/init.c (rsock_init_sock): conditionally used variable.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29464 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-10-12 14:54:02 +00:00
nobu
abd94c3376
* dln.c (rb_w32_check_imported): suppress warning.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29463 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-10-12 14:53:59 +00:00
nobu
d410639a6d
* compile.c (iseq_build_body), error.c (set_syserr, get_syserr),
...
(syserr_initialize), gc.c (define_final, rb_gc_copy_finalizer),
(run_final), hash.c (rb_hash_aref, rb_hash_lookup2),
(rb_hash_fetch_m, rb_hash_clear, rb_hash_aset, eql_i),
iseq.c (iseq_load, iseq_data_to_ary), marshal.c (r_symlink),
thread.c (rb_thread_local_aref),
variable.c (generic_ivar_remove, ivar_get, rb_const_get_0),
(rb_cvar_get), vm.c (rb_vm_check_redefinition_opt_method),
vm_insnhelper.c (vm_get_ev_const), vm_method.c (remove_method),
ext/iconv/iconv.c (map_charset): use st_data_t.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29462 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-10-12 14:47:23 +00:00
nobu
17c48bebf8
* compile.c (iseq_build_body), insns.def (getglobal, setglobal),
...
iseq.c (iseq_load, iseq_data_to_ary), util.c (valid_filename):
use VALUE.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29461 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-10-12 14:35:40 +00:00
nobu
3c24bea4b5
* gc.c (obj_free, rb_objspace_call_finalizer): fix truncating
...
cast.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29460 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-10-12 14:09:27 +00:00
nobu
0172f3181f
* gc.c (mark_current_machine_context): suppress warnings.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29459 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-10-12 14:03:24 +00:00
nobu
f5bcc56bcd
* compile.c (iseq_compile_each): fix truncating cast.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29458 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-10-12 13:41:12 +00:00
nobu
4fe1e7c69b
* cont.c (fiber_setcontext): missing variable definition.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29457 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-10-12 13:18:21 +00:00
naruse
681e551369
* error.c (exc_to_s): use OBJ_INFECT.
...
* error.c (name_err_to_s): ditto.
* error.c (name_err_mesg_to_str): ditto.
* error.c (syserr_initialize): ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29456 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-10-12 12:39:22 +00:00
naruse
628c802eae
* error.c (syserr_initialize): taint message if mesg is given
...
and it is tainted.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29455 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-10-12 10:09:31 +00:00
naruse
b487f7881f
* io.c (rb_io_ungetc): always see Bignum. On 32bit valid value
...
may be a Bignum. On 64bit for errors. [ruby-dev:42366]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29454 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-10-12 09:30:42 +00:00
naruse
1e22306569
* string.c (rb_str_concat): use unsigned int for GB18030.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29453 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-10-12 09:25:33 +00:00
naruse
2d8612e966
* numeric (check_uint): the mask must refer to VALUE.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29452 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-10-12 08:56:00 +00:00
naruse
232257238a
* numeric (check_uint): set MSB for negative value.
...
* numeric (rb_num2uint): return value's type of rb_num2ulong
is VALUE.
* numeric (int_chr): variable i can't be negative.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29451 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-10-12 08:50:30 +00:00
usa
fb44f02aa1
* win32/win32.c (rb_w32_strerror): get English message first, instead
...
of system default. see [ruby-dev:42358].
[experimental]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29450 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-10-12 07:05:56 +00:00
usa
cba4cda71d
* win32/win32.c (rb_w32_strerror): unmap some range of errno for
...
workaround of VC10's strerror() and sys_nerr problem.
based on a patch from Akio Tajima, [ruby-dev:42355].
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29449 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-10-12 06:54:52 +00:00
naruse
7587eb706a
* io.c (rb_io_ungetc): use unsigned int for GB18030.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29448 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-10-12 06:37:27 +00:00
naruse
0a8f047a98
* io.c (rb_io_putc): support multibyte characters.
...
[ruby-core:30697]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29447 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-10-12 06:18:11 +00:00
naruse
e960fffda1
* numeric.c (rb_enc_uint_chr): split from int_chr.
...
* numeric.c (int_chr): use rb_enc_uint_chr.
* include/ruby/encoding.h (rb_enc_uint_chr): added.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29446 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-10-12 06:18:08 +00:00
naruse
6913b2734a
* numeric.c (int_chr): a codepoint of Ruby M17N must be 32bit
...
unsigned int; GB18030 uses MSB. Also note that OnigCodePoint
is defined as uisigned int.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29445 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-10-12 05:14:23 +00:00