summaryrefslogtreecommitdiff
path: root/include/ruby
AgeCommit message (Collapse)Author
2013-04-05defines.h: RUBY_SYMBOL_EXPORT_{BEGIN,END}nobu
* include/ruby/defines.h (RUBY_SYMBOL_EXPORT_{BEGIN,END}): visibility control macros. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40122 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-04-04* include/ruby/ruby.h (FIX2LONG): Parenthesize the macro body.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40110 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-03-31* include/ruby/ruby.h (FIX2ULONG): Make it consistent with NUM2ULONG.akr
* ext/-test-/num2int/num2int.c: Add utility methods for FIX2XXX tests. * test/-ext-/num2int/test_num2int.rb: Add tests for FIX2XXX. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40023 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-03-29ruby/io.h: get rid of conflict on AIXnobu
* include/ruby/io.h: undef POSIX compliants names on AIX, which are no longer needed. patch suggested by edelsohn (David Edelsohn) in [ruby-core:53815]. [Bug #8174] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39993 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-03-28ruby/io.h: get rid of conflict on AIXnobu
* include/ruby/io.h: rename SVR3,4 member names as POSIX compliants, to get rid of conflict on AIX. [ruby-core:53765] [Bug #8174] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39987 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-03-27* include/ruby/intern.h: Delete redundant inclusions caused byakr
AC_INCLUDES_DEFAULT in defines.h. * include/ruby/defines.h: Ditto. * include/ruby/ruby.h: Ditto. * include/ruby/st.h: Ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39973 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-03-27* include/ruby/defines.h: Fix a compilation error on NetBSD,akr
"type of formal parameter 1 is incomplete" for the rb_thread_wait_for invocation in rb_file_flock, by including header files as AC_INCLUDES_DEFAULT of autoconf. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39972 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-03-21revert r39861nobu
* include/ruby/ruby.h: revert r39861 because RB_UNUSED_VAR() is used for array variables in extension libraries. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39864 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-03-21ruby.h: RB_UNUSED_VAR from UNINITIALIZED_VARnobu
* include/ruby/ruby.h (RB_UNUSED_VAR): move code from UNINITIALIZED_VAR() in vm_core.h. * vm_core.h (UNINITIALIZED_VAR): use RB_UNUSED_VAR(). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39861 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-03-16* include/ruby/missing.h: removed __linux__. it's unnecessary.kosaki
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39783 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-03-16missing.h: build fixnobu
* include/ruby/missing.h: include time.h and sys/time.h iff needed, but excepct for sys/time.h on linux to get rid of glibc bug. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39781 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-03-16mingw build fixnobu
* configure.in: struct timeval is defined in winsock2.h on mingw. * include/ruby/missing.h: include time.h for time_t, and sys/time.h for timeval and timespec. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39777 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-03-16* include/ruby/missing.h (__syscall): moved to...kosaki
* io.c: here. because __syscall() is only used from io.c. * include/ruby/missing.h: move "#include <sys/type.h>" to .... * include/ruby/intern.h: here. because it was introduced for fixing NFDBITS issue. [ruby-core:05179]. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39774 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-03-16* include/ruby/missing.h (struct timespec): include <sys/time.h>kosaki
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39773 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-03-16* configure.in: check struct timeval exist or not.kosaki
* include/ruby/missing.h (struct timeval): check HAVE_STRUCT_TIMEVAL properly. and don't include sys/time.h if struct timeval exist. * file.c: include sys/time.h explicitly. * random.c: ditto. * thread_pthread.c: ditto. * time.c: ditto. * ext/date/date_strftime.c: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39772 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-03-06intern.h: macro rb_check_aritynobu
* include/ruby/intern.h (rb_check_arity): same name macro for backward compatibility checking by ifdef. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39610 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-03-05intern.h: inline function rb_check_aritynobu
* include/ruby/intern.h (rb_check_arity): make a static inline function so it can be used as an expression and argc would be evaulated only once. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39598 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-03-01* Merge Onigmo 0fe387da2fee089254f6b04990541c731a26757fnaruse
v5.13.3 [Bug#7972] [Bug#7974] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39547 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-02-25version.h: bump RUBY_API_VERSIONnobu
* include/ruby/version.h: bump RUBY_API_VERSION same as RUBY_VERSION. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39496 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-02-20ruby.h: HAVE_RB_SCAN_ARGS_OPTIONAL_HASHnobu
* include/ruby/ruby.h (HAVE_RB_SCAN_ARGS_OPTIONAL_HASH): for rb_scan_args() optional hash feature. [Bug #7861] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39335 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-01-30win32.h: revert r37337nobu
* include/ruby/win32.h (fstat): revert r37337, which uses _fstati64() instead of fstati64() on mingw32. [Bug #7276] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38992 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-01-29* vm_backtrace.c: fix issue of rb_debug_inspector_open().ko1
The order of making binding should be stack (frame) top to bottom. [Bug #7635] And also fix issue of collecting klass. Collecting klass is same as TracePoint#defined_class. (previous version, it returns T_ICLASS (internal objects). * test/-ext-/debug/test_debug.rb: add a test. * ext/-test-/debug/extconf.rb, init.c, inspector.c: ditto. * vm_backtrace.c: remove magic number and add enum CALLER_BINDING_*. * vm_backtrace.c, include/ruby/debug.h: add new C api (experimental) rb_debug_inspector_frame_self_get(). * vm.c, vm_core.h, vm_trace.c: move decl. of rb_vm_control_frame_id_and_class() and constify first parameter. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38970 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-01-28vm_backtrace.c: use longnobu
* vm_backtrace.c (rb_debug_inspector_frame_{class,binding,iseq}_get): use long as index as well as RARRAY_LEN(). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38962 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-01-08ruby.h: alignnobu
* include/ruby/ruby.h (RBasic): to be aligned on a VALUE size boundary. [Bug #7647] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38741 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-01-07* include/ruby/ruby.h (RUBY_EVENT_SPECIFIED_LINE): make it special.ko1
This flag is not contained by RUBY_EVENT_TRACEPOINT_ALL. This event is experimental one. It is possible to remove/rename flag name after 2.0.1. * vm_trace.c (get_event_id): return :line if SPECIFIED_LINE was occurred. `:specified_line' never been returned. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38728 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-12-25* bignum.c, include/ruby/intern.h (rb_big_eql): exported.usa
* thread.c (recursive_check): object_id maybe a Bignum, not Fixnum on LLP64. see also r38493 and r38548. reported by Heesob Park at [ruby-core:51083] [Bug #7607], and patched by shirosaki at [ruby-core:51095] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38595 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-12-22* include/ruby/intern.h: add the prototype declaration ofmrkn
rb_num_coerce_bit. * numeric.c (rb_num_coerce_bit): the new coerce function for bitwise binary operation. * bignum.c (rb_big_and): use coerce to convert the argument, which isn't a Fixnum nor a Bignum, to the corresponding Integer object so that bitwise operations can support Integer-mimic objects. [Bug #1792] [ruby-core:39491] * bignum.c (rb_big_or): ditto. * bignum.c (rb_big_xor): ditto. * numeric.c (bit_coerce): ditto. * numeric.c (fix_and): ditto. * numeric.c (fix_or): ditto. * numeric.c (fix_xor): ditto. * test/ruby/test_integer.rb: add tests for the above changes. * test/ruby/test_bignum.rb: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38560 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-12-21* include/ruby/debug.h: define rb_trace_arg_t.ko1
* vm_core.h: catch up above changes. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38526 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-12-20ruby.h: RTEST NIL_Pnobu
* include/ruby/ruby.h (RTEST, NIL_P): make bare expressions without outermost parentheses. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38499 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-12-15thread.c: revert r38382 but deprecate rb_thread_polling()nobu
* thread.c (rb_thread_polling): revert but deprecate. * include/ruby/intern.h (rb_thread_polling): deprecate. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38391 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-12-13* include/ruby/ruby.h (RB_UNUSED_VAR): new macro to suppressshugo
warnings for unused variables. * ext/bigdecimal/bigdecimal.c (ENTER): use RB_UNUSED_VAR() to suppress annoying warnings by -Wunused-but-set-variable in gcc 4.6. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38351 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-12-10* fix the behavior when a module is included into a refinement.shugo
This change is a little tricky, so it might be better to prohibit module inclusion to refinements. * include/ruby/ruby.h (RMODULE_INCLUDED_INTO_REFINEMENT): new flag to represent that a module (iclass) is included into a refinement. * class.c (include_modules_at): set RMODULE_INCLUDED_INTO_REFINEMENT if klass is a refinement. * eval.c (rb_mod_refine): set the superclass of a refinement to the refined class for super. * eval.c (rb_using_refinement): skip the above superclass (the refined class) when creating iclasses for refinements. Otherwise, `using Refinement1; using Refinement2' creates iclasses: <Refinement2> -> <RefinedClass> -> <Refinement1> -> RefinedClass, where <Module> is an iclass for Module, so RefinedClass is searched before Refinement1. The correct iclasses should be <Refinement2> -> <Refinement1> -> RefinedClass. * vm_insnhelper.c (vm_search_normal_superclass): if klass is an iclass for a refinement, use the refinement's superclass instead of the iclass's superclass. Otherwise, multiple refinements are searched by super. For example, if a refinement Refinement2 includes a module M (i.e., Refinement2 -> <M> -> RefinedClass, and if refinements iclasses are <Refinement2> -> <M>' -> <Refinement1> -> RefinedClass, then super in <Refinement2> should use Refinement2's superclass <M> instead of <Refinement2>'s superclass <M>'. * vm_insnhelper.c (vm_search_super_method): do not raise a NotImplementError if current_defind_class is a module included into a refinement. Because of the change of vm_search_normal_superclass(), the receiver might not be an instance of the module('s iclass). * test/ruby/test_refinement.rb: related test. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38298 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-12-08* eval.c (rb_mod_refine), vm_eval.c (rb_yield_refine_block):shugo
Module#refine activates all refinements defined in that module only in a given block. * string.c (sym_to_proc, sym_call): don't use refinements. * test/ruby/test_refinement.rb: related test. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38269 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-11-30* include/ruby/ruby.h (rb_event_flag_t): Maintain integer precisiondrbrain
for clang error (VALUE aka unsigned long vs unsigned int) git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38084 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-11-30 [EXPERIMENTAL]ko1
* iseq.c: add following two methods. * ISeq#line_trace_all returns all line traces (line numbers) * ISeq#line_trace_specify(pos, set) set `pos'th line event to specified_line event (if set is true). These features are introduced for debuggers (mainly to make breakpoint). * iseq.h: add decl. of C APIs. * test/ruby/test_iseq.rb: add tests. * vm_trace.c: add `specified_line' event. * include/ruby/ruby.h: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38076 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-11-30vm_backtrace.c: RB_GC_GUARDnobu
* include/ruby/ruby.h (RB_GC_GUARD_PTR): add note. * vm_backtrace.c (backtrace_to_str_ary): use RB_GC_GUARD() instead of RB_GC_GUARD_PTR() which has no effect. (backtrace_to_location_ary): ditto. (vm_backtrace_to_ary): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38015 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-11-29 [EXPERIMENTAL: NEED DISCUSS]ko1
* vm_trace.c: add events * :thread_begin - hook at thread beggining. * :thead_end - hook at thread ending. * :b_call - hook at block enter. * :b_return - hook at block leave. This change slow down block invocation. Please try and give us feedback until 2.0 code freeze. * include/ruby/ruby.h: ditto. * compile.c (rb_iseq_compile_node): ditto. * insns.def: ditto. * thread.c: ditto. * vm.c: ditto. * include/ruby/debug.h: add a comment. * test/ruby/test_settracefunc.rb: add a tests. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38007 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-11-29* include/ruby/debug.h: add rb_debug_inspector_* APIs.ko1
* vm_backtrace.c: ditto. * common.mk: add dpendency from vm_backtrace.o to include/ruby/debug.h. * proc.c (rb_binding_new_with_cfp): constify. * vm.c (rb_vm_get_ruby_level_next_cfp): consitify. * vm_core.h, vm_trace.c: move decls. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37979 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-11-29* include/ruby/debug.h: provide rb_tracearg_*() APIs,ko1
instead of rb_tracepoint_attr_*(). These APIs are for debuggers/profilers. They will be explained in another docs somtime. * vm_trace.c: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37975 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-11-29* vm_trace.c (rb_tracepoint_attr_method_id):ko1
rename TracePoint#id to TracePoint#method_id. * include/ruby/debug.h: ditto. * test/ruby/test_settracefunc.rb: ditto, git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37973 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-11-29* vm_trace.c (rb_tracepoint_attr_defined_class):ko1
rename TracePoint#klass to TracePoint#defined_class. [ruby-core:50187] Re: [ruby-trunk - Feature #6895] * include/ruby/debug.h: ditto. * test/ruby/test_settracefunc.rb: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37972 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-11-28* include/ruby/thread.h (rb_thread_call_without_gvl2): changeko1
meaning of function. This function is called with same parameters of `rb_thread_call_without_gvl()'. However, if interrupts are detected, when return immediately. * thread.c: implement `rb_thread_call_without_gvl2()'. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37938 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-11-26* vm_trace.c: rename TracePoint#file and TracePoint#lineko1
to TracePoint#path and TracePoint#lineno respectively. They are consistent to RubyVM::Backtrace::Location. * include/ruby/debug.h: ditto. * vm_core.h: ditto. * test/ruby/test_settracefunc.rb: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37876 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-11-21property.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37787 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-11-21 * include/ruby/util.h: removed extra semicolon in definition oftadf
macro. * compile.c: ditto. * cont.c: ditto. * math.c: ditto. * node.c: ditto. * parse.y: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37781 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-11-20* include/ruby/debug.h: introdudced.ko1
Debugging/profiling features will be located. * vm_trace.c: expose C-level TracePoint APIs. Note that they are experimental. * vm_trace.c, include/ruby/debug.h: rename `rb_hook_flag_t' to `rb_event_hook_flag_t'. Macro names `RUBY_HOOK_FLAG_*' are also renamed to `RUBY_EVENT_HOOK_FLAG_*'. * debug.h, vm_debug.h: rename debug.h to vm_debug.h. * common.mk: ditto. * debug.c, main.c, vm_core.h: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37765 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-11-16* thread.c (rb_thread_call_without_gvl2): change the parameter ofko1
`func' from `int *skip_interrupt' to `VALUE *flags'. If (flags & RUBY_CALL_WO_GVL_FLAG_SKIP_CHECK_INTS) is not zero, then skip checking interrupt. [ruby-core:46547] * include/ruby/thread.h: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37681 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-11-09Fix build when gcc is used and the platform's libc lacks alloca().knu
* include/ruby/ruby.h (alloca), eval_intern.h (alloca), gc.c (alloca): Make alloca() globally available by moving the ultimate ifdef's to ruby/ruby.h. Gcc hides its builtin alloca() when compiling with -ansi, and linking thus fails on platforms that lack their own alloca() implementation in libc, which include OpenBSD and some ports of NetBSD. We use alloca() everywhere including from within third party C extentions, so alloca() must be made globally available. [Bug #7307] * addr2line.c (alloca): Replace the alloca() part with the ultimate ifdef's. [Bug #7307] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37571 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-11-07* include/ruby/intern.h: Restore rb_enumeratorize as it was before r37497marcandre
and introduce rb_enumeratorize_with_size instead. [#7302] * enumerator.c: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37543 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-11-07* eval.c (rb_mod_refine): set RMODULE_IS_REFINEMENT to a createdshugo
refinement module, and don't override method_added. * vm_method.c (rb_method_entry_make): check redefinition of optimized methods when a method is added to a refinement module. [ruby-core:48970] [Bug #7290] * test/ruby/test_refinement.rb: related test. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37534 b2dd03c8-39d4-4d8f-98ff-823fe69b080e