aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* * lib/open-uri.rb: Fix indentation of OpenURI::OpenRead#open. Use ++drbrain2011-08-262-27/+40
| | | | | | | instead of `' for method arguments in open-uri.rb git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33087 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/pathname/lib/pathname.rb: Fix typos and grammar mistakes. Patchdrbrain2011-08-2611-58/+71
| | | | | | | | | | | | | | | | by Luke Gruber. [#5203] * ext/pty/lib/expect.rb: ditto * lib/mathn.rb: ditto * lib/net/http.rb: ditto * lib/open-uri.rb: ditto * lib/ostruct.rb: ditto * lib/tempfile.rb: ditto * lib/thread.rb: ditto * lib/weakref.rb: ditto * sample/webrick/httpproxy.rb: ditto git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33086 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* ugh. sorryryan2011-08-261-0/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33083 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Added gem activation for minitest/autoload to help users keep currentryan2011-08-261-0/+6
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33082 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * iseq.c (iseq_data_to_ary): fix type of variableko12011-08-262-1/+7
| | | | | | | | (long -> unsigned long) to suppress a warning. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33081 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * 2011-08-27svn2011-08-261-2/+2
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33080 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * vm_core.h: add a decl. of rb_autoloading_value().ko12011-08-262-0/+6
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33079 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * variable.c: Make autoload thread-safe. See #921.nahi2011-08-264-32/+331
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | What's the problem? autoload is thread unsafe. When we define a constant to be autoloaded, we expect the constant construction is invariant. But current autoload implementation allows other threads to access the constant while the first thread is loading a file. What's happening inside? The current implementation uses Qundef as a marker of autoload in Constant table. Once the first thread find Qundef as a value at constant lookup, it starts loading a defined feature. Generally a loaded file overrides the Qundef in Constant table by module/class declaration at very beginning lines of the file, so other threads can see the new Module/Class object before feature loading is finished. It breaks invariant construction. How to solve? To ensure invariant constant construction, we need to override Qundef with defined Object after the feature loading. For keeping Qundef in Constant table, I expanded autoload_data struct in Module to have a slot for keeping the defined object while feature loading. And changed Module's constant lookup/update logic a little so that the slot is only visible from the thread which invokes feature loading. (== the first thread which accessed the autoload constant) Evaluation? All test passes (bootstrap test, test-all and RubySpec) and added 8 tests for threading behavior. Extra logics are executed only when Qundef is found, so no perf drop should happen except autoloading. * variable.c (rb_autoload): Prepare new autoload_data struct. * variable.c (rb_autoload_load): Load feature and update Constant table after feature loading is finished. * variable.c (rb_const_get_0): When the fetched constant is under autoloading, it returns the object only for the thread which starts autoloading. * variable.c (rb_const_defined_0): Ditto. * variable.c (rb_const_set): When the specified constant is under autoloading, it sets the object only for the thread which starts autoloading. Otherwise, simply overrides Qundef with constant override warning. * vm_insnhelper.c (vm_get_ev_const): Apply same change as rb_const_get_0 in variable.c. * test/ruby/test_autoload.rb: Added tests for threading behavior. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33078 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/rubygems: Update to RubyGems 1.8.10. Fixes security issue indrbrain2011-08-2612-76/+205
| | | | | | | | | creating ruby-format gemspecs. Fixes Gem.dir not being at the front of Gem.path to fix uninstall and cleanup commands. Fixes gem uninstall stopping on the first missing gem. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33074 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * time.c (strftimev): Make Time#to_s default to US-ASCII encoding buttenderlove2011-08-254-0/+29
| | | | | | | respect Encoding.default_internal. [ruby-core:39092] * test/ruby/test_time.rb (class TestTime): Corresponding test. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33073 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * README*: remove trailing spaces.kazu2011-08-254-42/+42
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33072 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * 2011-08-26svn2011-08-251-2/+2
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33071 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* update doc.akr2011-08-251-1/+12
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33070 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* properties.nobu2011-08-250-0/+0
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33069 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/openssl/lib/openssl/bn.rb: Hide copyright info from RDoc.drbrain2011-08-255-60/+83
| | | | | | | | | * ext/openssl/lib/openssl/digest.rb: ditto * ext/openssl/lib/openssl/x509.rb: ditto * ext/openssl/lib/openssl/cipher.rb: ditto git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33066 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/openssl/ossl_digest.c: Document OpenSSL::Digest::digest and adddrbrain2011-08-253-0/+29
| | | | | | | | | an example to OpenSSL::Digest. Patch by Sylvain Daubert. [Ruby 1.9 - Bug #5166] * ext/openssl/lib/openssl/digest.rb (module OpenSSL): ditto git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33065 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * vm.c (vm_make_env_each): work around to solve Bug #2729.ko12011-08-243-0/+44
| | | | | | | | | | | | | | | | fixes: Bug #2729 a patch from Kazuki Tsujimoto <kazuki@callcc.net> This problem is caused by changing dfp (dynamic env pointer) from saved dfp. Saved dfp is pointed env in VM stack. However, the dfp can be moved because VM copies env from VM stack to the heap. At this copying, dfp was also changed. To solve this problem, I'll try to change throw mechanism (not save target dfp, but save target cfp). * bootstraptest/test_flow.rb: add a test for above. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33064 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * numeric.c (int_round): Fix Integer#round [ruby-core:39096]marcandre2011-08-242-1/+7
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33061 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * numeric.c: Rdoc fixmarcandre2011-08-241-3/+2
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33060 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * vm_insnhelper.h, vm_insnhelper.c, vm.c, vm_method.c, insns.def:ko12011-08-246-51/+84
| | | | | | | | | Manage a redefinition of special methods for each classes. A patch from Joel Gouly <joel.gouly@gmail.com>. Thanks! git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33059 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/psych/lib/psych.rb: Fixing psych version number.tenderlove2011-08-243-95/+17
| | | | | | * ext/psych/psych.gemspec: updating the gemspec. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33057 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/psych/lib/psych/nodes/node.rb: default `to_yaml` encoding to betenderlove2011-08-243-1/+23
| | | | | | | UTF-8. * test/psych/test_encoding.rb: test yaml dump encoding. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33052 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/fileutils/test_fileutils.rb (test_chmod_symbol_mode): Solarisngoto2011-08-242-2/+7
| | | | | | | seems to behave the same as FreeBSD. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33051 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * 2011-08-25svn2011-08-241-2/+2
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33050 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/ruby/test_rubyoptions.rb (test_script_from_stdin): slave ptyngoto2011-08-242-2/+8
| | | | | | | | should be manipulated because master pty may not be a tty on some environment (e.g. Solaris). [Bug:#5222] [ruby-dev:44420] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33049 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Add a missing parenthesis in the example.naruse2011-08-241-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33047 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * iseq.h, iseq.c, compile.c: Change the line number data structureko12011-08-249-84/+110
| | | | | | | | | | | | | | | | | | | | | | | to solve an issue reported at [ruby-dev:44413] [Ruby 1.9 - Bug #5217]. Before this fix, each instruction has an information including line number (iseq::iseq_insn_info_table). Instead of this data structure, recording only line number changing places (iseq::iseq_line_info_table). The order of entries in iseq_line_info_table is ascending order of iseq_line_info_table_entry::position. You can get a line number by an iseq and a program counter with this data structure. This fix reduces memory consumption of iseq (bytecode). On my measurement, a rails application consumes 21.8MB for iseq with this fix on the 32bit CPU. Without this fix, it consumes 24.7MB for iseq [ruby-dev:44415]. * proc.c: ditto. * vm_insnhelper.c: ditto. * vm_method.c: ditto. * vm.c (rb_vm_get_sourceline): change to use rb_iseq_line_no(). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33046 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * insns.def (defined): fix to checking class variable.ko12011-08-243-1/+16
| | | | | | | | | A patch by Magnus Holm <judofyr@gmail.com>. Thanks! * test/ruby/test_variable.rb: add a test for above. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33045 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/rdoc: Update to RDoc 3.9.3. Fixes RDoc with `ruby -Ku`. Allowsdrbrain2011-08-2311-4/+97
| | | | | | | | HTTPS image paths to be turned into <img> tags. Prevents special markup inside <tt> from being processed. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33043 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/rubygems: Update to RubyGems 1.8.9. Fixes uninstalling multipledrbrain2011-08-234-2/+42
| | | | | | | gems and gem cleanup. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33040 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* fixed tests broken by new minitest mixinryan2011-08-231-4/+8
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33039 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Imported minitest 2.5.0 (r6557)ryan2011-08-239-187/+1024
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33036 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * 2011-08-24svn2011-08-231-2/+2
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33031 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * thread.c (update_coverage): skip coverage count up if the currentmame2011-08-233-3/+32
| | | | | | | | | line is out of the way. rb_sourceline() is unreliable when source code is big. [ruby-dev:44413] * test/coverage/test_coverage.rb: add a test for above. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33030 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * load.c (rb_f_require): Improve documentation of Kernel#require.drbrain2011-08-232-16/+30
| | | | | | | [Ruby 1.9 - Bug #5210] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33027 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * 2011-08-23svn2011-08-231-2/+2
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33024 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/zlib/zlib.c (gzfile_read_header): Ensure that each section ofnahi2011-08-233-0/+27
| | | | | | | | | gzip header is readable to avoid SEGV. * test/zlib/test_zlib.rb (test_corrupted_header): Test it. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33023 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * 2011-08-22svn2011-08-221-2/+2
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33022 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * sprintf.c (rb_str_format): add RB_GC_GUARD to prevent temporarynagachika2011-08-222-2/+11
| | | | | | strings from GC. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33021 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * iseq.c (iseq_s_disasm): remove variable which is no longer usedktsj2011-08-212-1/+5
| | | | | | since r33013. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33019 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * 2011-08-21svn2011-08-211-2/+2
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33018 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * configure.in: use LD_LIBRARY_PATH_64 on 64-bit Solaris.ngoto2011-08-212-0/+7
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33017 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * iseq.c (iseq_s_disasm): fix a bug that may cause SEGV.ktsj2011-08-203-3/+10
| | | | | | * test/ruby/test_method.rb (test_body): add a test for the above change. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33013 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * 2011-08-20svn2011-08-201-2/+2
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33012 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/stringio/stringio.c (strio_read): return new string if nilnobu2011-08-203-10/+26
| | | | | | | | is explicitly given as a buffer ([Bug #5207]), otherwise set the encoding. also removed dead code. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33010 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * process.c (proc_spawn_v, proc_spawn): should not wait thenobu2011-08-193-10/+31
| | | | | | | | | spawned process. * process.c (proc_spawn_v): fix missing argument, and try with /bin/sh only if failed with ENOEXEC. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33009 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/net/imap.rb (idle): raises a Net::IMAP::Error when theshugo2011-08-193-3/+74
| | | | | | | connection is closed. based on the patch by Hugo Barauna. [Bug #5190] [ruby-core:38930] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33007 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * configure.in: defines _DARWIN_UNLIMITED_SELECT if the target_osmrkn2011-08-192-1/+6
| | | | | | is darwin. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33006 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * thread.c: add a description for the behavior of select(2) onmrkn2011-08-192-0/+9
| | | | | | Mac OS X 10.7 (Lion). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33005 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * 2011-08-19svn2011-08-191-2/+2
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33002 b2dd03c8-39d4-4d8f-98ff-823fe69b080e