akr
ffbf8ab367
* enc/big5.c (big5_mbc_enc_len): validation implemented.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15289 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-01-28 06:33:57 +00:00
akr
5f9bc1779e
* enc/euc_kr.c (euckr_mbc_enc_len): validation implemented.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15288 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-01-28 04:02:39 +00:00
matz
06cd63ce93
* io.c (rb_open_file): should check NUL in path.
...
<http://www.rubyist.net/~matz/20080125.html#c01 >.
* io.c (rb_io_s_popen): ditto.
* io.c (rb_io_reopen): ditto.
* io.c (next_argv): ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15286 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-01-28 03:32:27 +00:00
usa
4a94863244
* parse.y (parser_str_new): encoding of UTF-8 literal string in
...
US-ASCII script is UTF-8. [ruby-dev:33406]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15285 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-01-28 02:26:23 +00:00
usa
c7c263eefc
* test/ruby/test_m17n.rb (test_magic_comment): add test.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15284 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-01-28 01:26:37 +00:00
usa
73e3ea958d
* common.mk (help): use double quotes for nmake.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15283 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-01-28 00:35:48 +00:00
nobu
7c69f166bd
* parse.y (parser_set_encode): check if encoding is ASCII compatible.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15282 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-01-27 15:39:14 +00:00
nobu
b980803a6e
* sprintf.c (rb_str_format): fix for left justify flag.
...
* sprintf.c (rb_str_format): zero-precision zero bug revised.
[ruby-dev:33419]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15281 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-01-27 14:33:37 +00:00
akr
fc208c1bd5
* include/ruby/oniguruma.h: precise mbclen API redesigned to avoid
...
inline functions.
(onigenc_mbclen_charfound): removed.
(onigenc_mbclen_needmore): removed.
(onigenc_mbclen_recover): removed.
(ONIGENC_MBCLEN_CHARFOUND): removed.
(ONIGENC_MBCLEN_CHARFOUND_P): defined.
(ONIGENC_MBCLEN_CHARFOUND_LEN): defined.
(ONIGENC_MBCLEN_INVALID): removed.
(ONIGENC_MBCLEN_INVALID_P): defined.
(ONIGENC_MBCLEN_NEEDMORE): removed.
(ONIGENC_MBCLEN_NEEDMORE_P): defined.
(ONIGENC_MBCLEN_NEEDMORE_LEN): defined.
(ONIGENC_MBC_ENC_LEN): use onigenc_mbclen_approximate.
* regenc.c (onigenc_mbclen_approximate): defined.
* include/ruby/encoding.h (MBCLEN_CHARFOUND): removed.
(MBCLEN_INVALID): removed.
(MBCLEN_NEEDMORE): removed.
(MBCLEN_CHARFOUND_P): defined.
(MBCLEN_INVALID_P): defined.
(MBCLEN_NEEDMORE_P): defined.
(MBCLEN_CHARFOUND_LEN): defined.
(MBCLEN_NEEDMORE_LEN): defined.
* encoding.c: use new API.
* re.c: ditto.
* string.c: ditto.
* parse.y: ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15280 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-01-27 14:27:07 +00:00
nobu
526ab1f0d1
* parse.y (value_expr_gen): reverted r12880. [ruby-dev:33388]
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15279 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-01-27 13:55:29 +00:00
nobu
7889fdd1e6
* sprintf.c (rb_str_format): fix for octal with precision.
...
[ruby-dev:33411]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15278 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-01-27 13:33:41 +00:00
nobu
ce26086b01
* misc/ruby-mode.el (ruby-mode): set ruby-mode-set-encoding to buffer
...
local before-save-hook.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15277 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-01-27 13:31:47 +00:00
naruse
587167a8cb
*common.mk: add description about "make clean".
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15276 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-01-27 12:55:18 +00:00
nobu
02ca8ffbdc
* ext/nkf/nkf-utf8/nkf.h: set properties.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15275 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-01-27 12:50:44 +00:00
nobu
c9ca560ce8
* misc/ruby-mode.el (ruby-mode-set-encoding): automatically insert
...
encoding magic comment.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15274 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-01-27 12:49:01 +00:00
naruse
2ae9745aed
*common.mk: add description about "make golf".
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15273 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-01-27 12:37:58 +00:00
akr
b8b0f6fd46
* string.c (rb_str_inspect): avoid exception by
...
"\#\xa1".force_encoding("euc-jp").inspect.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15272 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-01-27 11:09:41 +00:00
akr
36b4d1a1dc
* string.c (rb_str_succ): warning suppressed.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15271 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-01-27 10:08:58 +00:00
naruse
ce7cdcdd95
* common.mk (help): show major targets.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15270 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-01-27 09:19:00 +00:00
naruse
4aa64b35fa
* ext/nkf/nkf.c: raise error when no output encoding is given.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15269 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-01-27 08:55:31 +00:00
akr
b1e6c052cd
* string.c (rb_str_succ): don't increment/decrement codepoint.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15268 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-01-27 08:21:24 +00:00
naruse
4a9d407e35
* ruby-trunk.
...
* lib/irb/ruby-lex.rb (RubyLex#buf_input): use chars.to_a.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15267 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-01-27 07:43:31 +00:00
naruse
086e5b1a63
* ext/nkf/nkt-utf8: update nkf.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15266 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-01-27 07:28:26 +00:00
naruse
f3fe101d55
* re.c (rb_reg_source): set encoding as regexp encoding.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15265 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-01-27 07:26:51 +00:00
akr
3f68c10536
tests refined.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15264 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-01-27 02:38:10 +00:00
akr
4ccb160103
add tests.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15263 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-01-26 22:50:56 +00:00
akr
0dfda18777
add tests.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15262 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-01-26 22:48:12 +00:00
akr
3970d67185
add a test for chomp.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15261 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-01-26 21:23:59 +00:00
akr
b9c18bdcdd
* re.c (rb_reg_preprocess): force fixed encoding when ASCII
...
incompatible source string.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15260 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-01-26 21:01:52 +00:00
akr
e7bf1bd4d4
fix typos.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15259 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-01-26 20:30:32 +00:00
akr
7560adca78
make combination recursionless.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15258 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-01-26 19:49:37 +00:00
nobu
f356662f6b
* sprintf.c (rb_str_format): zero-precision zero should be empty.
...
[ruby-dev:33363]
* sprintf.c (rb_str_format): not prepend octal prefix to negative or
zero value. [ruby-dev:33363], [ruby-dev:33367]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15257 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-01-26 14:46:36 +00:00
nobu
259526006e
* parse.y (assignable_gen, keyword_to_name): __ENCODING__ was missing.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15256 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-01-26 14:42:17 +00:00
akr
4e6bba219e
add a test for [ruby-dev:33377].
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15255 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-01-26 11:19:06 +00:00
akr
8c02164fb5
add a test for [ruby-dev:33406].
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15254 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-01-26 11:15:24 +00:00
akr
26b86d8a72
* marshal.c (w_object): dump string encoding in USERDEF.
...
[ruby-dev:33401]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15253 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-01-26 10:31:11 +00:00
ko1
51ea2cf4e4
* compile.c (iseq_compile_each): validate argument expr of "next"
...
statement.
* bootstraptest/test_syntax.rb: add a test.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15252 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-01-26 08:44:43 +00:00
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