aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* * complex.c: some improvements.tadf2012-11-203-25/+69
| | | | | | | * rational.c: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37757 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* common.mk: fix for BSD makenobu2012-11-202-1/+6
| | | | | | | * common.mk (incs): BSD make cannot deal with non-prefixed dependency and prefixed target. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37756 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * array.c (rb_ary_bsearch): fix rdoc bug (O(n log n) -> O(log n)).mame2012-11-203-2/+9
| | | | | | | | Patch by Charlie Somerville. [ruby-core:49661] [Bug #7409] * range.c (range_bsearch): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37755 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* add a ticket numberko12012-11-201-0/+2
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37754 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * vm_trace.c: rename and add TracePoint APIs.ko12012-11-203-35/+135
| | | | | | | | | | | | | | | | | (1) TracePoint.new(...){...} creates a new trace point but does not make it enable. (2) TracePoint.trace(...){...} creats a new trace point and enable it (same as old behavior). (3) TracePoint#enable make it enable (renamed from TracePoint#retrace). If block given, when enable only in block. (4) TracePoint#disable make it disable (renamed from TracePoint#untrace). If block given, when disable only in block. (5) TracePoint#enabled? returns this trace is enable or not. * test/ruby/test_settracefunc.rb: addd tests. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37753 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * vm_trace.c: add two methods:ko12012-11-2010-90/+183
| | | | | | | | | | | | | | | | | | | | | (1) TracePoint#return_value which returns return value on the :return and :c_return event. (2) TracePoint#raised_exception which returns raised exception value on the :raise event. Eeach methods raise RuntimeError if it is called at unsupported event. Please review and give us feedback until next preview release (Dec/2012) of Ruby 2.0.0. * insns.def, vm.c, vm_eval.c, vm_insnhelper.c, eval.c, thread.c: ditto. * vm_trace.c, vm_core.h: move definition of rb_trace_arg_t from vm_trace.c to vm_core.h. Caller fills rb_trace_arg_t and pass the pointer of this variable. * test/ruby/test_settracefunc.rb: fix tests to test this change. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37752 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Add extra line to prevent syntax errornaruse2012-11-201-0/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37751 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * configure.in: fix dtrace didn't work on darwin.naruse2012-11-202-32/+30
| | | | | | | * configure.in (RUBY_DTRACE_AVAILABLE): unify RUBY_DTRACE_POSTPROCESS and RUBY_DTRACE_BSD_BROKEN. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37750 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * file.c (File.extname): Documentation for extname on dotfiles andzzak2012-11-202-2/+15
| | | | | | | | files ending with a dot. Also, added example for this. [ruby-core:47852] [Bug #7112] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37749 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* fix typokosaki2012-11-201-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37748 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/ruby/test_signal.rb (TestSignal#test_signame): fix windowskosaki2012-11-202-3/+9
| | | | | | | | | test failure. Process.kill on windows can't send a signal to another process. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37747 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * io.c (Init_IO): removed all rb_file_const() into file.c.kosaki2012-11-203-56/+84
| | | | | | | | | | * file.c (Init_File): replace with rb_file_const() with rb_define_const() because RDoc don't care rb_file_const. [Bug #5530] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37746 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ruby.c (usage_msg): Fix typo [ruby-core:49205] [Bug #7327]zzak2012-11-202-1/+5
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37745 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * file.c (File::NULL): Document File::NULL constantzzak2012-11-202-0/+9
| | | | | | | [ruby-core:49384] [Bug #7365] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37744 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * win32/win32.c (rb_w32_read): Windows 8 fixed one of a bug of consoleusa2012-11-202-1/+7
| | | | | | | | API. based on the patch by Heesob Park at [ruby-core:49479] [Bug #7379] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37743 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * configure.in (--enable-dtrace): always call RUBY_DTRACE_BSD_BROKENnaruse2012-11-202-9/+20
| | | | | | | | | | | | | | | | for portability. As the note, FreeBSD 8 has DTrace as the optional feature (it is enabled by the build option), but doesn't have USDT. FreeBSD 9 has USDT but they are still optional. FreeBSD 10 will enable them by default. The variable $rb_cv_prog_dtrace_g is "yes" only on FreeBSD 9 with optional DTrace or FreeBSD 10. If it is "no", you cannnot know whether it doesn't need -G or DTrace is disabled. (by cheking error code, you can know) * configure.in (--enable-dtrace): change help message git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37742 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/tracer.rb (Tracer.trace_func): printf to stdoutzzak2012-11-202-1/+6
| | | | | | | Patch by Michal Fojtik [ruby-core:45219] [Bug #6490] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37741 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* revert r37730 kosaki2012-11-203-144/+138
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37740 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Revert "* configure.in (--enable-dtrace): change help message"naruse2012-11-202-9/+6
| | | | | | | | This reverts commit 029b59ba53d0cc42630d623b52d94cae0df62734. When $rb_cv_prog_dtrace_g is yes on FreeBSD even if /usr/bin/dtrace exists, it means dtrace is disabled on the system. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37739 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * 2012-11-20svn2012-11-201-2/+2
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37738 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Remove probes.o before updatenaruse2012-11-201-0/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37737 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Don't send INT signal itself.naruse2012-11-201-11/+13
| | | | | | On make test-all, it kills the process. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37736 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * configure.in (--enable-dtrace): change help messagengoto2012-11-192-6/+9
| | | | | | | | | * configure.in (--enable-dtrace): remove ineffective "else AS_CASE ..." because the variable $rb_cv_prog_dtrace_g is normally "yes" on FreeBSD and the AS_CASE is not evaluated on FreeBSD. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37735 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * vm_backtrace.c (vm_backtrace_to_ary): fix a typo of an variable name.nagachika2012-11-191-2/+2
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37734 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * vm_dump.c: not to include probes.h because the code does not dependngoto2012-11-193-2/+7
| | | | | | | | on it. * common.mk (vm_dump.$(OBJEXT)): remove dependency on probes.h git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37733 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * thread.c (rb_thread_s_check_interrupt): removed redundantkosaki2012-11-192-3/+8
| | | | | | | | GET_THREAD(). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37732 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * thread.c (rb_threadptr_async_errinfo_active_p): added a smallkosaki2012-11-192-3/+16
| | | | | | | | comment. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37731 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * thread.c, vm_core.h: big rename th to cur_th when works onlykosaki2012-11-193-138/+144
| | | | | | | | th is current thread. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37730 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * thread.c (rb_thread_blocking_region_end): replaced GET_THREAD()kosaki2012-11-192-1/+6
| | | | | | | | with ruby_thread_from_native(). We don't have GVL here. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37729 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * thread.c (rb_threadptr_execute_interrupts) removed.kosaki2012-11-192-12/+12
| | | | | | | | | | | * thread.c (rb_threadptr_execute_interrupts_common) renamed to rb_threadptr_execute_interrupts. I.e. unified rb_threadptr_execute_interrupts and rb_threadptr_execute_interrupts_common. * thread.c (rb_thread_schedule, rb_thread_execute_interrupts) s/_common//. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37728 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * signal.c (rb_get_next_signal): removed pointless signalkosaki2012-11-192-6/+8
| | | | | | | | | disabling. pthread_sigmask() only changes current thread mask. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37727 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * signal.c (install_sighandler): added comments why we needkosaki2012-11-192-0/+7
| | | | | | | | rb_disable_interrupt(). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37726 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * signal.c (rb_disable_interrupt, rb_enable_interrupt): removedkosaki2012-11-192-57/+33
| | | | | | | | | | | | USE_TRAP_MASK. * signal.c (trap_arg, trap_ensure): removed. * signal.c (trap, sig_trap): removed pointless signal disabling. We don't need it bacause we no longer run trap hander on signal hander context. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37725 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * prelude.rb: Moved Mutex#synchronize tokosaki2012-11-193-16/+23
| | | | | | | | * thread.c (rb_mutex_synchronize_m): here. [Bug #4266] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37724 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * signal.c (sig_signame): implements Signal.signame methodkosaki2012-11-194-0/+49
| | | | | | | | | | [Feature #5613] * test/ruby/test_signal.rb (test_signame): adds test for above * NEWS: add an item about above git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37723 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* struct.c: fix typonobu2012-11-191-1/+1
| | | | | | * struct.c (rb_struct_each_pair): fix typo. [Bug #7382] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37722 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* struct.c: yield assoc in each_pairnobu2012-11-193-1/+14
| | | | | | | | * struct.c (rb_struct_each_pair): yield associated pairs so that an unsplat argument can get both, for consistency with Hash, OpenStruct, and etc. [ruby-dev:46533] [Bug #7382] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37721 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* configure.in: no -lelfnobu2012-11-192-3/+7
| | | | | | * configure.in (LIBS): libelf is need on only FreeBSD. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37720 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* common.mk: no purelibnobu2012-11-194-1/+10
| | | | | | | | | * common.mk (RUBYLIB): purelib option in runruby.rb is deprecated since r28841, so set to an empty list to get rid of a bogus path in child processes, which caused an insecure operation exception in test/ruby/test_encoding.rb:test_unsafe. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37719 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * .travis.yml (script): add OPTS=-v, requested by @_ko1.shyouhei2012-11-192-1/+5
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37718 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * configure.in: fix didn't enable_dtrace=yes on auto.naruse2012-11-193-7/+16
| | | | | | | | * configure.in: see enable_dtrace for adding libelf on FreeBSD. * common.mk: VPATH is not needed. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37717 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * thread.c: add `Thread#backtrace_locations' method.ko12012-11-196-58/+124
| | | | | | | | | | | | | | | | | | | This method is similart to `caller_locations' method for specific method. And fix to accept `level' and `n' parameters for `Thread#backtrace' and `Thread#backtrace_locations'. `caller' (and `caller_locations') do not return `caller' method frame. However, `Thread#backtrace' (and `Thread#backtrace_locations') return `Thread#backtrace' method frame itself if `Thread.current.backtrace' was called. * vm_backtrace.c: ditto. * internal.h: ditto. * test/ruby/test_backtrace.rb: add tests. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37716 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * Makefile.in, common.mk (probes.h): moved to common.mk and changed tousa2012-11-194-4/+13
| | | | | | | | | | | see $(srcdir). * common.mk (probes.dmyh): now created it on $(srcdir) always. * win32/Makefile.sub (.SUFFIXES): removed common suffix. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37715 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * common.mk (vm_dump.o): depend probes.h.naruse2012-11-192-1/+3
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37714 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * Makefile.in (.SUFFIX): bsdmake needs .SUFFIX is defined before use.naruse2012-11-194-4/+18
| | | | | | | | * common.mk: fix path of probes.dmyh. * configure.in: FreeBSD's USDT requires libelf. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37713 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * 2012-11-19svn2012-11-181-2/+2
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37712 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * vm_core.h, probes_helper.h (RUBY_DTRACE_FUNC_ENTRY_HOOK,ngoto2012-11-186-32/+49
| | | | | | | | | | | RUBY_DTRACE_FUNC_RETURN_HOOK): move from vm_core.h to new file probes_helper.h for narrowing dependency to probes.h. * common.mk (VM_CORE_H_INCLUDES): remove dependency to probes.h. * common.mk (vm.$(OBJEXT)): add dependency to probes_helper.h. * vm.c, vm_insnhelper.c: include probes_helper.h. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37711 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * bignum.c (rb_cstr_to_inum): should accept underscores oftadf2012-11-183-2/+8
| | | | | | | sequence of two or more when unchecked mode. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37710 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * configure.in, Makefile.in, common.mk: support DTrace on Solaris 10,ngoto2012-11-184-21/+176
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | based on r26235 by Yugui. On Solaris 10, low optimization level may also be needed, e.g. optflags="-xO1" or "-xO0" with Oracle SolarisStudio 12.3 cc. * configure.in (--enable-dtrace): new option to enable/disable DTrace support. By default, trying to enable if dtrace command is found on the system. It is disabled when cross compiling. * configure.in (RUBY_DTRACE_POSTPROCESS): new macro. checks whether the dtrace on the system needs postprocessing with "dtrace -G". The postprocessing is needed on Solaris 10 and other platforms. * configure.in (RUBY_DTRACE_BSD_BROKEN): new macro. checks whether the dtrace supports USDT. * configure.in (DTRACE): move after RUBY_DTRACE_POSTPROCESS. * configure.in (LD): On Solaris, /usr/ccs/bin/ld is preferred. * configure.in, Makefile.in, common.mk (DTRACE_OBJ): new macro for DTrace probe object generated by postprocessing with "dtrace -G". * Makefile.in, common.mk (probes.$(OBJEXT)): DTrace probe object generated by the postprocessing. New file probes.stamp is for rebuilding related objects that may be modified by "dtrace -G". * configure.in, Makefile.in, common.mk (DTRACE_GLOMMED_OBJ): new macro for DTrace static library hacks. * configure.in, Makefile.in (LIBRUBY_A_OBJS): ditto. * Makefile.in, common.mk (ruby-glommed.$(OBJEXT)): new target with rule for DTrace static library hacks. * common.mk (DTRACE_DEPENDENT_OBJS): objects depended on probes.h. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37709 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * complex.c (read_comp): mathn compliant.tadf2012-11-183-11/+16
| | | | | | | * rational.c (read_num): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37708 b2dd03c8-39d4-4d8f-98ff-823fe69b080e