summaryrefslogtreecommitdiff
path: root/include
AgeCommit message (Collapse)Author
2009-06-23* file.c (rb_get_path_check): check with given safe level.nobu
* file.c (rb_find_file_ext_safe, rb_find_file_safe): ditto. * safe.c (rb_insecure_operation): function to raise security error. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23831 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-06-23* file.c (rb_find_file_ext, rb_find_file): no needs to expandnobu
paths with tilde twice. * load.c (rb_f_load): load the given path directly if not found in load_path. * load.c (search_required): search file in specified safe level. * load.c (rb_require_safe): path to load is already searched in search_required(). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23828 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-06-16* st.c, include/ruby/st.h (st_memsize): added. This function returnsko1
the memory usage of st_talbe. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23712 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-06-16* include/ruby/ruby.h: New structure RTypedData, added.ko1
This structure incldues more explicit type information for T_DATA objects. If RData(obj)->dfree is immediate value `1' on T_DATA object obj, obj is needed to be accessed with RTYPEDDATA(obj) instead of RDATA(obj). A RTypedData structure points the structure rb_typed_data_t. rb_typed_data_t includes information such as the type name of this data, mark and free function what RData includes, and memsize function show how data consuming the memory size. Note that you do not need any change existing T_DATA objects. If you use RDataType instead of RData on T_DATA object, you can specify explicit type information. * gc.c (rb_data_typed_object_alloc, rb_objspace_data_type_memsize, rb_objspace_data_type_name): added. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23710 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-06-08* thread.c: rename functions which require a parameterko1
"rb_thread_t *", the prefix to be rb_threadptr_ instead of rb_thread_. * thread.c (rb_thread_add_event_hook(), rb_thread_remove_event_hook): change the parameter type from rb_thread_t * to VALUE. * eval.c, eval_error.c, eval_intern.h, signal.c, vm_core.h, vm_eval.c: ditto. * include/ruby/intern.h: remove decl of rb_thread_signal_raise() and rb_thread_signal_exit(). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23651 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-06-01* include/ruby/intern.h (rb_exc_new2): optimization for literal.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23615 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-05-27* st.c (st_insert2): new function with processing new key,matz
e.g. copy. * hash.c (rb_hash_aset): use st_insert2() to reduce redundant st_lookup calls. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23594 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-05-26* common.mk (bignum.o, numeric.o): depend on util.h.nobu
* bignum.c, marshal.c: fixed types. * numeric.c (infinite_value): use ruby_div0. * include/ruby/util.h (ruby_div0): moved from marshal.c. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23575 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-05-25* include/ruby/ruby.h (FilePathValue): prevent from GC.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23571 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-05-25* include/ruby/ruby.h (NUM2LONG): added GCC specific optimization.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23570 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-05-24* thread.c (rb_exec_recursive_paired): new function for propernobu
handling of recursive arrays. [EXPERIMENTAL] [ruby-core:23402] * array.c (rb_ary_equal, rb_ary_eql, rb_ary_cmp): use above. * hash.c (hash_equal): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23557 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-05-21* include/ruby/ruby.h (RB_EVENT_HOOKS_HAVE_CALLBACK_DATA):nobu
new macro for compatibility check. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23507 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-05-20* include/ruby/ruby.h (rb_long2int, RARRAY_LENINT): check long tonobu
cast to int. [ruby-dev:38508] * struct.c, vm_eval.c, vm_insnhelper.c: use RARRAY_LENINT. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23503 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-05-20* encoding.c (rb_enc_fast_mbclen): faster mbclen for strings knownmatz
to be valid. * string.c (enc_strlen): coderange specified version of rb_enc_strlen(). use rb_enc_fast_mbclen() if coderange is 7bit or valid. * string.c (str_gsub): use rb_enc_fast_mbclen(). * string.c (rb_str_reverse, rb_str_split_m, rb_str_each_char, scan_once): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23495 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-05-19* encoding.c (rb_enc_codepoint_len): combine rb_enc_codepoint()matz
and rb_enc_codelen() in one function to reduce calls. * encoding.c (rb_enc_codepoint): compatibility function. * sprintf.c (rb_str_format): use rb_enc_codepoint_len(). * string.c (rb_str_inspect, rb_str_upcase_bang, rb_str_downcase_bang, rb_str_capitalize_bang, rb_str_swapcase_bang, trnext, tr_trans, rb_str_delete_bang, rb_str_squeeze_bang, rb_str_count, rb_str_split_m, rb_str_each_line, rb_str_each_codepoint, rb_str_lstrip_bang, sym_printable): ditto. * transcode.c (make_econv_exception): use rb_enc_mbc_to_codepoint() git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23493 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-05-13* gc.c: add longlife garbage collection. [ruby-dev:38423]nari
(NORMAL_HEAPS_USED): new macro. (LONGLIFE_ALLOCATE_HEAPS_MIN): ditto. (add_longlife_heaps_slot): new function. (rb_newobj_from_longlife_heap): ditto. (rb_newobj_longlife): ditto. (rb_node_newnode_longlife): ditto. (rb_gc_write_barrier): ditto. (remembered_set_recycle): ditto. (rb_gc_mark_remembered_set): ditto. (clear_mark_longlife_heaps): ditto. (gc_sweep_for_longlife): ditto. (assign_heap_slot): new argumnent to longlife heaps slot. (add_freelist): ditto. (gc_sweep): avoid lonlife heap slot. set longlife_collection flag at add heap. (rb_gc_force_recycle): avoid mark object and remembered_set object. (garbage_collect): add longlife collection. (rb_gc_start): invoke longlife collection. (gc_profile_record_get): for longlife collction profile. (gc_profile_result): ditto. * include/ruby/intern.h (rb_gc_write_barrier): declared. * include/ruby/ruby.h (FL_REMEMBERED_SET): renamed from FL_RESERVED. * debug.c (FL_REMEMBERED_SET): ditto. * insns.def (setinlinecache): insert write barrier. * vm_insnhelper.c (vm_method_search): ditto. * set_relation (set_relation): use longlife object. * vm.c (vm_define_method): ditto. * vm_core.h (NEW_INLINE_CACHE_ENTRY): ditto. * vm_method.c (rb_add_method): ditto. * class.c (rb_add_method): ditto. * node.h (NEW_NODE_LONGLIFE): new macro. (rb_node_newnode_longlife): declared. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23421 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-05-13* include/ruby/version.h: extracted the extensions interface andnobu
the never-changable info. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23419 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-05-07* string.c, include/ruby/encoding.h: fixed types.nobu
* include/ruby/encoding.h (rb_enc_nth): long is used for index. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23358 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-04-19* eval.c (ruby_cleanup): the order of local variables on stack isnobu
undefined. should use outermost VALUE for ruby_init_stack. * gc.c (ruby_get_stack_grow_direction, Init_stack): allows volatile pointer. * thread_*.c (ruby_init_stack): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23210 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-04-16* class.c (rb_define_method_id): use rb_define_notimplement_method_idakr
if rb_f_notimplement is given. (rb_define_protected_method): ditto. (rb_define_private_method): ditto. (rb_define_method): use rb_define_method_id. * include/ruby/intern.h (rb_f_notimplement): declared. (rb_define_notimplement_method_id): declared. * proc.c (method_inspect): show not-implemented. * vm_method.c (notimplement_body): new variable. (rb_notimplement_body_p): new function. (rb_method_boundp): return false if not implemented. (rb_f_notimplement): new function. (rb_define_notimplement_method_id): new function. * process.c (rb_f_fork): use rb_f_notimplement if not implemented. * file.c (rb_file_s_lchmod): use rb_f_notimplement if not implemented. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23192 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-04-05* include/ruby/intern.h (rb_fd_resize): does nothing on Win32.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23136 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-04-05* include/ruby/intern.h (Init_stack): moved.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23135 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-04-04* include/ruby/intern.h (RB_NUM_COERCE_FUNCS_NEED_OPID): macro tonobu
check compatibility. [ruby-dev:38162] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23134 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-04-01* thread.c (rb_thread_fd_select): new function to call selectmatz
using rb_fdset_t. * io.c (select_internal): use rb_thread_fd_select instead of rb_thread_select. based on the patch from Kengo Matsuyama. [ruby-dev:38221] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23109 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-03-19* io.c (rb_mWaitReadable): defined.akr
(rb_mWaitWritable): defined. (io_getpartial): extend IO::WaitReadable on EWOULDBLOCK and EAGAIN. (rb_io_write_nonblock): extend IO::WaitWritable on EWOULDBLOCK and EAGAIN. * error.c (make_errno_exc): extracted from rb_sys_fail. (rb_mod_sys_fail): new function. * include/ruby/ruby.h (rb_mod_sys_fail): declared. (rb_mWaitReadable): declared. (rb_mWaitWritable): declared. * ext/socket/init.c (rsock_s_recvfrom_nonblock): extend IO::WaitReadable on EWOULDBLOCK and EAGAIN. (rsock_s_accept_nonblock): extend IO::WaitReadable on EWOULDBLOCK, EAGAIN, ECONNABORTED and EPROTO. * ext/socket/socket.c (sock_connect_nonblock): extend IO::WaitWritable on EINPROGRESS. * ext/socket/ancdata.c (bsock_sendmsg_internal): extend IO::WaitWritable on EWOULDBLOCK and EAGAIN. (bsock_recvmsg_internal): extend IO::WaitReadable on EWOULDBLOCK and EAGAIN. * ext/openssl/ossl_ssl.c (ossl_ssl_read_internal): raise SSLError extended by IO::WaitReadable/IO::WaitWritable on SSL_ERROR_WANT_READ/SSL_ERROR_WANT_WRITE. * ext/openssl/ossl.c (ossl_make_error): extracted from ossl_raise. (ossl_exc_new): new function. * ext/openssl/ossl.h (ossl_exc_new): declared. * lib/net/protocol.rb (rbuf_fill): rescue IO::WaitReadable and IO::WaitWritable. [ruby-core:22539], [ruby-dev:38140] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23006 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-03-15* include/ruby/ruby.h ({RSTRING,RBIGNUM}_EMBED_LEN_MAX): made int.nobu
* include/ruby/ruby.h (OBJ_{TAINTED,UNTRUSTED,FROZEN}): return int. * include/ruby/encoding.h (ENC_CODERANGE): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22968 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-03-15* include/ruby/ruby.h ({RSTRING,RBIGNUM}_EMBED_LEN_MAX): made int.nobu
* include/ruby/ruby.h (OBJ_{TAINTED,UNTRUSTED,FROZEN}): return int. * include/ruby/encoding.h (ENC_CODERANGE): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22967 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-03-15* string.c (rb_hash_uint, rb_hash_start, rb_hash_end): use VALUEnobu
rather than unsigned int. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22966 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-03-14* string.c (rb_str_subpat): accept capture name.akr
(rb_str_aref): follow above change. (rb_str_aref_m): pass the 2nd argument to rb_str_subpat. (rb_str_subpat_set): accept capture name. (rb_str_aset): follow above change. (rb_str_partition): ditto. (rb_str_aset_m): pass the 2nd argument to rb_str_subpat_set. * include/ruby/intern.h (rb_reg_backref_number): declared. * re.c (rb_reg_backref_number): defined. [ruby-core:21057] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22959 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-03-14* util.c (ruby_scan_oct, ruby_scan_hex): use size_t.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22957 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-03-14* dln.c (init_funcname_len, dln_find_exe_r, dln_find_file_r): usenobu
size_t. * file.c (rb_stat_inspect, file_expand_path): ditto. * util.c (ruby_qsort): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22944 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-03-13* include/ruby/ruby.h (bool): not define to get rid of conflictnobu
against curses. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22926 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-03-13* configure.in (AC_HEADER_DIRENT): added.nobu
* include/ruby/ruby.h (NUM2INT, rb_special_const_p): returns true and false instead of Qtrue and Qfalse for platforms where VALUE is bigger than int. * gc.c (gc_stress_set), ext/openssl/ossl_asn1.c (decode_bool): got rid of variables named `bool'. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22922 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-03-12* array.c, bignum.c, dln.c, error.c, gc.c, io.c, marshal.c,nobu
numeric.c, pack.c, strftime.c, string.c, thread.c, transcode.c, transcode_data.h, util.c, variable.c, vm_dump.c, include/ruby/encoding.h, missing/crypt.c, missing/vsnprintf.c: suppress VC type warnings. [ruby-core:22726] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22914 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-03-12* include/ruby/encoding.h: suppress warnings of overflow.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22905 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-03-10* include/ruby/win32.h (strcasecmp, strncasecmp): use _ prefixednobu
versions to suppress warnings. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22876 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-03-05* include/ruby/encoding.h (enc_initialized_p): ENC_UNINITIALIZEDnobu
is not defined already. * include/ruby/encoding.h (ENC_FROM_ENCINDEX): removed because depending on a static variable. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22773 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-03-04* include/ruby/win32.h (WIN95): moved to config.hnobu
* win32/Makefile.sub (config.h): defines WIN95 only if unicows.lib is available. * win32/setup.mak (-unicows-): checks if unicows.lib is available. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22763 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-03-02* eval.c (rb_longjmp), include/ruby/intern.h (ruby_cleanup): fixednobu
prototypes. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22701 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-27* include/ruby/intern.h (rb_io_get_io): added prototype.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22656 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-26 * include/ruby/win32.h (rb_w32_wopen): prototype forgotten.usa
* io.c (rb_sysopen_internal): shouldn't replace undefined chars in this case. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22637 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-23* include/ruby/ruby.h (USE_SYMBOL_AS_METHOD_NAME): Module#methods,nobu
#singleton_methods and so on return Symbols. [ruby-talk:328775] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22566 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-14* string.c (rb_hash_uint32, rb_hash_uint, rb_hash_start, rb_hash_end),mame
include/ruby/intern.h: add Murmurhash API. [ruby-dev:37784] * complex.c (nucomp_hash), array.c (rb_ary_hash), time.c (time_hash), string.c (rb_str_hsah), object.c (rb_obj_hash), range.c (range_hash), struct.c (rb_struct_hash), hash.c (rb_any_hash), rational.c (nurat_hash): use Murmurhash. [ruby-dev:37784] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22317 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-12* compile.c (compile_array_, defined_expr, iseq_compile_each): hidenobu
and freeze internal literal objects, to prevent from modifying. [ruby-dev:37959] * iseq.c (insn_operand_intern): copy internal literal objects. * insns.def (putstring, duparray): ditto. * string.c (rb_str_replace): exported. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22255 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-08* include/ruby/st.h, st.c: order entries by a linked list instead ofmame
a loop to fix iteration miss when hash is modified during iteration. [ruby-dev:37910] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22132 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-08* include/ruby/backward/rubysig.h (rb_thread_blocking_region_begin),nobu
(rb_thread_blocking_region_end): marked as deprecated. * include/ruby/backward/rubysig.h (TRAP_BEG): fix for C++. a patch from Aman Gupta at [ruby-core:21934] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22130 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-08* include/ruby/backward/rubysig.h: extern "C" was missing.nobu
[ruby-core:21929] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22123 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-07* configure.in (--with-arch): added new option to supportnobu
universal binary. replaced --enable-fat-binary option which didn't work actually. * configure.in (RUBY_FUNC_ATTRIBUTE): added conditional test. * configure.in (ac_cv_type_getgroups): decalared because getgroups() fills rest of the buffer with garbages on Rosetta. * configure.in (alloca): defines only for powerpc, but always create empty object to suppress ld warning. * configure.in (LIBRUBY_DLDFLAGS): set compatibility version with TEENY. * configure.in (CFLAGS, LDFLAGS): separates ARCH_FLAG. * configure.in (arch): renamed to "universal" from "fat". * Makefile.in (ARCH_FLAG): added. * include/ruby/defines.h (WORDS_BIGENDIAN): uses AC_APPLE_UNIVERSAL_BUILD. * missing/alloca.c (alloca): defines only if C_ALLOCA is defined. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22106 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-06[__SYMBIAN32__]: included <sys/select.h> for fd_set definitionazav
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22094 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-05* include/ruby/intern.h (rb_run_exec_options_err): renamed fromakr
rb_run_exec_options. (rb_exec_err): renamed from rb_exec. (rb_fork_err): renamed from rb_fork. (rb_spawn_err): renamed from rb_spawn. (rb_run_exec_options): declared with 1.9.1 compatible signature. (rb_exec): ditto. (rb_fork): ditto. (rb_spawn): ditto. * process.c (rb_run_exec_options_err): renamed from rb_run_exec_options. (rb_exec_err): renamed from rb_exec. (rb_fork_err): renamed from rb_fork. (rb_spawn_err): renamed from rb_spawn. (rb_run_exec_options): defined. (rb_exec): ditto. (rb_fork): ditto. (rb_spawn): ditto. * io.c: follow above change. * ext/pty/pty.c: follow above change. [ruby-dev:37893] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22078 b2dd03c8-39d4-4d8f-98ff-823fe69b080e