summaryrefslogtreecommitdiff
path: root/include
AgeCommit message (Collapse)Author
2013-08-11* include/ruby/encoding.h: Reduce ENCODING_INLINE_MAX to 127 as thischarliesome
should be sufficient to represent all the encodings Ruby supports. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42508 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-08-08* include/ruby/ruby.h: define USE_RGENGC_LOGGING_WB_UNPROTECT.ko1
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42442 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-08-08* include/ruby/ruby.h: add old macro name `RUBY_EVENT_SWITCH'.ko1
This macro name is obsolete because it is renamed to RUBY_INTERNAL_EVENT_SWITCH, but it has compatibility problem using this macro name like ruby-prof. I want to remove this macro after ruby 2.1. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42441 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-08-08proc.c: constifiynobu
* proc.c (rb_proc_call_with_block): constifiy argv. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42435 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-08-05* include/ruby/encoding.h: document which user flags are used bycharliesome
ENCODING_MASK for better greppability git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42381 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-08-03struct.c: rb_struct_define_undernobu
* struct.c (rb_struct_define_under): new function to define Struct under the given namespace, not under Struct. [Feature #8264] * ext/etc/etc.c: use rb_struct_define_under. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42348 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-08-01* rational.c (rb_flt_rationalize_with_prec): new public C functionmrkn
to rationalize a Float instance with a precision. * rational.c (rb_flt_rationalize): new public C function to rationalize a Float instance. A precision is calculated from the given float number. * include/ruby/intern.h: Add rb_flt_rationalize_with_prec and rb_flt_rationalize. * parse.y: implement number literal suffixes, 'r' and 'i'. [ruby-core:55096] [Feature #8430] * bootstraptest/test_literal_suffix.rb: add tests for parser to scan number literals with the above tsuffixes. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42311 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-07-28* include/ruby/intern.h (rb_absint_size): Declaration moved fromakr
internal.h to calculate required buffer size to pack integers. (rb_absint_numwords): Ditto. (rb_absint_singlebit_p): Ditto. [ruby-core:42813] [Feature #6065] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42208 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-07-27* include/ruby/intern.h (rb_integer_pack): Declaration moved fromakr
internal.h. (rb_integer_unpack): Ditto. [ruby-core:42813] [Feature #6065] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42202 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-07-26load.c: search in OS path encodingnobu
* load.c (rb_load_internal): use rb_load_file_str() to keep path encoding. * load.c (rb_require_safe): search in OS path encoding for Windows. * ruby.c (rb_load_file_str): load file with keeping path encoding. * win32/file.c (rb_file_load_ok): use WCHAR type API assuming incoming path is encoded in UTF-8. [ruby-core:56136] [Bug #8676] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42183 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-07-25* include/ruby/ruby.h: check defined(USE_RGENGC_LOGGING_WB_UNPROTECT)naruse
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42173 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-07-24* array.c, gc.c: move ary_unprotect_logging() intoko1
rb_gc_unprotect_logging() which is general version * include/ruby/ruby.h: add USE_RGENGC_LOGGING_WB_UNPROTECT to enable. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42151 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-07-20encoding.c: add rb_enc_code_to_mbclennobu
* encoding.c (rb_enc_code_to_mbclen): add new function which returns mbclen from codepoint like as rb_enc_codelen() but 0 for invalid char. * include/ruby/encoding.h (rb_enc_code_to_mbclen): declaration and shortcut macro. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42077 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-07-18ruby.h: error only in the corenobu
* include/ruby/ruby.h (RUBY_SAFE_LEVEL_CHECK): make only rb_set_safe_level(4) an error always but make rb_secure(4) an error only in the core. [ruby-dev:47517] [Bug #8652] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42037 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-07-18* include/ruby/ruby.h: fix spell miss.ko1
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42036 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-07-18ruby.h: no $nobu
* include/ruby/ruby.h (ruby_safe_level_4): get rid of special character. [ruby-dev:47512] [misc #8646] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42035 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-07-17* include/ruby/st.h (st_strcasecmp): Macro defined for compatibility.akr
(st_strncasecmp): Ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42019 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-07-16* st.c (st_locale_insensitive_strcasecmp): Renamed from st_strcasecmp.akr
(st_locale_insensitive_strncasecmp): Renamed from st_strncasecmp. * include/ruby/st.h: Follow above changes. * include/ruby/ruby.h: Ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42012 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-07-16* configure.in: revert r42008. strcasecmp() uses the current locale.glass
* include/ruby/ruby.h: ditto. * st.c (st_strcasecmp): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42009 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-07-16* configure.in: check strcasecmp().glass
* include/ruby/ruby.h: use strcasecmp() as st_strcasecmp() if it exists. * st.c (st_strcasecmp): define the function only if strcasecmp() doesn't exist. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42008 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-07-15* include/ruby/intern.h (rb_big2str0): Deprecated.akr
* bignum.c (rb_big2str1): Renamed from rb_big2str0. (rb_big2str0): Deprecated wrapper for rb_big2str1. (rb_big2str): Invoke rb_big2str1 instead of rb_big2str0. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41987 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-07-10string.c: rb_str_subposnobu
* string.c (rb_str_subpos): make public function. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41900 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-07-09Revert r41786 "broken utf-8"naruse
revert unexpected commit git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41855 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-07-08win32.c: for strict ANSInobu
* win32/win32.c (rb_w32_pow): move from win32.h and disable strict ANSI mode macro to let _controlfp() stuff defined. [ruby-core:55312] [Bug #8495] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41836 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-07-05broken utf-8naruse
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41786 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-07-04* regcomp.c (): Merge Onigmo 5.13.5 23b523076d6f1161.naruse
https://bugs.ruby-lang.org/issues/8583 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41764 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-07-02encoding.c: validate indexnobu
* encoding.c (rb_enc_set_index, rb_enc_associate_index): validate argument encoding index. * include/ruby/encoding.h (ENCODING_SET): use rb_enc_set_index() instead of setting inlined bits directly. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41739 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-30win32.c: UTF-8 spawnnobu
* win32/win32.c (w32_spawn): extract codepage aware code from rb_w32_spawn(). * win32/win32.c (rb_w32_uspawn): add UTF-8 version function. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41706 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-30win32.c: UTF-8 aspawnnobu
* win32/win32.c (w32_aspawn_flags): extract codepage aware code from rb_w32_aspawn_flags(). * win32/win32.c (rb_w32_uaspawn_flags, rb_w32_uaspawn_flags): add UTF-8 version functions. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41705 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-26intern.h: rb_enumeratorize_with_size with castnobu
* include/ruby/intern.h (rb_enumeratorize_with_size): cast for backward compatibility. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41657 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-26intern.h: define rb_enumerator_size_funcnobu
* include/ruby/intern.h (rb_enumerator_size_func): define strict function declaration for rb_enumeratorize_with_size(). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41656 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-23* include/ruby/defines.h (BDIGIT): Define it only if it is not definedakr
yet. This eases tests and debug. (SIZEOF_BDIGITS): Ditto. (BDIGIT_DBL): Ditto. (BDIGIT_DBL_SIGNED): Ditto. (PRI_BDIGIT_PREFIX): Ditto. (PRI_BDIGIT_DBL_PREFIX): Ditto. (PRIdBDIGIT): Define it only if PRI_BDIGIT_PREFIX is defined. (PRIiBDIGIT): Ditto. (PRIoBDIGIT): Ditto. (PRIuBDIGIT): Ditto. (PRIxBDIGIT): Ditto. (PRIXBDIGIT): Ditto. (PRIdBDIGIT_DBL): Ditto. (PRIiBDIGIT_DBL): Ditto. (PRIoBDIGIT_DBL): Ditto. (PRIuBDIGIT_DBL): Ditto. (PRIxBDIGIT_DBL): Ditto. (PRIXBDIGIT_DBL): Ditto. * include/ruby/ruby.h (RBIGNUM_EMBED_LEN_MAX): Define it only if it is not defined yet. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41587 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-22* include/ruby/ruby.h, gc.c: rename macros and functions:ko1
OBJ_WB_GIVEUP() -> OBJ_WB_UNPROTECT(), rb_obj_wb_giveup() -> rb_obj_wb_unprotect(), rb_gc_giveup_promoted_writebarrier() -> rb_gc_writebarrier_unprotect_promoted(), * class.c, eval.c, hash.c: use OBJ_WB_UNPROTECT(). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41582 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-22* ext/dl/cfunc.c (rb_dlcfunc_call): Use rb_big_pack instead ofakr
rb_big2ulong_pack and rb_big2ull. * include/ruby/intern.h (rb_big2ulong_pack): Deprecated. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41561 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-21* include/ruby/ruby.h (OBJ_WRITE): cast to (VALUE *) for secondko1
parameter `slot'. You don't need to write a cast (VALUE *) any more. * class.c, compile.c, hash.c, iseq.c, proc.c, re.c, variable.c, vm.c, vm_method.c: remove cast expressions for OBJ_WRITE(). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41548 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-21* include/ruby/ruby.h: constify RArray::as::ary and RArray::heap::ptr.ko1
Use RARRAY_ASET() or RARRAY_PTR_USE() to modify Array objects. * array.c, gc.c: catch up above changes. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41537 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-21* include/ruby/ruby.h: support write barrier protection for T_STRUCT.ko1
Introduce the following C APIs: * RSTRUCT_RAWPTR(st) returns pointer (do WB on your risk). The type of returned pointer is (const VALUE *). * RSTRUCT_GET(st, idx) returns idx-th value of struct. * RSTRUCT_SET(st, idx, v) set idx-th value by v with WB. And * RSTRUCT_PTR(st) returns pointer with shady operation. The type of returned pointer is (VALUE *). * struct.c, re.c, gc.c, marshal.c: rewrite with above APIs. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41534 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-21* include/ruby/ruby.h, re.c: support write barrier for T_REGEXP.ko1
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41530 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-19* include/ruby/ruby.h (struct rb_data_type_struct), gc.c: addko1
rb_data_type_struct::flags. Now, this flags is passed at T_DATA object creation. You can specify FL_WB_PROTECTED on this flag. * iseq.c: making non-shady iseq objects. * class.c, compile.c, proc.c, vm.c: add WB for iseq objects. * vm_core.h, iseq.h: constify fields to detect WB insertion. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41412 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-18* configure.in: Check __int128.akr
* include/ruby/defines.h (BDIGIT_DBL): Use uint128_t if it is available. (BDIGIT): Use uint64_t if uint128_t is available. (SIZEOF_BDIGITS): Defined for above case. (BDIGIT_DBL_SIGNED): Ditto. (PRI_BDIGIT_PREFIX): Ditto. * include/ruby/ruby.h (PRI_64_PREFIX): Defined. * bignum.c (rb_big_pow): Don't use BITSPERDIG for the condition which rb_big_pow returns Float or Bignum. [ruby-dev:47413] [Feature #8509] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41379 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-17* include/ruby/ruby.h, vm_eval.c (rb_funcall_with_block):ktsj
new function to invoke a method with a block passed as an argument. * string.c (sym_call): use the above function to avoid a block sharing. [ruby-dev:47438] [Bug #8531] * vm_insnhelper.c (vm_yield_with_cfunc): don't set block in the frame. * test/ruby/test_symbol.rb (TestSymbol#test_block_given_to_proc): run related tests. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41360 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-17* include/ruby/intern.h, proc.c (rb_method_call_with_block):ktsj
new function to invoke a Method object with a block passed as an argument. * proc.c (bmcall): use the above function to avoid a block sharing. [ruby-core:54626] [Bug #8341] * test/ruby/test_proc.rb (TestProc#test_block_persist_between_calls): run related tests. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41359 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-14* class.c, include/ruby/ruby.h: add write barriers for T_CLASS,ko1
T_MODULE, T_ICLASS. * constant.h: constify rb_const_entry_t::value and file to detect assignment. * variable.c, internal.h (rb_st_insert_id_and_value, rb_st_copy): added. update table with write barrier. * method.h: constify some variables to detect assignment. * object.c (init_copy): add WBs. * variable.c: ditto. * vm_method.c (rb_add_method): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41299 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-14ruby.h: suppress warningsnobu
* include/ruby/ruby.h (RUBY_SAFE_LEVEL_CHECK): suppress warnings "left-hand operand of comma expression has no effect", on gcc 4.4. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41292 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-13ruby.h: safe_level checknobu
* include/ruby/ruby.h (RUBY_SAFE_LEVEL_CHECK): check constant safe level at compile time. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41273 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-12* safe.c (rb_set_safe_level, safe_setter): raise an ArgumentErrorshugo
when $SAFE is set to 4. $SAFE=4 is now obsolete. [ruby-core:55222] [Feature #8468] * object.c (rb_obj_untrusted, rb_obj_untrust, rb_obj_trust): Kernel#untrusted?, untrust, and trust are now deprecated. Their behavior is same as tainted?, taint, and untaint, respectively. * include/ruby/ruby.h (OBJ_UNTRUSTED, OBJ_UNTRUST): OBJ_UNTRUSTED() and OBJ_UNTRUST() are aliases of OBJ_TAINTED() and OBJ_TAINT(), respectively. * array.c, class.c, debug.c, dir.c, encoding.c, error.c, eval.c, ext/curses/curses.c, ext/dbm/dbm.c, ext/dl/cfunc.c, ext/dl/cptr.c, ext/dl/dl.c, ext/etc/etc.c, ext/fiddle/fiddle.c, ext/fiddle/pointer.c, ext/gdbm/gdbm.c, ext/readline/readline.c, ext/sdbm/init.c, ext/socket/ancdata.c, ext/socket/basicsocket.c, ext/socket/socket.c, ext/socket/udpsocket.c, ext/stringio/stringio.c, ext/syslog/syslog.c, ext/tk/tcltklib.c, ext/win32ole/win32ole.c, file.c, gc.c, hash.c, io.c, iseq.c, load.c, marshal.c, object.c, proc.c, process.c, random.c, re.c, safe.c, string.c, thread.c, transcode.c, variable.c, vm_insnhelper.c, vm_method.c, vm_trace.c: remove code for $SAFE=4. * test/dl/test_dl2.rb, test/erb/test_erb.rb, test/readline/test_readline.rb, test/readline/test_readline_history.rb, test/ruby/test_alias.rb, test/ruby/test_array.rb, test/ruby/test_dir.rb, test/ruby/test_encoding.rb, test/ruby/test_env.rb, test/ruby/test_eval.rb, test/ruby/test_exception.rb, test/ruby/test_file_exhaustive.rb, test/ruby/test_hash.rb, test/ruby/test_io.rb, test/ruby/test_method.rb, test/ruby/test_module.rb, test/ruby/test_object.rb, test/ruby/test_pack.rb, test/ruby/test_rand.rb, test/ruby/test_regexp.rb, test/ruby/test_settracefunc.rb, test/ruby/test_struct.rb, test/ruby/test_thread.rb, test/ruby/test_time.rb: remove tests for $SAFE=4. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41259 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-05* include/ruby/ruby.h: fix alignment in comment.mrkn
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41088 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-05add parentheses for claritycharliesome
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41087 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-01error.c: better names for rb_exc_new familynobu
* error.c (rb_exc_new_cstr): rename from rb_exc_new2. * error.c (rb_exc_new_str): rename from rb_exc_new3. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41017 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-01string.c: remove old interfacesnobu
* string.c (rb_str_new[2-5], rb_{tainted,usascii}_str_new2), (rb_str_buf_new2): remove old interfaces. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41016 b2dd03c8-39d4-4d8f-98ff-823fe69b080e