akr
c0bec2fae1
* transcode_data.h (STR1): defined for a string up to 255 bytes.
...
(STR1_BYTEINDEX): defined.
(makeSTR1): defined.
* tool/transcode-tblgen.rb: generate STR1.
* transcode.c (transcode_restartable0): interpret STR1.
* enc/trans/escape.trans (fun_so_escape_xml_chref): removed. STR1 is
used instead.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19214 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-09-07 09:13:16 +00:00
kazu
6bf5c34cf2
* configure.in: Mac OS X's crypt(2) is broken with invalid salt.
...
[ruby-dev:35899]
* string.c (rb_str_crypt): ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19213 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-09-07 08:57:53 +00:00
akr
78543725eb
* tool/transcode-tblgen.rb: o4 is usable only if the first byte is
...
f0-f7.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19212 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-09-07 08:30:32 +00:00
akr
a0d163da71
rdoc update.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19211 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-09-07 08:02:21 +00:00
akr
a788a2e531
* io.c (make_writeconv): choose ASCII compatible encoding as
...
intermediate encoding if stateful encoder exists.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19210 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-09-07 03:45:12 +00:00
akr
020e681eec
* include/ruby/encoding.h (ECONV_XML_ATTR_CONTENT_ENCODER): defined.
...
(ECONV_STATEFUL_ENCODER_MASK): defined.
(ECONV_XML_ATTR_QUOTE_ENCODER): defined.
(ECONV_XML_ATTR_ENCODER): removed.
* enc/trans/escape.trans (rb_escape_xml_attr_content): defined.
(rb_escape_xml_attr_quote): defined.
(rb_escape_xml_attr): removed.
* io.c (NEED_WRITECONV): writeconv is required if supplemental
converter is used.
(make_writeconv): apply stateful encoder in writeconv.
* transcode.c: follow the constant change.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19209 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-09-07 03:13:29 +00:00
matz
120772041e
* misc/emacs-mode.el: don't set case-fold-search globally to nil;
...
instead just set it when we need it.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19208 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-09-06 22:38:08 +00:00
matz
e39aa51dfa
* misc/ruby-mode.el: fix a variable-name error.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19207 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-09-06 22:37:17 +00:00
matz
4cbbf3bdfc
* misc/*.el: untabify, for interal consistency and consistency
...
with standard Emacs elisp files.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19206 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-09-06 22:36:10 +00:00
matz
d250d79e5b
* misc/ruby-mode.el, misc/ruby-electric.el: use regexp-opt where
...
possible for more efficient regexps.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19205 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-09-06 22:34:46 +00:00
matz
3f3584d623
* misc/ruby-mode.el: don't highlight keywords when they're the
...
beginning of non-keyword symbols.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19204 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-09-06 22:33:43 +00:00
matz
ce231cdbdd
* misc/ruby-mode.el: don't crash the whole mode if the Subversion
...
$ keyword isn't interpolated.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19203 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-09-06 22:32:38 +00:00
matz
2d1c5d2c24
* misc/*.el: merged the following patches from Nathan Weizenbaum
...
<nex342 at gmail.com>. [ruby-core:18424]
* misc/ruby-mode.el: improve here-doc performance.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19202 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-09-06 22:30:34 +00:00
matz
0771b987a4
* file.c (file_expand_path): applied a patch from Nobuhiro Tachino
...
in [ruby-dev:35948]. fix #491
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19201 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-09-06 22:15:18 +00:00
matz
7ae76a9e6b
* test/ruby/test_parse.rb (TestParse): update a test not to use
...
recently fixed inconsistent syntax.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19200 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-09-06 22:14:28 +00:00
matz
929e0b91be
* parse.y (f_block_optarg): allow default for block parameters as
...
long as the value is primary. a patch from Eric Mahurin
<eric.mahurin at gmail.com> in [ruby-core:16880].
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19199 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-09-06 18:39:36 +00:00
kazu
04d3593b26
add a space
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19198 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-09-06 16:22:16 +00:00
matz
05edaf5090
* parse.y (yylex): "1.upto 2 {|i| p i }" should be syntax error.
...
[ruby-dev:36008]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19197 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-09-06 16:09:43 +00:00
kazu
00759b00f8
fix typos
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19196 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-09-06 16:04:30 +00:00
kazu
6d847ca70d
cleanup spaces
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19195 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-09-06 16:01:27 +00:00
svn
bff6f0f9e4
* 2008-09-07
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19194 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-09-06 15:39:04 +00:00
akr
0508672f0e
* include/ruby/encoding.h (ECONV_ERROR_HANDLER_MASK): defined.
...
(ECONV_DECODER_MASK): defined.
(ECONV_ENCODER_MASK): defined.
* io.c (make_writeconv): restrict ecflags for writeconv with
ECONV_ERROR_HANDLER_MASK.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19193 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-09-06 15:39:00 +00:00
matz
dd27b8f457
* proc.c (Init_Proc): add '===' operator to use procs in when
...
clause of the case statement. inspired by <http://www.aimred.com/news/developers/2008/08/14/unlocking_the_power_of_case_equality_proc/ >.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19192 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-09-06 14:58:11 +00:00
akr
76b3063022
* include/ruby/encoding.h (ECONV_XML_TEXT_ENCODER): renamed from
...
ECONV_HTML_TEXT_ENCODER.
(ECONV_XML_ATTR_ENCODER): renamed from ECONV_HTML_ATTR_ENCODER.
* enc/trans/escape.trans: follow the renaming.
* transcode.c: ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19191 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-09-06 14:05:10 +00:00
matz
d98bc00582
* ext/socket/mkconstants.rb: add some IPV6 constans. [ruby-dev:36175]
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19190 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-09-06 12:38:59 +00:00
matz
003d60860a
* ext/socket/constants.h: add some IPV6 constans. [ruby-dev:36175]
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19189 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-09-06 12:33:53 +00:00
akr
ca3148059b
* transcode.c (econv_description): show ECONV_HTML_TEXT_ENCODER and
...
ECONV_HTML_ATTR_ENCODER.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19188 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-09-06 11:11:21 +00:00
akr
e4b70ffe43
* transcode.c (rb_econv_binmode): check actual transcoders.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19187 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-09-06 11:07:01 +00:00
akr
f88c9f03f7
* transcode.c (rb_econv_open): fix last_tc.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19186 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-09-06 10:54:59 +00:00
akr
683eec7a5d
* io.c (rb_io_binmode): clear newline flags in writeconv_pre_ecflags.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19185 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-09-06 10:37:02 +00:00
akr
f10af82d25
* transcode.c (str_transcode0): check ECONV_HTML_TEXT_ENCODER and
...
ECONV_HTML_ATTR_ENCODER.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19184 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-09-06 09:48:32 +00:00
akr
987ec6b787
* transcode.c (allocate_converted_string): fix overflow condition.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19183 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-09-06 09:39:12 +00:00
nobu
4865967070
eol-style
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19182 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-09-06 07:56:48 +00:00
akr
e490d92548
* transcode.c (sym_html): new variable.
...
(sym_text): ditto.
(sym_attr): ditto.
(econv_opts): check :html=>:text and :html=>:attr.
(Init_transcode): initialize the above variables.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19180 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-09-06 06:07:34 +00:00
akr
34be4c1ce5
* include/ruby/encoding.h (ECONV_HTML_TEXT_ENCODER): new constant.
...
(ECONV_HTML_ATTR_ENCODER): ditto.
* transcode.c (rb_econv_open): check ECONV_HTML_TEXT_ENCODER and
ECONV_HTML_ATTR_ENCODER.
(Init_transcode): Encoding::Converter::HTML_TEXT_ENCODER and
Encoding::Converter::HTML_ATTR_ENCODER defined.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19179 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-09-06 05:47:30 +00:00
akr
5117020d9e
* transcode.c (struct trans_open_t): defined to pass num_additional.
...
(trans_open_i): use struct trans_open_t.
(rb_econv_open): ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19178 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-09-06 05:16:40 +00:00
akr
9f687d7be9
* enc/trans/escape.trans (fun_so_escape_html_attr): fix return type.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19177 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-09-06 04:43:39 +00:00
akr
27e9c48ccc
* transcode.c (rb_econv_open): needless branch removed.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19176 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-09-06 03:44:31 +00:00
akr
073bced367
* transcode.c (rb_econv_open): test condition simplified.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19175 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-09-06 03:38:59 +00:00
akr
393f57670f
* transcode.c (stateless_encoding_i): ignore supplemental conversions.
...
Encoding::Converter.stateless_encoding("html-attr-escaped") should be
nil.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19174 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-09-06 03:26:35 +00:00
akr
091171a286
* enc/trans/escape.trans (escape_html_attr_init): new function.
...
(fun_so_escape_html_attr): new function.
(escape_html_attr_finish): new function.
(rb_escape_html_attr): use them to quote the converted result.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19173 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-09-06 03:20:51 +00:00
akr
d90ab4c09b
add a test.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19172 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-09-05 23:27:51 +00:00
matz
7a04666b3c
* bignum.c (bigdivrem1): optimization by skipping zeros at the
...
tail of digits. a patch from TOYOFUKU Chikanobu
<nobu_toyofuku at nifty.com> in [ruby-dev:36169].
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19171 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-09-05 23:25:13 +00:00
akr
c8573378f6
comment updated.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19170 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-09-05 23:17:11 +00:00
tadf
803aafe7c4
* complex.c: uses f_real_p macro.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19169 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-09-05 22:55:35 +00:00
akr
7d048a55ee
fix a test for previous commit.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19168 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-09-05 22:33:38 +00:00
akr
0be34e2a49
* transcode.c (rb_econv_open): fail for ASCII incompatible with
...
newline conversion.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19167 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-09-05 22:27:46 +00:00
akr
d4384f1230
* io.c (rb_io_extract_modeenc): raise an error for ASCII incompatible
...
encoding without binmode.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19166 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-09-05 22:26:39 +00:00
akr
a10a5ddaac
* enc/trans/escape.trans: new file.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19165 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-09-05 21:29:12 +00:00
akr
fb9c53dea5
* tool/transcode-tblgen.rb (StrSet.parse): accept upper case
...
hexadecimal digits.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19164 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-09-05 21:24:42 +00:00