summaryrefslogtreecommitdiff
path: root/include/ruby
AgeCommit message (Collapse)Author
2009-08-24 * include/ruby/missing.h (vsnprintf): rollback a part of r24179, becauseusa
it's meaningless. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24638 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-08-21Rename FMODE_STRIP_BOM to FMODE_SETENC_BY_BOM.naruse
* include/ruby/io.h, io.c (FMODE_SETENC_BY_BOM): renamed from FMODE_STRIP_BOM. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24606 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-08-15\d, \s and \w are now non Unicode class. [ruby-dev:39026]naruse
* include/ruby/oniguruma.h (ONIGENC_CTYPE_SPECIAL_MASK): added. (ONIGENC_CTYPE_D): ditto. (ONIGENC_CTYPE_S): ditto. (ONIGENC_CTYPE_W): ditto. * regparse.c: \d, \s and \w are now non Unicode class. [ruby-dev:39026] (fetch_token_in_cc): use ONIGENC_CTYPE_[DSW] for \d/\s/\w. (fetch_token): ditto. (add_ctype_to_cc): add routines for ONIGENC_CTYPE_[DSW]. (parse_exp): ditto. * test/ruby/test_regexp.rb (TestRegexp#test_char_class): add tests for above. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24544 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-08-14* include/ruby/ruby.h (rb_check_safe_str): deprecated.nobu
* ext/openssl/ossl_x509store.c (ossl_x509store_add_{file,path}): replaced deprecated funtion. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24541 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-08-12* class.c (rb_define_class_id_under, rb_define_module_id_under):nobu
new functions to define a nested class/module with non-ascii name. * struct.c (make_struct): use name with encoding. * struct.c (inspect_struct): ditto. [ruby-core:24849] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24513 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-08-10* include/ruby/intern.h (rb_path2class): no deprecation.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24493 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-08-10* gc.c: reject unused longlife gc.nari
* debug.c: ditto. * include/ruby/intern.h: ditto. * include/ruby/ruby.h: ditto. * iseq.c: ditto. * node.h: ditto. * vm_insnhelper.c: ditto. * vm_insnhelper.h: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24490 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-08-09* marshal.c (class2path, w_unique, w_extended, w_class, w_uclass):nobu
deal with non-ascii class path. [ruby-core:24790] * marshal.c (r_unique, path2class, path2module, obj_alloc_by_path), (r_object0): ditto. * variable.c (rb_path_to_class): new encoding-aware function to get a class from its name. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24488 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-08-04Warn duplicated characters in character class of regexp. [ruby-core:24593]naruse
* include/ruby/oniguruma.h (ONIG_SYN_WARN_CC_DUP): defined. * regparse.h (ScanEnv): add warnings_flag. * regparse.c (CC_DUP_WARN): defined for warn duplicated characters in character class of regexp. [ruby-core:24593] (add_code_range_to_buf): add CC_DUP_WARN. (next_state_val): add CC_DUP_WARN. (OnigSyntaxRuby): add ONIG_SYN_WARN_CC_DUP. (SET_ALL_MULTI_BYTE_RANGE): add env to arguments. (add_code_range): ditto. (add_code_range_to_buf): ditto. (not_code_range_buf): ditto. (or_code_range_buf): ditto. (and_code_range1): ditto. (and_code_range_buf): ditto. (and_cclass): ditto. (or_cclass): ditto. (add_ctype_to_cc_by_range): ditto. (add_ctype_to_cc): ditto. (parse_char_class): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24387 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-07-30* insns.def (defineclass): preserve encoding of class/modulenobu
names. [ruby-core:24600] * variable.c (rb_set_class_path_string): set class path with a string value. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24321 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-07-27* include/ruby/intern.h (rb_*str_new_cstr, rb_str_buf_new_cstr),nobu
(rb_str_buf_cat2, rb_str_cat2, rb_exc_new2): suppress warnings. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24298 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-07-25* include/ruby/defines.h [__SYMBIAN32__]: defined TRUE and FALSE to match ↵azav
changes in bignum.c and array.c. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24276 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-07-21 * win32/win32.[ch] (recvmsg, sendmsg): new functions to support recvmsg/usa
sendmsg like UNIX. these functions are experimental and not tested well. bug reports are welcome. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24218 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-07-18* include/ruby/defines.h (TRUE, FALSE): for internal use.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24193 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-07-18* random.c (rb_random_{int32,real,bytes,int}): added functions fornobu
extension libraries. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24189 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-07-17 * include/ruby/win32.h: include winsock headers in extern "C++" forusa
C++ extension libraries. * include/ruby/missing.h (vsnprintf): workaround for VC++. [ruby-core:23096] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24179 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-07-16* bignum.c (rb_big_new, rb_bigzero_p), range.c (rb_range_values):nobu
added for random.c. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24143 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-07-15* method.h, vm_core.h: add rb_method_entry_t. Remove nodes aroundko1
method management. This change affect some VM control stack structure. * vm.c, vm_insnhelper.c, vm_method.c, vm_eval.c: ditto. and make some refactoring. * insns.def, class.c, eval.c, proc.c, vm_dump.c : ditto. * vm_core.h, compile.c (iseq_specialized_instruction): remove VM_CALL_SEND_BIT. use another optimization tech for Kernel#send. * node.h: remove unused node types. * ext/objspace/objspace.c (count_nodes): ditto. * gc.c: add mark/free functions for method entry. * include/ruby/intern.h: remove decl of rb_define_notimplement_method_id(). nobody can use it because noex is not opend. * iseq.c (iseq_mark): fix to check ic_method is available. * iseq.c (rb_iseq_disasm): fix to use rb_method_get_iseq(). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24128 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-07-10* include/ruby/ruby.h (rb_obj_{untrust,untrusted,trust}): addednobu
prototypes. [ruby-dev:38756] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24013 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-07-09Set encoding and strip bom when modeenc string is "r:foo-bom" [ruby-dev:37236]naruse
* include/ruby/io.h (FMODE_STRIP_BOM): new constant. * io.c (io_encname_bom_p): judge whether the encoding name is *-bom or not. (parse_mode_enc): drop "-bom". (rb_io_modestr_fmode): set FMODE_STRIP_BOM if needed. (rb_io_extract_modeenc): ditto. (io_strip_bom): strip bom if exists. (io_set_encoding_by_bom): set encoding if there is bom. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24001 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-07-07* include/ruby/ruby.h:ko1
rename "...TypeStruct" and "typed_struct" to "TypedData..." and "typeddata", respectively. rename rb_data_type_t#name to rb_data_type_t#wrap_struct_name. * error.c, gc.c, iseq.c, vm.c: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23987 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-07-07* error.c (rb_typed_struct_is_kind_of): new function to see if thenobu
given typed struct. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23983 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-07-07* error.c (rb_check_typed_struct): new function to check typednobu
struct. * include/ruby/ruby.h (Check_TypedStruct, Data_Get_TypedStruct): new macro to check typed struct. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23981 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-07-01* include/ruby/intern.h (rb_time_num_new): declared.akr
* time.c (nsec2timev): extracted from time_new_internal. (time_new_internal): change argument to VALUE. (rb_time_new): follow the argument change. (rb_time_nano_new): ditto. (rb_time_num_new): new function. * ext/socket/ancdata.c (ancillary_timestamp): use rb_time_num_new to represent struct bintime preciously. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23924 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-06-30* re.c (reg_match_pos): adjust offset based on characters, notmatz
bytes. [ruby-dev:38722] * string.c (rb_str_offset): new function. * string.c (rb_str_index_m): no call to rb_reg_adjust_startpos(). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23916 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-06-30* include/ruby/oniguruma.h, include/ruby/re.h, re.c, regcomp.c,nobu
regenc.c, regerror.c, regexec.c, regint.h, regparse.c: use long. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23907 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
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