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

13673 Коммитов

Автор SHA1 Сообщение Дата
naruse f30670001b * test/cgi/test_cgi_header.rb: add test for CGI::Header.
Patch by Takeyuki Fujioka. [ruby-dev:36010] [ruby-dev:36011]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18888 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-08-28 00:19:26 +00:00
naruse 5d93e40866 * test/cgi/test_cgi_header.rb: add test for CGI::Header.
Patch by Takeyuki Fujioka. [ruby-dev:36010] [ruby-dev:36011]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18887 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-08-28 00:18:24 +00:00
nobu e2db51b2cd properties.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18886 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-08-27 23:09:26 +00:00
akr a08b97c2f6 * include/ruby/io.h (rb_io_t): refcnt field removed.
(MakeOpenFile): refcnt initialization removed.

* io.c (rb_io_fptr_finalize): don't check refcnt.
  (rb_io_close_read): don't use refcnt.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18885 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-08-27 17:19:19 +00:00
svn c28edc5012 * 2008-08-28
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18884 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-08-27 15:09:52 +00:00
akr d05d66e2ac * io.c (rb_io_initialize): don't accept IO object. [ruby-dev:35895]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18883 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-08-27 15:09:47 +00:00
suke f6f85ad683 * ext/win32ole/win32ole.c (ole_invoke): WIN32OLE#[] and WIN32OLE#[]=
accepts number argument.

* test/win32ole/test_win32ole.rb: ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18882 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-08-27 14:43:23 +00:00
akr ad3c6c712b add a test.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18881 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-08-27 13:39:25 +00:00
naruse 4c88439a94 * test/cgi/test_cgi_core.rb: add core test.
Patch by Takeyuki Fujioka. [ruby-dev:36001] [ruby-dev:36002]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18880 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-08-27 05:49:28 +00:00
naruse 382b4af605 revert removed comment.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18879 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-08-27 05:02:32 +00:00
naruse b64fd4625d * lib/cgi.rb (CGI::Cookie): remove delagate.
Patch by Takeyuki Fujioka. [ruby-dev:35995]

* test/cgi/test_cgi_cookie.rb: added for above.
  Patch by Takeyuki Fujioka. [ruby-dev:35996]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18878 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-08-27 01:40:46 +00:00
naruse 19b25eb670 * lib/cgi.rb (CGI::Cookie): remove delagate.
* test/cgi/test_cgi_cookie.rb: added for above.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18877 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-08-27 01:38:23 +00:00
akr 1366802a1f * transcode.c (transcode_loop): simplified.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18876 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-08-26 16:14:49 +00:00
akr db6ec3105e * include/ruby/encoding.h (rb_econv_result_t): enumeration constant:
econv_incomplete_input. 

* io.c (finish_writeconv): check econv_incomplete_input.

* transcode.c (transcode_restartable0): return econv_incomplete_input
  for unexpected end of source buffer.
  (trans_sweep): check econv_incomplete_input.
  (rb_trans_conv): ditto.
  (rb_econv_convert0): ditto.
  (rb_econv_convert): ditto.
  (transcode_loop): ditto.
  (make_econv_exception): change message for econv_incomplete_input.
  (econv_result_to_symbol): return :incomplete_input for
  econv_incomplete_input.
  (ecerr_incomplete_input): new method.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18875 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-08-26 16:09:29 +00:00
akr 99a26ac164 * include/ruby/io.h (rb_io_t): rename crbuf to cbuf.
* io.c: follow the renaming.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18874 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-08-26 15:06:28 +00:00
svn c8dbd99790 * 2008-08-27
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18873 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-08-26 15:01:15 +00:00
akr a68e409eaa * include/ruby/encoding.h (rb_econv_elem_t): move to transcode.c
(rb_econv_t): defined as an incomplete type.

* transcode.c (rb_econv_elem_t): moved from encoding.h.
  (rb_econv_t): complete type defined.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18872 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-08-26 15:01:11 +00:00
usa 8039100c0a * time.c (time_asctime): workaround for MSVCRT's bug.
based on a patch from wanabe <s.wanabe AT gmail.com> at
	  [ruby-dev:35831] and a suggestion by KIMURA Koichi
	  <kbk AT kt.rim.or.jp> at [ruby-dev:35832]
	  fixed [ruby-dev:35555]



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18871 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-08-26 13:47:17 +00:00
akr 19ab08653e * transcode.c (rb_econv_open): disable newline conversion for ASCII
incompatible encodings.
  (str_transcode0): don't need disable newline conversion here.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18870 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-08-26 12:55:14 +00:00
