aboutsummaryrefslogtreecommitdiffstats
path: root/include
Commit message (Collapse)AuthorAgeFilesLines
* * error.c: new functions to deal exceptions with string instances.nobu2012-02-241-0/+5
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34787 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * configure.in (__builtin_unreachable): check for clang.nobu2012-02-241-0/+3
| | | | | | | | [ruby-core:42849] * include/ruby/ruby.h (UNREACHABLE): fallback definition. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34784 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * Merge Onigmo-5.13.1. [ruby-dev:45057] [Feature #5820]naruse2012-02-171-29/+61
| | | | | | | | | | https://github.com/k-takata/Onigmo cp reg{comp,enc,error,exec,parse,syntax}.c reg{enc,int,parse}.h cp oniguruma.h cp tool/enc-unicode.rb cp -r enc/ git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34663 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * include/ruby/ruby.h (rb_event_hook_func_t): add argument names.nobu2012-02-121-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34575 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * string.c (rb_str_modify_expand): fix memory leak.nobu2012-02-081-0/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34492 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * file.c (rb_enc_path_next, rb_enc_path_skip_prefix)nobu2012-01-252-6/+6
| | | | | | | | | | | | | | | (rb_enc_path_last_separator, rb_enc_path_end) (ruby_enc_find_basename, ruby_enc_find_extname): encoding-aware path handling functions. * file.c (rb_home_dir, file_expand_path, rb_realpath_internal) (rb_file_s_basename, rb_file_dirname, rb_file_s_extname) (rb_file_join): should respect the encodings of arguments than file system encoding. [ruby-dev:45145] [Bug #5919] * dir.c (check_dirname, ruby_glob0): ditto. * ext/pathname/pathname.c (path_sub_ext): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34372 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * vm.c (rb_iter_break_value): new function to break a block withnobu2012-01-241-0/+1
| | | | | | the value. [ruby-dev:45132] [Feature #5895] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34369 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * object.c (rb_Hash): add Kernel#Hash conversion method likematz2012-01-241-0/+1
| | | | | | Array() or Float(). a patch from Run Paint Run Run. Fix #3131 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34367 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * include/ruby/ruby.h (FIXNUM_P): simple flag should be int.nobu2012-01-211-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34351 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * gc.c: use Bitmap Marking algorithm to avoid copy-on-write ofnari2012-01-071-2/+2
| | | | | | | | | | | | | | | | | memory pages. See [ruby-dev:45085] [Feature #5839] [ruby-core:41916]. * include/ruby/ruby.h : FL_MARK rename to FL_RESERVED1. * node.h : ditto. * debug.c : ditto. * object.c (rb_obj_clone): FL_MARK move to a bitmap. * class.c (rb_singleton_class_clone): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34225 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * include/ruby/version.h: RUBY_API_VERSION 2.0.0ayumin2012-01-061-3/+3
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34220 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * include/ruby/ruby.h: fix #error pragma. LLP64 platform is supported.nagachika2011-12-282-2/+2
| | | | | | * include/ruby/st.h: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34153 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * st.c (st_update): new function to lookup the given key andnobu2011-12-271-0/+1
| | | | | | | update the value. [ruby-dev:44998] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34141 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * win32/win32.c, include/ruby/win32.h (rb_w32_fd_is_text): new function.usa2011-12-141-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | * win32/win32.c (init_stdhandle): set default mode of stdin as binmode. * io.c (set_binary_mode_with_seek_cur): new function to replace SET_BINARY_MODE_WITH_SEEK_CUR macro. now returns previous mode of the fd and take care of LF in rbuf. * io.c (do_writeconv): set text mode when needed. * io.c (io_read): need to change the mode of the IO to binmode temporally when the length for IO#read, because IO#read with length must behave so. * test/ruby/test_io_m17n.rb (TestIO_M17N#est_{read_with_length, read_with_length_binmode,get[cs]_and_read_with_binmode, read_with_binmode_and_get[cs],read_write_with_binmode}): tests for above changes. all patches are written by Hiroshi Shirosaki. [ruby-core:41496] [Feature #5714] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34043 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * object.c (rb_check_to_int): new function to convert a VALUE tonobu2011-12-111-0/+1
| | | | | | | | an Integer if possible, but returns nil instead of raising an exception otherwise. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34007 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Silence stat redefinition warnings under win32luislavena2011-12-081-0/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33989 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * include/ruby/{subst.h,win32.h}, ext/socket/rubysocket.h: revertusa2011-12-052-93/+92
| | | | | | | | | r33876. [ruby-core:41475] [Bug #5706] * ext/socket/extconf.rb: the alternative hack for [Bug #5675]. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33947 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Introduce NEED_READCONV and NEED_WRITECONV to replace universal newline ↵luislavena2011-12-041-1/+1
| | | | | | | | | decorator Use CRLF only when required to improve file reading and writing under Windows. Patch by Hiroshi Shirosaki. [ruby-core:40706] [Feature #5562] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33937 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * include/ruby/subst.h: reverted r33916, since some names in vm.inc conflict.nobu2011-12-011-30/+30
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33917 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * include/ruby/subst.h: removed arguments lists so that functionnobu2011-12-011-30/+30
| | | | | | | | calls with zero arguments can be substituted. aliasing in .def file has no effect for static library. [ruby-core:41370] [Bug#5681] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33916 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * win32/win32.c (rb_w32_inet_ntop): constified.nobu2011-11-291-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33893 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * include/ruby/win32.h (GetCurrentThreadHandle): remove unused API.nagachika2011-11-281-1/+0
| | | | | | follow r33881. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33889 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * include/ruby/subst.h: typo of r33876.usa2011-11-281-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33877 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * include/ruby/subst.h: moved Windows specific substitions fromnobu2011-11-282-92/+92
| | | | | | | win32.h. * ext/socket/rubysocket.h: include ruby/subst.h. [Bug #5675] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33876 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * include/ruby/ruby.h(NUM2LONG, NUM2INT, NUM2SHORT, NUM2LL,kosaki2011-11-151-12/+24
| | | | | | | | | INT2NUM, UINT2NUM, LONG2NUM, ULONG2NUM, NUM2CHR): wrap by macros. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33759 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * fix ANSI C compliance of r33757ngoto2011-11-151-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33758 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * include/ruby/defines.h (FLUSH_REGISTER_WINDOWS): move sparc asm codengoto2011-11-151-15/+2
| | | | | | | | | | to a separete file sparc.c for preventing inlining optimization. Patched by Jurij Smakov. [Bug #5244] [ruby-core:40685] * sparc.c (rb_sparc_flush_register_windows): ditto. * configure.in: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33757 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * include/ruby/ruby.h: get rid of gcc specific rb_long2int(),kosaki2011-11-151-68/+45
| | | | | | | | | | | | | NUM2LONG(), NUM2INT(), NUM2SHORT(), NUM2LL(), INT2NUM(), UINT2NUM(), LONG2NUM(), ULONG2NUM() and NUM2CHR() implementation. Because 1) They don't make any better code at all. 2) Inline function have a better debugger supoort. 3) If they become to make better code in the future, they might make cross compiler ABI compatibility issue. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33756 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * include/ruby/ruby.h: add #ifdef comment.kosaki2011-11-141-2/+2
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33744 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * include/ruby/ruby.h: add NUM2SHORT(), NUM2USHORT() macros.kosaki2011-11-141-0/+19
| | | | | | | | | | | * numeric.c: ditto. * test/-ext-/num2int/test_num2int.rb: add testcases for NUM2SHORT(). * ext/-test-/num2int/num2int.c: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33743 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * include/ruby/ruby.h (rb_long2int): define as a macro always, sonobu2011-11-081-1/+2
| | | | | | that cpp conditionals can tell if it is provided. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33670 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * include/ruby/encoding.h (ECONV_NEWLINE_DECORATOR_READ_MASK,usa2011-11-071-0/+2
| | | | | | | | | | | | | | | | | | | | | | ECONV_NEWLINE_DECORATOR_WRITE_MASK): new macro. * io.c (rb_io_extract_modeenc, pipe_open, prep_stdio, argf_next_argv): set TEXTMODE_NEWLINE_DECORATOR_ON_WRITE for textmode on creating IO if the flag is available. * io.c (make_writeconv): drop decorators for reading. * io.c (make_readconv): drop decorators for writing. * io.c (do_writeconv): existing writeconv is not the condition to raise ArgumentError. should check textmode or not. * test/ruby/test_io_m17n.rb (TestIO_M17N#test_{cr,lf,crlf}_decorator_on_stdout): test above changes. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33662 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * include/ruby/intern.h (rb_fd_fix_cloexec): renamed fromakr2011-10-311-1/+1
| | | | | | | | | | | | | | | | | | | rb_fd_set_cloexec. * io.c: follow the above renaming. * ext/pty/pty.c: ditto. * ext/socket/init.c: ditto. * ext/socket/socket.c: ditto. * ext/socket/ancdata.c: ditto. * ext/socket/unixsocket.c: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33585 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * win32/win32.c (setfl): extract from fcntl().usa2011-10-311-1/+6
| | | | | | | | | | | | | | | * win32/win32.c (dupfd): new function to support F_DUPFD. base on a patch written by akr. * win32/win32.c (fcntl): use above functions. * include/ruby/win32.h (F_DUPFD): define. [experimental] * include/ruby/win32.h (F_SETFL): change the value to correspond with other platforms. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33581 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * include/ruby/intern.h (rb_cloexec_fcntl_dupfd): declared.akr2011-10-301-0/+1
| | | | | | | | | | | * io.c (rb_cloexec_fcntl_dupfd): new function. (nogvl_io_cntl): use rb_cloexec_fcntl_dupfd. * process.c (move_fds_to_avoid_crash): use rb_cloexec_fcntl_dupfd. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33575 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * include/ruby/intern.h (rb_cloexec_pipe): declared.akr2011-10-301-0/+1
| | | | | | | | | | | | * io.c (rb_cloexec_pipe): new function. (rb_pipe): use rb_cloexec_pipe. * thread_pthread.c (rb_thread_create_timer_thread): use rb_cloexec_pipe. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33572 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * include/ruby/intern.h (rb_cloexec_dup2): declared.akr2011-10-291-0/+1
| | | | | | | | | * io.c (rb_cloexec_dup2): new function. (io_reopen): use rb_cloexec_dup2. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33557 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * include/ruby/intern.h (rb_cloexec_dup): declared.akr2011-10-291-0/+1
| | | | | | | | | | | | | * io.c (rb_cloexec_dup): new function. (ruby_dup): use rb_cloexec_dup. * ext/pty/pty.c (pty_getpty): use rb_cloexec_dup. * ext/openssl/ossl_bio.c (ossl_obj2bio): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33553 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * include/ruby/intern.h (rb_cloexec_open): declared.akr2011-10-291-0/+1
| | | | | | | | | | | | * io.c (fd_set_cloexec): extracted from rb_fd_set_cloexec. (rb_cloexec_open): new function. (sysopen_func): use rb_cloexec_open. (rb_sysopen_internal): use rb_update_max_fd instead of rb_fd_set_cloexec. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33549 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * include/ruby/ruby.h (SIZE_MAX): define SIZE_MAX if not defined.naruse2011-10-271-0/+16
| | | | | | patched by The Written Word Inc. [ruby-core:40422] [Bug #5489] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33532 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * include/ruby/defines.h: use "__sparc" instead of "sparc" andakr2011-10-251-1/+1
| | | | | | | | | | | | "__sparc__". * dln.c: ditto. [ruby-dev:44694] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33524 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * include/ruby/intern.h (rb_fd_set_cloexec): declared.akr2011-10-221-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * io.c (rb_fd_set_cloexec): new function. (ruby_dup): call rb_fd_set_cloexec to set close-on-exec flag. (rb_sysopen_internal): ditto. (rb_pipe): ditto. (io_reopen): ditto. (io_cntl): ditto. * process.c (rb_f_exec): change the default :close_others option to true. (rb_f_system): ditto. (move_fds_to_avoid_crash): call rb_fd_set_cloexec to set close-on-exec flag. (ruby_setsid): ditto. (rb_daemon): ditto. * thread_pthread.c (rb_thread_create_timer_thread): call rb_fd_set_cloexec to set close-on-exec flag. * ruby.c (load_file_internal): ditto. * file.c (rb_file_s_truncate): ditto. (file_load_ok): ditto. * random.c (fill_random_seed): ditto. * ext/pty/pty.c (chfunc): ditto. (get_device_once): ditto. * ext/openssl/ossl_bio.c (ossl_obj2bio): ditto. * ext/socket/init.c (rsock_socket): ditto. (rsock_s_accept_nonblock): ditto. (rsock_s_accept): ditto. * ext/socket/socket.c (rsock_sock_s_socketpair): ditto. * ext/socket/ancdata.c (discard_cmsg): ditto. (make_io_for_unix_rights): ditto. * ext/socket/unixsocket.c (unix_recv_io): ditto. * ext/io/console/console.c (console_dev): ditto. [ruby-core:38140] [Feature #5041] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33507 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * numeric.c (rb_infinity, rb_nan): use union to prevent bus errorngoto2011-10-211-4/+11
| | | | | | | | caused by misalignment. [Bug #5469] [ruby-dev:44657] * include/ruby/missing.h (INFINITY, NAN): ditto git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33502 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * include/ruby/defines.h (flush_register_windows): use softwarenobu2011-10-201-1/+1
| | | | | | trap on Debian Sparc 32-bit userspace. [Bug #5244] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33492 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * include/ruby/intern.h (rb_ary_reverse): export.nobu2011-10-141-0/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33467 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * include/ruby/defines.h: remove NextStep, OpenStep, Rhapsodykosaki2011-09-261-70/+0
| | | | | | | | | | | support. Last activity of their OSs are 7 years ago. * configure.in: ditto. * dir.c: ditto. * ext/tk/extconf.rb: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33337 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * win32/win32.c, include/ruby/intern.h (rb_w32_fd_copy): implementusa2011-08-301-0/+2
| | | | | | | | | | | | | for rb_thread_select() in thread.c. the use of rb_fd_copy() is introduced in r33117. [Bug #5229] [ruby-core:39102] * thread.c (rb_thread_select): must call rb_fd_init() before using rb_fdset_t. see the implementations of rb_fd_init()s if you want to know the reason. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33128 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * include/ruby/win32.h (frexp, modf): original macros.nobu2011-08-051-2/+2
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32862 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * include/ruby/missing.h: fix typo and so on.nobu2011-08-041-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32840 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * include/ruby/missing.h: define __syscall on OpenBSD as r32702.naruse2011-08-041-2/+2
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32839 b2dd03c8-39d4-4d8f-98ff-823fe69b080e