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

10266 Коммитов

Автор SHA1 Сообщение Дата
akr 850cd3a536 eval("\"\xfd".force_encoding("utf-8")) generates garbage in error message.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14076 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-12-02 01:43:29 +00:00
akr 21729a1c77 * parse.y (regexp): fix /#{}\xa1\xa2/e to be EUC-JP.
(reg_fragment_setenc_gen): extracted from reg_compile_gen.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14075 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-12-02 00:16:24 +00:00
akr 5a930580c9 add a test for [ruby-dev:32404].
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14074 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-12-01 17:29:43 +00:00
akr bd741ee16a (test_time_now_cycle): cut off under micro second.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14073 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-12-01 17:24:13 +00:00
akr 7ff702406a * include/ruby/intern.h (rb_uv_to_utf8): declared.
* re.c (rb_reg_preprocess): new function for dynamic regexp with
  \u{} such as Regexp.new("\\u{6666}").
  (rb_reg_prepare_re): preprocess regexp for recompiling.
  (read_escaped_byte): new function.
  (unescape_escaped_nonascii): new function.
  (append_utf8): new function.
  (unescape_unicode_list): new function.
  (unescape_unicode_bmp): new function.
  (unescape_nonascii): new function.
  (rb_reg_initialize): preprocess regexp.

* pack.c (rb_uv_to_utf8): renamed from uv_to_utf8.

* parse.y (STR_NEW3): take func instead of has8 and hasmb.
  (parser_str_new): use default coderange mechanism except for regexp.
  (parser_tokadd_utf8): copy regexp source as-is.
  (parser_read_escape): UTF-8 stuff removed.
  (parser_tokadd_escape): has8bit and hasmb removed.
  (parser_tokadd_string): fix 8-bit single byte character with \u.
  (parser_parse_string): has8bit and hasmb removed.
  (parser_here_document): has8bit and hasmb removed.
  (parser_yylex): call parser_tokadd_utf8 instead of read_escape for
  UTF-8 character.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14072 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-12-01 16:56:19 +00:00