akr 18b097b73b * transcode.c (rb_econv_binmode): binmode is effective only once.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18869 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-08-26 12:45:20 +00:00
knu 2e24863549 * test/ruby/test_enum.rb (TestEnumerable#test_each_with_object):
Add a test for Enumerable#each_with_object.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18868 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-08-26 10:28:57 +00:00
knu 0924bcf835 * test/ruby/test_enumerator.rb (TestEnumerator#test_with_object):
Add (back) the test for Enumerable#with_object.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18867 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-08-26 10:26:45 +00:00
naruse 990ffbb96a * test/cgi/test_cgi_tag_helper.rb: add more tests for html3.
Patch by Takeyuki Fujioka. [ruby-dev:35975]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18866 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-08-26 07:18:35 +00:00
knu 67515222a1 Mark the previous change as experimental.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18865 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-08-26 05:45:48 +00:00
knu 3e8c3897ab * enumerator.c: Activate Enumerator#with_object and add
Enumerable#each_with_object.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18864 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-08-26 05:45:18 +00:00
knu cb32985d03 * enumerator.c (enumerator_initialize),
test/ruby/test_enumerator.rb: Add an ability to generate an
  enumerator from a block. [experimental] [ruby-dev:35903]



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18863 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-08-26 05:42:12 +00:00
duerst c5e46ef397 * test/ruby/test_transcode.rb: added test_euc_jp
(contributed by Yoshihiro Kambayashi)


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18862 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-08-26 04:26:00 +00:00
naruse 8ec7dce8c5 * test/cgi/test_cgi_tag_helper.rb: added by Takeyuki Fujioka.
[ruby-dev:35971]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18861 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-08-26 02:55:43 +00:00
naruse ae86df99f7 * lib/cgi.rb (nOE_element_def): fix error when cascade methods which
don't have arguments. Patch by Takeyuki Fujioka. [ruby-dev:35964]

* lib/cgi.rb (blockquote): String#collect (this depends on
  String#each) is no longer exists.
  Patch by Takeyuki Fujioka. [ruby-dev:35946]

* lib/cgi.rb (blockquote): ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18860 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-08-26 02:42:27 +00:00
akr 3c66a5b25e * io.c (make_writeconv): copy invalid/undef flags.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18859 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-08-25 18:08:08 +00:00
tadf 446a67c08e fixed a comment.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18858 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-08-25 17:58:30 +00:00
yugui 42307bf41f * common.mk (dist): tool/make-snapshot is executable.
* tool/make-snapshot (package): supported release numbers 1.9.0-x.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18857 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-08-25 17:47:57 +00:00
akr 75b2d7cbe8 * include/ruby/io.h (rb_io_t): new field: writeconv_pre_opts.
* io.c (make_writeconv): initialize writeconv_pre_opts.
  (io_fwrite): use writeconv_pre_opts.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18856 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-08-25 17:45:30 +00:00
akr 08911df311 * io.c: test _WIN32 for CRLF platform. (cygwin defines O_BINARY.)
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18855 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-08-25 16:49:31 +00:00
akr 5c6d113a4b * io.c: force CRLF handling if RUBY_TEST_CRLF_ENVIRONMENT is defined.
This is only for testing.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18854 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-08-25 16:30:43 +00:00
akr 873987f2e0 * transcode.c (str_transcode0): disable newline conversion for ASCII
incompatible encoding.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18853 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-08-25 16:27:23 +00:00
akr 1a805010ed * transcode.c (str_transcode0): don't short cut for newline conversion.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18852 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-08-25 15:58:35 +00:00
akr 6c1190d10f * io.c (io_fwrite): add TEXTMODE_NEWLINE_ENCODER to option for
rb_str_transcode.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18851 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-08-25 15:37:04 +00:00
akr 86154f63b3 * transcode.c (make_econv_exception): show readagain part for invalid
byte sequence exception.  store the part as an instance variable.
  (ecerr_readagain_bytes): new method to access the readagain part.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18850 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-08-25 15:26:54 +00:00
akr 72eaacaa15 "t" for Kernel#open described.
Encoding and Encoding::Converted described.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18847 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-08-25 15:04:53 +00:00
mame 4e573bf068 * ext/bigdecimal/bigdecimal.c (VpMult): fix double free.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18846 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-08-25 15:03:14 +00:00
svn 1913c0e857 * 2008-08-26
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18844 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-08-25 15:01:40 +00:00
akr 0486026389 * transcode.c (rb_econv_open): make last_tc NULL if there are only
additional transcoders.
  (econv_description): extracted from rb_econv_open_exc.
  (rb_econv_open_exc): use econv_description.
  (econv_inspect): use econv_description.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18843 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-08-25 15:01:36 +00:00
usa 87746352f4 * win32.c (init_stdhandle): set binmode.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18842 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-08-25 14:58:01 +00:00
tadf 3e75a0a763 * lib/date/format.rb(strftime): can print with given arbitrary
precision.

	* lib/date/format.rb(strftime): optional flags and filed width
	  should also affect %[nt].



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18841 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-08-25 14:47:33 +00:00
matz 9839d737c2 * compile.c (defined_expr): default defined? should return
"expression" without evaluating the expression.  [ruby-dev:35967]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18839 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-08-25 14:04:09 +00:00
mame bc3c178509 * test/ruby/test_thread.rb (test_status_and_stop_p): reduce the risk
of race condition.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18838 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-08-25 13:46:34 +00:00
mame cba52ec37c * lib/irb/extend-command.rb (def_extend_command): check number of
arguments.  [ruby-dev:35074]

* lib/irb/ext/multi-irb.rb (search): check if a corresponding job is
  found.  [ruby-dev:35074]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18837 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-08-25 13:41:11 +00:00
mame 4da80c7d6b * test/ruby/test_io.rb (test_dup): fix typo. see [ruby-dev:35958]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18836 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-08-25 13:32:59 +00:00
akr aeffc67dbb * transcode.c (rb_econv_open_by_transcoder_entries): initialize
last_error.  num_trans may be zero.
  (rb_econv_convert0): num_trans may be zero.
  (rb_econv_putbackable): ditto.
  (rb_econv_putback): ditto.
  (rb_econv_convert): input_ptr and output_ptr may be NULL.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18835 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-08-25 13:04:16 +00:00