summaryrefslogtreecommitdiff
path: root/include
AgeCommit message (Collapse)Author
2013-10-09compar.c: fail if recursionnobu
* compar.c (cmp_eq): fail if recursion. [ruby-core:57736] [Bug #9003] * thread.c (rb_exec_recursive_paired_outer): new function which is combinnation of paired and outer variants. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43208 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-10-09* include/ruby/debug.h,ko1
vm_backtrace.c (rb_profile_frame_full_label): add new C API rb_profile_frame_full_label() which returns label with qualified method name. Note that in future version of Ruby label() may return same return value of full_label(). * ext/-test-/debug/profile_frames.c, test/-ext-/debug/test_profile_frames.rb: fix a test for this change. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43205 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-10-08* vm_backtrace.c, include/ruby/debug.h: add new APIsko1
* VALUE rb_profile_frame_method_name(VALUE frame) * VALUE rb_profile_frame_qualified_method_name(VALUE frame) * iseq.c (rb_iseq_klass), internal.h: add new internal function rb_iseq_method_name(). * ext/-test-/debug/profile_frames.c (profile_frames), test/-ext-/debug/test_profile_frames.rb: add a test. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43199 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-10-07* include/ruby/debug.h: add backtrace collecting APIs for profiler.ko1
* int rb_profile_frames(int start, int limit, VALUE *buff, int *lines); Collect information of frame information. * VALUE rb_profile_frame_path(VALUE frame); * VALUE rb_profile_frame_absolute_path(VALUE frame); * VALUE rb_profile_frame_label(VALUE frame); * VALUE rb_profile_frame_base_label(VALUE frame); * VALUE rb_profile_frame_first_lineno(VALUE frame); * VALUE rb_profile_frame_classpath(VALUE frame); * VALUE rb_profile_frame_singleton_method_p(VALUE frame); Get information about each frame. These APIs are designed for profilers, for example, no objectallocation, and enough information for profilers. In this version, this API collects only collect Ruby level frames. This issue will be fixed after Ruby 2.1. * vm_backtrace.c: implement above APIs. * iseq.c (rb_iseq_klass): return local_iseq's class. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43170 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-10-01file.c: export rb_stat_newnobu
* file.c (stat_new_0): constify. * file.c (rb_stat_new): constify and export. based on a patch by Hanmac (Hans Mackowiak) at [ruby-core:53225]. [Feature #8050] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43107 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-10-01ruby.h: export ruby_safe_level_4_warningnobu
* include/ruby/ruby.h (ruby_safe_level_4_warning): needed by extension libraries which check safe level 4. [ruby-dev:47517] [Bug #8652] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43103 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-09-25* include/ruby/ruby.h: rename RARRAY_RAWPTR() to RARRAY_CONST_PTR().ko1
RARRAY_RAWPTR(ary) returns (const VALUE *) type pointer and usecase of this macro is not acquire raw pointer, but acquire read-only pointer. So we rename to better name. RSTRUCT_RAWPTR() is also renamed to RSTRUCT_CONST_PTR() (I expect that nobody use it). * array.c, compile.c, cont.c, enumerator.c, gc.c, proc.c, random.c, string.c, struct.c, thread.c, vm_eval.c, vm_insnhelper.c: catch up this change. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43043 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-09-25internal.h: move inline functionsnobu
* internal.h (rb_float_value, rb_float_new): move inline functions from ruby/ruby.h. * numeric.c (rb_float_value, rb_float_new): define external functions for extension libraries. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43042 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-09-22intern.h: move rb_ary_cat from internal.hnobu
* include/ruby/intern.h (rb_ary_cat): move from internal.h, since it is described in README.EXT. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43015 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-09-19* include/ruby/ruby.h: make Symbol objects frozen.ko1
[Feature #8906] I want to freeze this good day, too. * test/ruby/test_eval.rb: catch up this change. * test/ruby/test_symbol.rb: add a test to check frozen symbols. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42974 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-09-06* common.mk: use RUNRUBY instead of MINIRUBY because MINIRUBY can'tglass
require extension libraries. The patch is from nobu (Nobuyoshi Nakada). * ext/thread/extconf.rb: for build ext/thread/thread.c. * include/ruby/intern.h: ditto. * thread.c: ditto. * lib/thread.rb: removed and replaced by ext/thread/thread.c. * ext/thread/thread.c: Queue, SizedQueue and ConditionVariable implementations in C. This patch is based on patches from panaggio (Ricardo Panaggio) and funny_falcon (Yura Sokolov) and ko1 (Koichi Sasada). [ruby-core:31513] [Feature #3620] * test/thread/test_queue.rb (test_queue_thread_raise): add a test for ensuring that killed thread should be removed from waiting threads. It is based on a code by ko1 (Koichi Sasada). [ruby-core:45950] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42862 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-09-06win32.c: clock_getresnobu
* win32/win32.c (clock_getres): required as well as clock_gettime(). [ruby-dev:47699] [Bug #8869] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42855 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-09-06transcode.c: add rb_econv_appendnobu
* transcode.c (rb_econv_append): new function to append a string data with converting its encoding. split from rb_econv_substr_append. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42853 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-09-05* include/ruby/ruby.h: add RSTRING_FSTR flagcharliesome
* internal.h: add rb_fstring() prototype * parse.y (str_suffix_gen): deduplicate frozen string literals * string.c (rb_fstring): deduplicate frozen string literals * string.c (rb_str_free): delete fstrings from frozen_strings table when they are GC'd * string.c (Init_String): initialize frozen_strings table * test/ruby/test_string.rb: test frozen strings are deduplicated git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42843 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-09-03string.c: rb_enc_str_new_cstrnobu
* string.c (rb_enc_str_new_cstr): new function to create a string from the C-string pointer with the specified encoding. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42811 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-08-30encoding.h: fix conflictsnobu
* include/ruby/encoding.h (rb_{ascii8bit,utf8,usascii}_encindex): get rid of conflict with macros defined in internal.h. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42734 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-08-29* struct.c (rb_struct_define_without_accessor_under): added.ko1
This function is similar to rb_define_class_under() against rb_define_class(). * include/ruby/intern.h: add a declaration of this function. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42725 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-08-27vm_eval.c: constifynobu
* vm_eval.c (rb_check_funcall, rb_check_funcall_with_hook): constify argv. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42701 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-08-19* include/ruby/defines.h: Fix a compilation error withakr
i586-mingw32msvc-gcc of gcc-mingw32 package on Debian squeeze. ruby/missing.h should be included before include/ruby/win32.h because struct timespec, used in the clock_gettime declaration in include/ruby/win32.h, is defined in ruby/missing.h instead of system headers. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42625 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-08-19* include/ruby/win32.h (CLOCK_MONOTONIC): typo.usa
* win32/win32.c: removed duplicated declarations. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42617 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-08-15* include/ruby/win32.h, win32/Makefile.sub, win32/win32.cusa
(clock_gettime): [experimental] emulates clock_gettime(2) of posix. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42557 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
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