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

11642 Коммитов

Автор SHA1 Сообщение Дата
ko1 3b1c663ed9 * compile.c, compile.h: fix to calculate correct stack depth
at each instruction.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15251 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-01-26 08:27:00 +00:00
akr 1e039d96f3 fix test_too_long_string.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15250 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-01-26 05:05:07 +00:00
naruse 7c884e9012 * lib/rexml/doctype.rb, test/rss/test_maker_itunes.rb: replace
multi-byte string.

* test/json/{test_json.rb, test_json_unicode.rb}: add magic comment.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15249 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-01-26 00:42:08 +00:00
nobu 1f7db0db75 * include/ruby/encoding.h (rb_usascii_encindex): added prototype.
* include/ruby/intern.h (rb_usascii_str_new, rb_usascii_str_new2):
  ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15248 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-01-26 00:30:28 +00:00
naruse df17bd4313 * string.c (rb_str_new): set US-ASCII and ENC_CODERANGE_7BIT when
empty string (len == 0).


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15247 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-01-26 00:18:50 +00:00
usa 2160c40fb2 * parse.y (parser_initialize): set default script encoding as US-ASCII.
* ruby.c (load_file): ditto.

	* ruby.c (process_options): set script encoding of -e from locale
	  except when -K is specified.

	* ruby.c (load_file): set script encoding of stdin from locale except
	  when -K is specified. [ruby-dev:33375]



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15246 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-01-25 18:49:28 +00:00
ko1 13b5b22ae6 * compile.c, compile.h: fix stack pointer issues.
calculate correct stack depth at compile time.
* insns.def (emptstack): remove it and add a new insn "adjuststack".
* bootstraptest/test_knownbug.rb: move/remove fixed test.
* bootstraptest/test_syntax.rb: ditto.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15245 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-01-25 18:02:01 +00:00
naruse 42dcda08ae * string.c (rb_str_usascii_new{,2}: defined.
(rb_str_new): set US-ASCII and ENC_CODERANGE_7BIT when empty
  string.

* encoding.c (rb_usascii_encoding, rb_usascii_encindex): defined.
  (rb_enc_inspect, enc_name, rb_locale_charmap, rb_enc_name_list_i):
  use rb_str_ascii_new.

* array.c (recursive_join, inspect_ary): ditto.

* object.c (nil_to_s, nil_inspect, true_to_s, false_to_s,
  rb_mod_to_s): ditto.

* hash.c (inspect_hash, rb_hash_inspect, rb_f_getenv, env_fetch,
  env_clear, env_to_s, env_inspect): ditto.

* numeric.c (flo_to_s, int_chr, rb_fix2str): ditto.

* bignum.c (rb_big2str): ditto.

* file.c (rb_file_ftype, rb_file_s_dirname, rb_file_s_extname,
  file_inspect_join, Init_file): ditto.

* test/ruby/test_ruby_m17n.rb: add checks for encoding of string.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15244 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-01-25 16:40:02 +00:00
akr f923cc360a * marshal.c (r_byte): use getbyte instead of getc.
(marshal_load): ditto.
  [ruby-dev:33264]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15243 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-01-25 16:37:53 +00:00
akr ea345bccfa fix typos.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15242 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-01-25 16:24:56 +00:00
akr f4d73e05d4 * io.c (rb_io_getline_fast): don't care ASCII incompatible encoding.
(prepare_getline_args): generate a newline according to IO encoding
  when necessary.
  (rb_io_getline_1): call rb_io_getline_fast only for ASCII
  compatible encoding.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15241 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-01-25 15:57:32 +00:00
usa 665e571839 * 2008-01-26
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15240 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-01-25 15:34:25 +00:00
akr 9a2d2fae46 add a test.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15239 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-01-25 15:22:52 +00:00
akr 3a783ba707 * string.c (rb_str_buf_cat_ascii): use rb_enc_cr_str_buf_cat.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15237 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-01-25 12:50:12 +00:00
nobu dc05954472 * common.mk (version.$(OBJEXT)): depends on $(srcdir)/revision.h.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15236 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-01-25 10:38:46 +00:00
nobu 8af627ba4a * tool/ifchange: commit miss.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15235 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-01-25 10:22:32 +00:00
nobu 6d91bf3b0c * common.mk (revision.h): extracts revision number with ``svn info''.
* common.mk (up): target to update from the repository.

* Makefile.in, {win,bcc}32/Makefile.sub (IFCHANGE): tool to update a
  file if changed.

* tool/ifchange: for unixen.

* win32/ifchange.bat: some fix


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15234 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-01-25 09:27:30 +00:00
nobu a984e00b80 * ruby.c (load_file): set default to ASCII-8BIT explicitly if -K
option is not given.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15233 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-01-25 08:12:15 +00:00
akr 1e41069754 * include/ruby/intern.h (rb_str_buf_cat_ascii): declared.
* string.c (rb_str_buf_cat_ascii): defined.

* re.c (rb_reg_s_union): use rb_str_buf_cat_ascii to support ASCII
  incompatible encoding.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15232 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-01-25 07:35:27 +00:00
nobu 8020c2e676 * ruby.c (process_options, load_file, rb_load_file): propagates script
encoding by -K to libraries.  [ruby-dev:33156]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15231 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-01-25 07:11:18 +00:00
nobu 5776f23d69 * ruby.c (process_options): set encoding of -e option from -E option
if they are compatible.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15230 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-01-25 06:56:50 +00:00
nobu c30d2489dd * ruby.c (cmdline_arguments): split argc and argv from cmdline_options.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15229 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-01-25 06:41:22 +00:00
nobu 95e59bd9e0 * ruby.c (process_options): not set encoding of -e option from -E
option if they are not compatible.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15228 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-01-25 06:12:44 +00:00
akr a470a2f1e1 combinational tests for printf.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15227 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-01-25 04:42:36 +00:00
usa 2fc0fe5332 * ruby.c (proc_options, process_options, load_file): shouldn't effect
--encoding to script encoding. [ruby-dev:33169]



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15226 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-01-25 04:18:14 +00:00
akr b45fa58f6d add a test for Regexp.union.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15225 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-01-25 03:58:32 +00:00
nobu 89fe999a7f * ChangeLog: fixed format.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15224 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-01-25 03:03:31 +00:00
nobu de34ca0bbc * */*.bat: changed to text/plain.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15223 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-01-25 01:40:46 +00:00
nobu 5f010f7299 * */*.bat: set svn:mime-type to text/batch.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15222 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-01-25 01:32:00 +00:00
mame 0dba38026a * enum.c (enum_one, enum_take_while, enum_drop_while): fix documents.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15221 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-01-24 14:23:51 +00:00
akr 14b9d47ae0 * parse.y (reg_fragment_setenc_gen): associate ASCII-8BIT only if
str has only ASCII characters.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15220 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-01-24 13:11:00 +00:00
usa e27f4ef689 * test/ruby/test_m17n.rb: commit miss.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15219 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-01-24 11:51:52 +00:00
usa 120bb4a9d5 * test/ruby/test_m17n.rb: follow to the following changes.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15218 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-01-24 11:47:37 +00:00
usa 439fab8459 * parser.y (parser_str_new): automatically update string literal's
encoding from US-ASCII to ASCII-8BIT when script encoding is US-ASCII
	  and the string includes non-ascii bytes. [ruby-dev:33348]

	* parser.y (reg_fragment_check_gen, reg_compile_gen): automatically
	  update regexp literal's encoding from US-ASCII to ASCII-8BIT when
	  script encoding is US-ASCII, the regexp has no kcode option and the
	  regexp includes non-ascii bytes. [ruby-dev:33353]



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15217 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-01-24 11:43:40 +00:00
nobu 8e7dd55a6e * lib/uri/generic.rb (URI::Generic::inspect): use Kernel#to_s instead
object_id with printf.  [ruby-dev:33347]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15216 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-01-24 10:36:24 +00:00
nobu 0c390860cb * sprintf.c (remove_sign_bits): returns pointer to the first char to
be used, instead of copying.

* sprintf.c (rb_str_format): negative indicator dots should come
  before sign digits always.  [ruby-dev:33224]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15215 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-01-24 10:29:22 +00:00
nobu 5e7d638a4c * include/ruby/encoding.h (rb_enc_is_newline): parenthesized arguments.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15214 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-01-24 09:19:44 +00:00
usa b1257d4d20 * re.c (rb_reg_fixed_encoding_p): no need to treat ASCII-8BIT specially.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15213 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-01-24 09:15:03 +00:00
usa fbe52683e6 * re.c (rb_reg_initialize): 7bit clean regexp should be US-ASCII.
[ruby-dev:33346]



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15212 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-01-24 07:56:12 +00:00
akr ce3f827565 fix last commit.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15211 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-01-24 07:35:49 +00:00
matz 4bcfd50ee7 * io.c (rb_io_getline_fast): the end point of left_char_head()
must be the last character.  [ruby-cvs:22445]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15210 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-01-24 07:34:07 +00:00
usa e36dd52291 * parse.y (reg_fragment_setenc_gen): recognize regexp with option n as
as ASCII-8BIT instead of US-ASCII. [ruby-dev:33339]



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15209 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-01-24 07:25:46 +00:00
akr 9b43eaf115 The [ruby-dev:32746] problem is re-introduced.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15208 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-01-24 07:16:41 +00:00
akr 2a02fe7497 add a test for [ruby-dev:33224].
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15207 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-01-24 06:59:03 +00:00
matz ffe425ecaa * array.c (sort_1): remove ary_sort_check(). in-place sort keep
original elements even when it's modified.

* array.c (sort_2): ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15206 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-01-24 06:50:22 +00:00
akr 1ca6577e0c add a test for [ruby-dev:33264].
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15205 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-01-24 06:38:57 +00:00
matz 28d5ab7816 * array.c (collect_bang_i): use rb_ary_store() to avoid potential
memory corruption.  a patch from Yusuke Endoh <mame@tsg.ne.jp>
  in [ruby-dev:33328].

* array.c (ITERATE): remove unnecessary macro.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15204 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-01-24 06:18:18 +00:00
akr 4eca4cadff * time.c (make_time_t): revert round trip test. [ruby-dev:33058]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15203 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-01-24 06:10:49 +00:00
akr 968e404220 * string.c (rb_enc_cr_str_buf_cat): ASCII incompatible encoding is
not compatible with any other encoding.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15202 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-01-24 02:17:26 +00:00
naruse e336136d8a * parse.y (STR_NEW0): set encoding as US-ASCII.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15201 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-01-23 22:35:27 +00:00