jeg2 d92b461dd9 * lib/xmlrpc/server.rb (XMLRPC::Server#server): Improve signal handling so
pressing control-c in the controlling terminal or sending SIGTERM stops
  the XML-RPC server.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14070 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-12-01 16:01:49 +00:00
matz d5bd9d1593 * encoding.c: rename primary_encoding -> default_external (encoding).
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14069 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-12-01 14:05:53 +00:00
matz ec27275122 lib/README: remove jcode.rb
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14068 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-12-01 13:26:01 +00:00
tadf b587334b08 a reaction to recent time's changes.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14067 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-12-01 11:13:32 +00:00
ko1 0d4761fb1a * bootstraptest/test_knownbug.rb: move fixed bugs.
* test/ruby/test_sprintf.rb: ditto.
* test/yaml/test_yaml.rb: ditto.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14065 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-12-01 05:43:06 +00:00
matz 70e28cf1eb * io.c (rb_f_open): use to_open for every non-string object. path
object may use method_missing.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14064 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-12-01 05:22:15 +00:00
matz 2bbffcd6a4 * insns.def (concatarray, splatarray): use to_a instead of
to_splat.

* insnhelper.ci (caller_setup_args): ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14063 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-12-01 05:20:06 +00:00
ko1 6fafbfd63e * insnhelper.ci (vm_yield_with_cfunc): fix to passing argc on third
parameter of IFUNC.  [ruby-dev:32329]
* enumerator.c: fix to pass exact number of argument.
* eval.c (rb_yield_values2): added.
* include/ruby/ruby.h: ditto.
* bootstraptest/test_knownbug.rb: move a fixed test.
* bootstraptest/test_block.rb: ditto.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14062 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-12-01 04:30:19 +00:00
nobu 4afa82056c * parse.y (newline_node): always remove NODE_BEGIN.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14060 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-11-30 18:34:34 +00:00
nobu 0edabec626 * lib/json/add/*.rb, test/json/test_json_rails.rb: set properties.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14058 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-11-30 17:54:06 +00:00
matz da42035b09 * signal.c (ruby_signal): use SA_SIGINFO if available.
[ ruby-Patches-6418 ]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14057 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-11-30 14:49:45 +00:00
matz 29c7c72e09 * signal.c (trap_signm): SIGVTALRM no longer used for green
thread.  [ruby-talk:281318]

* signal.c (ruby_sig_finalize): do not install SIG_DFL handler if
  previous handler is sighandler().

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14056 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-11-30 14:08:58 +00:00
matz 897b452f8d lib/jcode.rb: removed
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14055 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-11-30 13:39:28 +00:00
matz 16296af65d sample/test.rb: remove $KCODE
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14053 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-11-30 12:47:49 +00:00
naruse c861f13f06 * ChangeLog for 14051.
--

M    ChangeLog


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14052 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-11-30 12:11:36 +00:00
naruse a049c43c65 * lib/json.rb, lib/json/add/{core.rb, rails.rb},
test/json/test_json_rails.rb: additional files of JSON 1.1.2.
  [ruby-dev:32405]
--

M    lib/json.rb
A    lib/json/add
A    lib/json/add/core.rb
A    lib/json/add/rails.rb
A    test/json/test_json_rails.rb


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14051 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-11-30 12:08:46 +00:00
matz e46a617759 * ext/syck/rubyext.c (rb_syck_mktime): avoid segmentation fault.
[ruby-core:13735]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14050 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-11-30 10:42:40 +00:00
matz 9497f7996a * enum.c (enum_count): precise argument number check.
* enum.c (enum_count): return Enumerator if no block given.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14049 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-11-30 10:08:03 +00:00
akr 092ec0146d report the reason of process termination.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14048 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-11-30 08:47:22 +00:00
matz 58c070aa9b * enum.c (enum_take_while): returns Enumerator if no block given.
* enum.c (enum_drop_while): ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14047 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-11-30 08:15:12 +00:00
matz efedaa432b * hash.c (rb_hash_eql): recursive comparison should be based on
eql?  [ruby-core:13803]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14046 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-11-30 05:26:59 +00:00
nobu 058ec52c0d * parse.y (stmt): remove unnecessary NODE_BEGIN. [ruby-core:13814]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14045 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-11-29 07:59:12 +00:00
naruse 0cf0b82418 * ext/json, lib/json, test/json: Update to JSON 1.1.2.
(RubyForge#15447)

* math.c: fix typo.
-- 

M    ChangeLog
M    math.c
M    ext/json/ext/generator/generator.c
M    ext/json/ext/parser/parser.rl
M    ext/json/ext/parser/parser.c
M    lib/json/version.rb
M    lib/json/editor.rb
M    lib/json/common.rb
M    lib/json/pure/parser.rb
M    test/json/test_json_unicode.rb
M    test/json/test_json_fixtures.rb
M    test/json/test_json_generate.rb
M    test/json/test_json_addition.rb
M    test/json/test_json.rb
M    test/json/runner.rb


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14044 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-11-28 09:22:57 +00:00
akr 6272cf8ecd add test for enumerator.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14043 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-11-28 07:48:23 +00:00
ko1 c2aef47c84 * insnhelper.ci (vm_invoke_block): should splat args.
[ruby-dev:32392]
* test/ruby/test_yield.rb: add tests for above.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14042 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-11-28 07:31:10 +00:00
nobu 49b1513d1e * ext/extmk.rb (extract_makefile): use dldflags instead of DLDFLAGS to
get rid of mixing $LDFLAGS and $ARCH_FLAG.

* lib/mkmf.rb (configuration): ditto.

* lib/mkmf.rb (create_makefile): support for extensions which has no
  shared object.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14041 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-11-28 05:43:17 +00:00
akr c3c320c40a test exceptions.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14040 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-11-28 02:45:12 +00:00
akr f63918441e longer timeout.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14036 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-11-27 22:53:28 +00:00
nobu 22c18f1e1b * 2007-11-28
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14035 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-11-27 17:44:21 +00:00
nobu 6eea7a7c71 * bignum.c (big2str_find_n1): removed extraneous element.
[ruby-dev:32351], [ruby-dev:32365]

* bignum.c (big2str_find_n1): returns necessary digits now.

* sprintf.c (remove_sign_bits): extends sign bit first.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14034 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-11-27 17:42:12 +00:00
ko1 0cdd3bced5 * compile.c (iseq_compile_each): "when *[],1" dumps core.
a patch from Yusuke ENDOH <mame AT tsg.ne.jp>.  [ruby-dev:32350]
* bootstraptest/test_syntax.rb: add a test for above.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14033 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-11-27 06:54:58 +00:00
ko1 1bed0ccca8 * compile.c (iseq_compile_each): "a[*b] += 1" dumps core.
a patch from Yusuke ENDOH <mame AT tsg.ne.jp>.  [ruby-dev:32354]
* bootstraptest/test_syntax.rb: add a test for above.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14032 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-11-27 06:45:01 +00:00
ko1 b0986a8f82 * compile.c, insns.def: change return value of "defined?"
for $&, $1, ... .  If such variables are defined,
  return "global-variable".
* test/ruby/test_defined.rb: add tests.
* bootstraptest/test_syntax.rb: fix a test.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14031 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-11-27 04:43:54 +00:00
matz 8e09ab045f lib/finalizer.rb: removed
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14030 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-11-27 02:58:11 +00:00
ko1 1152eef81d * insns.def: fix typo.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14029 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-11-27 02:56:15 +00:00
ko1 db2b0037fd * test_beginendblock.rb: add loop to wait signal.
[ruby-dev:32332]



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14028 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-11-27 02:28:28 +00:00
akr f5ee0fd521 * include/ruby/encoding.h, encoding.c, re.c, string.c, parse.y:
rename ENC_CODERANGE_SINGLE to ENC_CODERANGE_7BIT.
  rename ENC_CODERANGE_MULTI to ENC_CODERANGE_8BIT.
  Because single byte 8bit character, such as Shift_JIS 1byte katakana,
  is represented by ENC_CODERANGE_MULTI even if it is not multi byte.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14027 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-11-27 02:21:17 +00:00
ko1 9c7aab17a5 * eval.c (rb_method_missing): fix stack trace.
* bootstraptest/test_knownbug.rb: move solved tests.
* bootstraptest/test_method.rb, test/ruby/test_regexp.rb: ditto.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14026 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-11-27 01:47:34 +00:00
ko1 329484693a * insns.def, compile.c: fix to allow dsym for alias/undef.
[ruby-dev:32355]
* bootstraptest/test_method.rb: add tests for above.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14025 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-11-27 01:02:30 +00:00
seki 724de18989 * lib/drb/extserv.rb (initialize, stop_service): synchronize with
ExtServManager.

	* test/drb/test_drb.rb (TestDRbEval): ignored.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14024 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-11-26 14:24:29 +00:00
akr bfc502fe51 more tests.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14023 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-11-26 13:05:08 +00:00
matz 35adbb5f88 * sprintf.c (rb_str_format): always trim preceding zeros.
[ruby-dev:32351]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14022 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-11-26 09:38:49 +00:00
akr cbd72b86da * re.c (Init_Regexp): new method Regexp#fixed_encoding?
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14021 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-11-26 08:33:11 +00:00
keiju e6140f3e3c * lib/complex.rb: be able to create Complex(0, -0.0). [ruby-list:44268]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14020 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-11-26 04:33:21 +00:00
akr 2ed2078909 fix coderange.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14019 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-11-26 02:49:44 +00:00