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

13332 Коммитов

Автор SHA1 Сообщение Дата
akr abef7fa890 * transcode.c (trans_open_i): check the result of rb_transcoding_open.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18526 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-08-12 08:17:27 +00:00
nari 5b3278b74a * gc.c (gc_profile_result): use rb_str_catf.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18525 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-08-12 07:24:30 +00:00
akr 5ade93542f * transcode_data.h (TRANSCODE_ERROR): removed.
* tool/transcode-tblgen.rb: 8bit byte of ASCII-8BIT is a valid
  (but unique to ASCII-8BIT) character.

* transcode.c (rb_eConversionUndefined): new error.
  (rb_eInvalidByteSequence): ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18524 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-08-12 07:20:10 +00:00
aamine 47c8401c5a * lib/net/pop.rb: POP3Command should export @socket since POP calls #socket.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18523 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-08-12 07:09:08 +00:00
nobu 076b6a226f * sprintf.c, util.c (quorem, nrv_alloc, dtoa): enabled floating point
support.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18522 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-08-12 07:06:33 +00:00
nobu e2159ba730 * string.c (rb_str_intern): constified.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18521 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-08-12 07:03:23 +00:00
nari fccc094568 * gc.c (gc_profile_result): use sprintf.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18520 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-08-12 07:02:04 +00:00
matz 71553b91f6 * string.c (rb_str_intern): should check symbol table overflow.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18519 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-08-12 06:39:08 +00:00
aamine 00b129c4e4 * lib/net/http.rb (send_request_with_body): Content-Length should be byte length of string. (closes #203)
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18518 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-08-12 06:32:50 +00:00
usa 6d8c1483d6 * enc/depend: (transvpath_prefix): prefix has no extension, so replace
%s with "".



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18517 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-08-12 06:19:00 +00:00
kouji fa9ef4bf00 * test/readline/test_readline.rb (TestReadline#test_safe_level_4):
tested Readline.vi_editing_mode? and Readline.emacs_editing_mode?.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18516 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-08-12 06:17:48 +00:00
nobu 13f1418d54 * enc/Makefile.in (.SUFFIXES): renamed to .trans.
* enc/make_encmake.rb: added --encs and --no-encs options.

* enc/depend (TRANSVPATH): fix for nmake.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18513 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-08-12 05:25:14 +00:00
aamine ae04e36638 * lib/net/https.rb: supress syntax warning.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18512 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-08-12 05:20:09 +00:00
aamine 08795f9ceb * lib/net/http.rb (Net::HTTP#initialize): initialize net/https variables to supress syntax warning.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18511 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-08-12 05:18:22 +00:00
nobu 3c1fca24e2 * ext/dl/cptr.c (rb_dlptr_s_to_ptr): fixed shadowing variable.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18510 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-08-12 05:15:18 +00:00
nobu 0bf6ed0fc8 * ext/socket/getaddrinfo.c (getaddrinfo): constified.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18508 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-08-12 05:08:51 +00:00
matz c2e85dfa8f * test/win32ole/test_err_in_callback.rb: do not require 'mkmf'
unless WIN32OLE is defined.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18505 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-08-12 04:35:13 +00:00
akr 61f512a357 add a test.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18504 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-08-11 22:49:15 +00:00
akr 94ca2d94de * transcode_data.h (rb_transcoder): add resetstate_func field for
resetting a state of stateful encoding.

* enc/trans/iso2022.trans (rb_EUC_JP_to_ISO_2022_JP): specify
  finish_eucjp_to_iso2022jp for resetstate_func.

* tool/transcode-tblgen.rb: specify NULL for resetstate_func.

* transcode.c (output_replacement_character): call resetstate_func
  before appending the replacement character.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18503 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-08-11 22:44:23 +00:00
akr 5f9b877ebe * transcode.c (get_replacement_character): extracted from
output_replacement_character.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18502 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-08-11 22:21:15 +00:00
akr c1361132bc * transcode_data.h (rb_transcoder): typedef at first.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18501 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-08-11 22:00:48 +00:00
akr 425098de96 * transcode.c (rb_trans_conv): find second last error.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18500 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-08-11 21:49:38 +00:00
svn 53fddace54 * 2008-08-12
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18499 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-08-11 15:50:47 +00:00
akr a2901a7c75 * transcode_data.h (rb_trans_result_t): new type.
(rb_trans_elem_t): new type.
  (rb_trans_t): new type.

* transcode.c (transcode_dispatch_cb): removed.
  (transcode_dispatch): removed.
  (rb_transcoding_result_t): moved to rb_trans_result_t in
  transcode_data.h.
  (transcode_restartable0): goto follow_info when FUNsi.
  (rb_transcoding_open): use get_transcoder_entry.
  (rb_trans_open): new function.
  (rb_trans_conv): ditto.
  (rb_trans_close): ditto.
  (trans_open_i): ditto.
  (trans_sweep): ditto.
  (more_output_buffer): take rb_trans_t instead of rb_transcoding as
  an argument.
  (transcode_loop): take from_encoding and to_encoding instead of tr
  as arguments.  use rb_trans_open/rb_trans_conv/rb_trans_close.
  (str_transcode): don't use transcode_dispatch.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18498 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-08-11 15:50:42 +00:00
matz 96765d153f * iseq.c (rb_iseq_clone): should preserve cref_stack link.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18497 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-08-11 11:39:09 +00:00
matz 199a95775b * ext/dl/cfunc.c (rb_dlcfunc_call): add taint check.
* ext/dl/dl.c (rb_dl_malloc): add rb_secure(2).

* ext/dl/dl.c (rb_dl_realloc): ditto.

* ext/dl/dl.c (rb_dl_free): ditto.

* ext/dl/dl.c (rb_dl_ptr2value): ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18496 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-08-11 11:33:44 +00:00
nobu 35b6abbca2 * gc.c (getrusage_time): works only if RUSAGE_SELF is defined right
now.

* gc.c (gc_profile_result): C99.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18495 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-08-11 11:11:27 +00:00
matz 9295fd4b59 * array.c (rb_ary_sample): rename #choice to #sample. in
addition, sample takes optional argument, a la #first.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18494 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-08-11 10:00:47 +00:00
nari 130e720253 * gc.c: added GC::Profiler.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18493 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-08-11 09:36:57 +00:00
kouji c5579a833d fixed ChangeLog.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18492 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-08-11 09:16:28 +00:00
kouji aa2a222f9c * ext/readline/README.ja: added API document for
Readline.vi_editing_mode? and Readline.emacs_editing_mode?.

* ext/readline/extconf.rb: checked rl_editing_mode variable in
  Readline library.

* ext/readline/readline.c (readline_s_emacs_editing_mode_p): added
  Readline.emacs_editing_mode? method.
  (readline_s_vi_editing_mode_p): added Readline.vi_editing_mode?
  method.
  (Init_readline): ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18491 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-08-11 08:31:45 +00:00
matz e956f28724 * class.c (clone_method): should copy cbase in cref as well.
[ruby-dev:35116]

* iseq.c (iseq_mark): mark original iseq object.

* iseq.c (iseq_free): do not free internal data if they have
  original iseq to belong.

* iseq.c (rb_iseq_clone): a new function to clone iseq value.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18490 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-08-11 08:13:42 +00:00
kouji 5898c07466 * test/readline/test_readline.rb: added test for Readline's class
methods.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18489 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-08-11 07:58:02 +00:00
akr 2897632f16 * enc/trans/iso2022.trans: renamed from iso2022.erb.c.
* enc/trans/single_byte.trans: ditto.

* enc/trans/utf_16_32.trans: ditto.

* enc/trans/korean.trans: ditto.

* enc/trans/japanese.trans: ditto.

* enc/depend: follow the renaming.

* tool/build-transcode: ditto.




git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18488 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-08-11 07:39:52 +00:00
akr 36dd9a2221 * configure.in (rb_cv_broken_glibc_ia64_erfc): renamed from
rb_broken_glibc_ia64_erfc.
  [ruby-core:18228]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18487 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-08-11 06:11:55 +00:00
svn cc0114b6d0 * 2008-08-11
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18482 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-08-11 01:06:25 +00:00
akr bd5bf3726c * transcode_data.h (rb_transcoding): rename fields.
readlen -> recognized_len.
  feedlen -> readagain_len.

* transcode.c: follow the field renaming.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18481 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-08-11 01:06:21 +00:00
akr badd9f1efc * transcode.c (transcode_restartable0): invalid handling simplified.
(transcode_restartable): use PARTIAL_INPUT for converting buffered
  input.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18476 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-08-10 13:37:44 +00:00
mame 4d763fb8ee * encoding.c: include util.h. [ruby-dev:35715]
* common.mk: ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18475 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-08-10 13:25:34 +00:00
akr 436a136b4e * transcode_data.h (rb_transcoding): new field: flags.
* transcode.c (load_transcoder): extracted from transcode_dispatch_cb.
  (rb_transcoding_result_t): renamed from transcode_result_t.
  (rb_transcoding_open): new function.
  (rb_transcoding_convert): ditto.
  (rb_transcoding_close): ditto.
  (transcode_loop): use rb_transcoding_open, rb_transcoding_convert
  and rb_transcoding_close.
  (str_transcode): don't need rb_transcoding.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18474 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-08-10 12:26:01 +00:00
akr 30e90a335d * tool/transcode-tblgen.rb: record checksum of
transcode-tblgen.rb itself.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18473 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-08-10 09:10:58 +00:00
nobu aa9457762f * config.guess ({powerpc-apple,i586-pc}-haiku): re-applied r18403.
[ruby-core:18110]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18472 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-08-10 03:34:44 +00:00
nobu 2be9ae2f13 * config.{guess,sub}: updated to automake-1.10.1.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18471 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-08-10 03:29:21 +00:00
nobu de0a9f726e * configure.in,parse.y: removed garbage spaces.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18470 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-08-10 03:15:37 +00:00
nobu e3d9fc76e6 * enc/Makefile.in (make-workdir): use MAKEDIRS.
* enc/depend: makes target directory before compile/link.

* tool/transcode-tblgen.rb: creates target directory.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18469 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-08-10 02:45:18 +00:00
akr 2ce7aeca6e * transcode.c: rename my_transcoding to tc and my_transcoder to tr.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18468 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-08-10 02:33:05 +00:00
akr e748ed513d * transcode_data.h (rb_transcoding): add feedlen field.
* transcode.c (transcode_restartable0): renamed from
  transcode_restartable.
  save input buffer into feed buffer if next character is started the
  point before input buffer.  for example, "\x00\xd8\x01" then "\x02"
  in UTF-16LE.  \x02 causes invalid and next character is started from
  \x01.
  (transcode_restartable): new function to call
  transcode_restartable0.   if feed buffer is not empty, convert it at
  first.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18467 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-08-10 02:17:56 +00:00
nobu 3ba7984ef4 * common.mk (extconf): use MAKEDIRS.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18466 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-08-10 02:03:01 +00:00
nobu 50c241002a * lib/irb.rb (IRB::Irb#inspect): instance_variables returns symbols
instead of strings now.   [ruby-dev:34930]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18465 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-08-10 00:35:14 +00:00
akr b2718506ad * transcode.c (transcode_char_start): refactored to remove readlen
argument.
  (transcode_restartable): refactored to remove readlen variable.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18464 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-08-10 00:23:36 +00:00