Граф коммитов

23348 Коммитов

Автор SHA1 Сообщение Дата
usa 19c78f9b9b * io.c (io_fflush): windows -- call fsync() only when the FD is tied to
file, because if the FD is pipe, it blocks.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31909 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-06-03 10:59:37 +00:00
svn 3862d95f0e * 2011-06-03
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31908 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-06-03 00:32:29 +00:00
naruse a83f125c31 * lib/net/http.rb (URI::HTTP#request_uri): return nil when the uri
is path-rootless form. Bug #4759

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31907 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-06-03 00:32:25 +00:00
jeg2 fe8002b17b * lib/csv.rb: Improve the line ending detection algorithm
(patch by Alexey).



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31906 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-06-02 14:52:11 +00:00
usa fd8010fc0a * io.c (rb_io_s_write, rb_io_s_binwrite): return!!!
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31905 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-06-02 11:06:40 +00:00
sorah 7b3948f055 * io.c: Add File.write, File.binwrite. [Feature #1081] [ruby-core:21701]
* test/ruby/test_io.rb: Test for File.write, File.binwrite.

* NEWS: News for above.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31902 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-06-02 07:30:11 +00:00
usa 2b0363df5d * io.c (io_flush, rb_io_flush): need to fsync() when ruby calls internal
flush. [ruby-core:36670] [Bug #4813]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31901 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-06-02 03:35:40 +00:00
nagai 358624d582 * ext/tk/tcltklib.c: reduce CPU power required by an eventloop.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31900 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-06-01 22:57:35 +00:00
ryan 9b3e7967ab Imported minitest 2.2.2 (r6281)
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31899 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-06-01 22:34:09 +00:00
ryan 172af01255 Clarified String#tr rdoc. (RickHull)
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31898 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-06-01 22:29:09 +00:00
ryan ffe4aff8b3 More clarification for enumerator_feed
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31897 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-06-01 21:16:05 +00:00
akr 3e95b6386a * test/ruby/test_signal.rb (TestSignal#test_signal_requiring):
redirect stderr to null device.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31896 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-06-01 16:32:15 +00:00
svn e93a9cfae7 * 2011-06-02
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31895 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-06-01 15:46:35 +00:00
nagai eeccb5935b * ext/tk/extconf.rb: fix for uninitialized global variables. [Ruby 1.9 - Bug #4811]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31894 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-06-01 15:46:31 +00:00
kosaki 859da83455 * thread_pthread.c (native_sleep): fix 1000times calculation error.
this is a regression since r31457. [Bug #4808] [ruby-dev:43606]



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31893 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-06-01 13:03:25 +00:00
kosaki dcc1f64cb0 * thread_pthread.c: remove unused macro.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31892 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-06-01 08:20:16 +00:00
nobu 402cbc870d * parse.y (peek_n): new macro to see next nth char.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31891 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-06-01 06:42:23 +00:00
nobu d441e3b959 * test/ruby/test_syntax.rb (TestSyntax#test_syntax): show script name
in assertion message.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31890 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-06-01 06:41:33 +00:00
nobu 19a8b5cbdc * tool/rbinstall.rb (gem): fix for rubygems change.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31889 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-06-01 06:40:55 +00:00
kazu f964813967 fix typos
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31888 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-06-01 05:57:05 +00:00
ryan e4b16eff50 MOSTLY Imported minitest 2.2.1 (r6277)
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31887 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-06-01 05:12:55 +00:00
nobu b204eabf05 * lib/rubygems, test/rubygems: properties.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31886 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-06-01 04:05:03 +00:00
ryan d22130922e Import rubygems 1.8.5 (released @ 137c80f)
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31885 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-06-01 03:45:05 +00:00
mrkn 4752539e3f * NEWS: add new features of bigdecimal.
* ChangeLog: 2011-06-01 is Wednesday.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31884 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-06-01 03:37:02 +00:00
ryan 38de163f1e doco: p outputs newline regardless of record separator
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31883 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-06-01 00:48:09 +00:00
drbrain b8f3f2d62e * lib/cgi/util.rb: Improve documentation. Patch by Kuba Fietkiewicz.
[Ruby 1.9 - Bug #4775]
	* lib/cgi/core.rb:  ditto


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31882 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-06-01 00:42:06 +00:00
drbrain 5dcb4fc18b * lib/mathn.rb: Improve documentation and attach it to Numeric.
Modified from patch by Anil V.  [Ruby 1.9 - Bug #4762]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31881 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-06-01 00:26:27 +00:00
drbrain b6dd727b86 * lib/prime.rb: Indent examples enough to appear as code sections.
Note that Prime is Enumerable.  [#4762]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31880 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-06-01 00:21:46 +00:00
ryan f4273e88a8 Extra formatting and clarification of enumerator_feed [#4757]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31879 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-05-31 23:19:50 +00:00
drbrain f6809f61d6 * hash.c (key_i): Change rdoc from "the first occurence" to "an
occurrence" since first occurrence is not a specification of
	  Hash#key.  [Ruby 1.9 - Bug #4760]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31878 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-05-31 22:35:59 +00:00
drbrain 161cdee265 * ext/pty/pty.c (pty_check): Restore "not reached" comment.
[Ruby 1.9 - Bug #4756]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31877 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-05-31 22:27:35 +00:00
drbrain 290c4db6e6 * ext/zlib/zlib.c: Fix document-method declarations for set_sync and
set_comment.  [Ruby 1.9 - Bug #4695]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31876 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-05-31 22:25:32 +00:00
tarui 9ce69e7cef * load.c (loaded_feature_path): cut nonsence loop execution to fix
performance bug.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31875 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-05-31 21:56:01 +00:00
nobu 867fa454d8 * ChangeLog: adjust indent.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31874 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-05-31 16:23:00 +00:00
nobu 604fe33b44 * class.c (rb_mix_module): implement Module#mix.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31873 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-05-31 16:16:06 +00:00
nobu fcc86b0f4c * io.c (io_encoding_set): should honor already set ecflags since it
might be set by mode option.  fixed #4804

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31872 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-05-31 16:15:15 +00:00
nagachika 10c0604a34 * ext/bigdecimal/bigdecimal.c (GetVpValueWithPrec): remove unused
variable.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31871 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-05-31 15:36:55 +00:00
mrkn 678b6820f7 * ext/bigdecimal/bigdecimal.c (GetVpValueWithPrec): support instantiation from
a Float through Rational.
* ext/bigdecimal/bigdecimal.c (BigDecimal_new): ditto.
* test/bigdecimal/test_bigdecimal.rb (test_global_new_float): add a test for
  the above changes.
* test/bigdecimal/test_bigdecimal.rb (test_new_with_float): ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31870 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-05-31 15:33:42 +00:00
nagachika 8f9ff461cf * ChangeLog: fix typos
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31869 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-05-31 15:13:02 +00:00
mrkn d7058e10dc * ext/bigdecimal/bigdecimal.c (BigDecimal_coerce): support coerce with a
Rational.  The precision used for instantiate a BigDecimal from the
  given Rational is obtained from the receiver BigDecimal.
* test/bigdecimal/test_bigdecimal.rb (test_coerce): add a test for the
  above change.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31868 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-05-31 15:09:38 +00:00
svn 8b70931028 * 2011-06-01
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31867 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-05-31 15:05:13 +00:00
nobu a010ea9a45 no space inside parens
* io.c: remove spaces before closing parens.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31866 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-05-31 15:05:09 +00:00
tadf 6a158e05c8 * ext/date/date_core.c (offset_to_sec): fixed invalid validation.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31865 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-05-31 14:53:52 +00:00
mrkn 100931ac2c * ext/bigdecimal/bigdecimal.c (GetVpValueWithPrec): replace the algorithm for
coercing from a Rational to stop requiring "bigecimal/util.rb".
  [ruby-core:34318]
* ext/bigdecimal/bigdecimal.c (GetVpValue): refactoring.
* ext/bigdecimal/bigdecimal.c (BigDecimal_new): support instantiation from a
  Rational.
* test/bigdecimal/test_bigdecimal.rb (test_global_new_with_rationao): add a
  test for the above change.
* test/bigdecimal/test_bigdecimal.rb (test_new_with_rationao): ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31864 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-05-31 14:43:39 +00:00
mrkn b54141bb1b * ext/bigdecimal/bigdecimal.c (BigDecimal_new): support instantiation a
BigDecimal object from an Integer.
* test/bigdecimal/test_bigdecimal.rb (test_new_with_integer):
  add for testing the above change.
* ext/bigdecimal/bigdecimal.c (BigDecimal_global_new): replace its body
  with a BigDecimal_new call.
* test/bigdecimal/test_bigdecimal.rb (test_global_new_with_integer):
  add for testing the above change.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31863 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-05-31 13:45:31 +00:00
tadf 899d2c14b0 * ext/date/date_core.c: use simple/complex mode instead of light/right mode.
* test/date/*.rb: followed the above changes.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31862 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-05-31 13:28:48 +00:00
akr 3b3cf8753d * test/ruby/test_signal.rb (TestSignal#test_signal_requiring):
initialize SIGINT handler.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31861 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-05-31 12:29:26 +00:00
nahi b219a56c07 * lib/net/http.rb, lib/net/protocol.rb: Allow to configure to wait
server returning '100 continue' response befor sending HTTP request
  body. See NEWS for more detail. See #3622.
  Original patch is made by Eric Hodel <drbrain@segment7.net>.

* test/net/http/test_http.rb: test it.

* NEWS: Add new feature.

On my env (Ubuntu 11.04 64bit),
9510 tests, 2203824 assertions, 0 failures, 0 errors, 29 skips
->
9514 tests, 2203836 assertions, 0 failures, 0 errors, 29 skips


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31860 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-05-31 08:10:42 +00:00
usa da1db8b454 * io.c (rb_io_s_pipe): potential bug. the mode of read IO is set as
DEFAULT_TEXTMODE in call of io_set_encoding(), and of write IO is
  also set as it in call of io_new_instance() via rb_protect().
  so, if DEFAULT_TEXTMODE is not 0, we should check the result of
  extract_binmode() and avoid crush of default IO mode and the result.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31859 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-05-31 05:21:36 +00:00
yugui 8fa30bbd48 * strftime.c (rb_strftime_with_timespec): improved style consistency.
constified some variables.

* test/test_time.rb (TestTime#test_huge_precision): test for #4456.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31858 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-05-31 03:59:36 +00:00