aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* * math.c: Attach documentation for Math.drbrain2011-06-2914-14/+144
| | | | | | | | | | | | | | | | | | | | * object.c: Document NIL, TRUE, FALSE. * io.c: Improve grammar in ARGF comment. Document STDIN/OUT/ERR. Document ARGF global constant. * lib/rake: Hide deprecated toplevel constants from RDoc (import from rake trunk). * lib/thwait.rb: Document ThWait. * lib/mathn.rb: Hide Math redefinition from RDoc * lib/sync.rb: Add a basic comment for Sync_m, Synchronizer_m, Sync, Synchronizer. * parse.y: Document SCRIPT_LINES__. * hash.c: Document ENV class and global constant. * vm.c: Document TOPLEVEL_BINDING. * version.c: Document RUBY_* constants. * ruby.c: Document DATA and ARGV. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32281 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/matrix.rb: Matrix.zero can build rectangular matrices.marcandre2011-06-293-4/+13
| | | | | | Vector#r should be called #magnitude git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32280 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/matrix.rb: Add Matrix#diagonal?, hermitian?, normal?, orthogonal?marcandre2011-06-293-0/+155
| | | | | | permutation?, symmetric?, {lower|upper}triangular?, unitary?, zero? git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32279 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/matrix.rb: Specialize Matrix#find_index to return [row, col]marcandre2011-06-293-0/+38
| | | | | | and accept the same optional argument as #each git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32278 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/matrix.rb: Matrix#each{_with_index} can iterate over a subset of the ↵marcandre2011-06-293-19/+119
| | | | | | Matrix git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32277 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * thread_pthread.c (native_stop_timer_thread): skip to closeko12011-06-282-3/+12
| | | | | | | | | communication pipe to avoid timing bug (process termination timing). The communication pipe will closed by OS. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32276 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * 2011-06-29svn2011-06-281-2/+2
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32275 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * error.c (rb_async_bug_errno): async-safe bug report function.ko12011-06-284-13/+64
| | | | | | | | | | | | | In timer thread, signal handler shoul use it. The patch is contributed by Eric Wong <normalperson@yhbt.net>. Refs: [ruby-core:37644] and [ruby-core:37647] * thread_pthread.c: use rb_async_bug_errno(). And replace all fprintf() to write(). * internal.h (rb_async_bug_errno): add decl. of above func. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32274 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/tracer.rb: count only non-internal libraries in stack trace,keiju2011-06-282-1/+6
| | | | | | | | ignoring custom_require. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32273 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/irb/ruby-lex.rb: recognize '\char' in ruby statement.keiju2011-06-282-1/+5
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32272 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/debug.rb (var_list): Command 'var *' did not work on 1.9(!).nahi2011-06-282-1/+8
| | | | | | | | | global_variables, local_variables, and instance_variables returns Symbols from 1.9 and need to stringify before evaling it. See #4931. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32271 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * signal.c: Now, USE_TRAP_SIGMASK depend on HAVE_PTHREAD_SIGMASK.kosaki2011-06-283-21/+7
| | | | | | | | The code have already depended on pthread_sigmask since r27464. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32270 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/benchmark.rb: merge eregon/benchmark.naruse2011-06-283-45/+75
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | https://github.com/eregon/ruby/tree/benchmark patched by Benoit Daloze. [ruby-core:37593] [Bug #4940] * lib/benchmark (Benchmark#bmbm): bmbm should be consistent with bm for the return value. * test/benchmark: remove preemptive test instead of skipping I removed the preemptive test I wrote for Feature #4197. I'll add it back when the implementation will be able to satisfy it. * lib/benchmark (Benchmark#bmbm): remove useless explicit call, #format is an alias of #to_s test/benchmark: add a test for format of long time. * lib/benchmark: fix label width: always add 1 to ensure there is a space delimiter even with times over 100s When I asked for Feature #4197, I wanted to make delimiting spaces consistent for #bm and #bmbm. But with times over 100s, the output contains no space between the label and the first time (user). Now both ensure there is always a space, even if that means 3 spaces with times under 10s (because it is formatted as %10.6f) * test/benchmark: let labels be a constant lib/benchmark (Benchmark#realtime): avoid creating an unused Proc lib/benchmark (Benchmark#benchmark): use ensure clause to restore STDOUT.sync, as in #bmbm git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32269 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * thread_win32.c (native_stop_timer_thread): fixed commit miss ofusa2011-06-282-1/+6
| | | | | | | r32244. grep sources before changing the signature of a function. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32268 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* add a detail comment.ko12011-06-281-0/+2
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32267 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * thread_pthread.c (consume_communication_pipe):ko12011-06-282-7/+13
| | | | | | | | | | | Make "buff" as static. (Maybe) "buff" can be shared between any caller (any threads) because no one use the read values. And remove const value "buff_size", and define CCP_READ_BUFF_SIZE macro. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32266 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/rake: Update rake to fix some bugs and hide deprecated featuresdrbrain2011-06-2819-78/+164
| | | | | | | | | | from RDoc. * lib/rake/version.rb: Bump version to 0.9.2.1 to distinguish it from the released version. * NEWS: ditto git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32265 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/rdoc: Update to RDoc 3.7 (final)drbrain2011-06-2810-111/+201
| | | | | | | * NEWS: ditto git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32264 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * process.c (rb_daemon): fix wrong #endif position.naruse2011-06-282-1/+5
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32263 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * dir.c: Make RDoc more precise about order of Dir.globmarcandre2011-06-271-1/+2
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32262 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * object.c (Init_Object): Teach RDoc what Init_class_hierarchy does todrbrain2011-06-272-13/+27
| | | | | | | hook up ri for BasicObject, Object, Module and Class. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32261 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * thread.c (rb_thread_local_aref): RDoc fix. Thread#[] example nahi2011-06-272-8/+16
| | | | | | | had a race. See #4480. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32260 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Temporary hack for SIGILL of miniruby on FreeBSD.naruse2011-06-271-0/+4
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32259 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/bigdecimal/bigdecimal.c (BigMath_s_log): move BigMath.log frommrkn2011-06-275-44/+288
| | | | | | | | | | bigdecimal/math.rb. * ext/bigdecimal/lib/bigdecimal/math.rb: ditto. * test/bigdecimal/test_bigdecimal.rb: move test for BigMath.log from test/bigdecimal/test_bigmath.rb. * test/bigdecimal/test_bigmath.rb: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32258 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/irb/ruby-lex.rb: fix [Bug #4232].keiju2011-06-272-1/+5
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32257 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * NEWS: rand and Random.rand now support range argument [ruby-dev:43427] #4605marcandre2011-06-271-0/+6
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32256 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * random.c: Documentation fix for Random#bytesmarcandre2011-06-271-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32255 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* fix [Bug #4409]. add DRbServer#here?seki2011-06-275-2/+68
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32254 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * 2011-06-28svn2011-06-271-2/+2
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32253 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/irb/workspace.rb: fix BUG#4793.keiju2011-06-272-1/+5
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32252 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * thread_pthread.c (consume_communication_pipe): don't use C99kosaki2011-06-272-1/+6
| | | | | | | | style variable length array. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32251 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * thread_pthread.c (consume_communication_pipe): change returnkosaki2011-06-272-3/+7
| | | | | | | | type to void. caller doesn't use it. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32250 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * thread_pthread.h (rb_global_vm_lock_struct): add volatile tokosaki2011-06-272-1/+6
| | | | | | | | gvl->waiting. now thread_timer() access it w/o lock. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32249 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * thread_pthread.c: s/__gvl_acquire/gvl_acquire_common/ andkosaki2011-06-272-6/+11
| | | | | | | | s/__gvl_release/gvl_release_common/. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32248 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Addtitional fix for previous commit.naruse2011-06-271-3/+2
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32247 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * thread_pthread.c (rb_thread_create_timer_thread):naruse2011-06-272-3/+8
| | | | | | the type of retrun value of write(2) is ssize_t. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32246 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * thread_pthread.c (rb_thread_create_timer_thread):ko12011-06-272-0/+6
| | | | | | | | Fixes missing initialization of oflags. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32245 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * thread_pthread.c: Stop polling in the timer thread when there areko12011-06-278-45/+222
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | no waiting thread. If there are 2 or more runnable threads, the timer thread does polling. Avoid polling makes power save for several computers (0.2W per a Ruby process, when I measured). If outside-event such as signal or Thread#kill was occuerred when the timer thread does not do polling, then wake-up the timer thread using communication-pipe (the timer thread waits this communication-pipe with select(2)). The discussion about this modification can be found from the post [ruby-core:33456] and other related posts. Note that Eric Wong and KOSAKI Motohiro give us the huge contributions for this modification. Thanks. * thread_pthread.c (rb_thread_wakeup_timer_thread): add a function. This function wakes up the timer thread using communication-pipe. * thread.c (rb_thread_stop_timer_thread): add a parameter which specify closing communication-pipe or not. * thread.c (rb_thread_terminate_all): do not stop timer thread here (ruby_cleanup() terminate timer thread). * signal.c: wake up timer thread using rb_thread_wakeup_timer_thread() from signal handler. * eval.c (ruby_cleanup): use rb_thread_stop_timer_thread(1). * process.c: use rb_thread_stop_timer_thread(0) (reuse communication-pipe). * thread_win32.c (rb_thread_wakeup_timer_thread): add a dummy function. * vm_core.h: add and fix decl. of functions. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32244 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/date/date_parse.c: should use ALLOCA_N.tadf2011-06-262-7/+11
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32243 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/etc/test_etc.rb (TestEtc#test_get{pw,gr}nam): skip entriesnobu2011-06-262-2/+11
| | | | | | | | start with + sign, which means NIS. these are returned in the case that passwd and group entries in /etc/nsswitch.conf are set to use "nis" explicitly on Debian. fixed #3683 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32242 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Add news about r30188 (Net::HTTPRequest#set_form).naruse2011-06-261-0/+4
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32241 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * 2011-06-27svn2011-06-261-2/+2
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32240 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * parse.y (rb_parser_end_seen_p): fix documentation about returnnaruse2011-06-262-2/+6
| | | | | | value. patched by Sho Hashimoto. [Bug #4511] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32239 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * hash.c (rb_hash_reject): add documentation that Hash#rejectnaruse2011-06-262-0/+7
| | | | | | | without block returns enumerator. patched by Michael Edgar [Bug #4847] [ruby-core:36800] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32238 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/date/test_switch_hitter.rb: added a test.tadf2011-06-262-0/+38
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32237 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/date/date_core.c: refactoring.tadf2011-06-262-34/+99
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32236 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * parse.y: comma at the end of line is no longer allowed.shyouhei2011-06-262-4/+18
| | | | | | | | A patch from Yukihiro Matsumoto <matz AT ruby-lang.org>. (fixed #3456). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32235 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * vm_dump.c (rb_vm_bugreport): change CrashReporter suggestion messageskosaki2011-06-262-6/+22
| | | | | | | | | | | | | | | | | | | | on Mac. It should be placed after "-- C level backtrace" line. Suggested by Endoh-san. <before> -- See Crash Report log file under ~/Library/Logs/CrashReporter or --------- -- /Library/Logs/CrashReporter, for the more detail of --------------------- -- C level backtrace information ------------------------------------------- <after> -- C level backtrace information ------------------------------------------- See Crash Report log file under ~/Library/Logs/CrashReporter or /Library/Logs/CrashReporter, for the more detail of. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32231 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/openssl/extconf.rbemboss2011-06-265-10/+51
| | | | | | | | | | | | | * ext/openssl/ossl_missing.h/.c: add ASN1_put_eoc if missing. * ext/openssl/ossl_asn1.c: introduce ossl_asn1_object_size and ossl_asn1_put_object to wrap functionality depending on OpenSSL version in use. Fixes [ Ruby 1.9 - Bug #4916 ] reported by Hiroshi Nakamura. [ruby-core:37286] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32230 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/date/date_core.c (date_strftime_internal): removed meaningless braces.tadf2011-06-252-43/+46
| | | | | | | * ext/date/date_core.c (gengo): the value should be int. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32229 b2dd03c8-39d4-4d8f-98ff-823fe69b080e