1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

*** empty log message ***

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/v1_1r@84 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
matz 1998-02-20 02:10:36 +00:00
parent 9c1657f302
commit 869a0bb90a
5 changed files with 54 additions and 6 deletions

View file

@ -1,3 +1,18 @@
Fri Feb 20 10:17:51 1998 Yukihiro Matsumoto <matz@netlab.co.jp>
* parse.y (stmt): if/unless modifiers returns nil, if condition is
not established.
Thu Feb 19 11:06:47 1998 Yukihiro Matsumoto <matz@netlab.co.jp>
* ext/kconv/kconv.c (kconv_kconv): charcode can be specified by
code name (JIS, SJIS, EUC like value of $KCODE).
* regex.c (re_compile_pattern): forgot to fixup_jump for (?:..).
* regex.c (re_compile_pattern): needed to clear pending_exact on
non-registering grouping (?:...).
Wed Feb 18 18:45:10 1998 WATANABE Hirofumi <watanabe@ase.ptg.sony.co.jp>
* patches for cygwin32 applied.

View file

@ -1787,6 +1787,20 @@ kconv_kconv(argc, argv)
if (NIL_P(out)) {
out_code = _JIS;
}
else if (TYPE(out) == T_STRING) {
switch (RSTRING(out)->ptr[0]) {
case 'E': case 'e':
out_code = _EUC;
break;
case 'S': case 's':
out_code = _SJIS;
break;
case 'J': case 'j':
default:
out_code = _JIS;
break;
}
}
else {
out_code = NUM2INT(out);
if (out_code == _NOCONV) return (VALUE)src;
@ -1794,6 +1808,22 @@ kconv_kconv(argc, argv)
if (NIL_P(in)) {
in_code = _AUTO;
}
else if (TYPE(in) == T_STRING) {
switch (RSTRING(in)->ptr[0]) {
case 'E': case 'e':
in_code = _EUC;
break;
case 'S': case 's':
in_code = _SJIS;
break;
case 'J': case 'j':
in_code = _JIS;
break;
default:
in_code = _AUTO;
break;
}
}
else {
in_code = NUM2INT(in);
if (in_code == _NOCONV) return (VALUE)src;

View file

@ -14,16 +14,14 @@ if ENV['SERVER_SOFTWARE'] =~ /^Microsoft-/ then
Dir.chdir ENV['PATH_TRANSLATED'].sub(/[^\\]+$/, '')
end
require "shellwords.rb"
class CGI
include Shellwords
attr("inputs")
# original is CGI.pm
def read_from_cmdline
words = shellwords(if not ARGV.empty? then
require "shellwords.rb"
words = Shellwords.shellwords(if not ARGV.empty? then
ARGV.join(' ')
else
print "(offline mode: enter name=value pairs on standard input)\n"

View file

@ -303,12 +303,14 @@ stmt : iterator iter_do_block
| stmt kIF_MOD expr
{
value_expr($3);
$$ = node_newnode(NODE_AND, cond($3), $1);
$$ = NEW_IF(cond($3), $1, 0);
fixpos($$, $3);
}
| stmt kUNLESS_MOD expr
{
value_expr($3);
$$ = node_newnode(NODE_OR, cond($3), $1);
$$ = NEW_UNLESS(cond($3), $1, 0);
fixpos($$, $3);
}
| stmt kWHILE_MOD expr
{

View file

@ -1381,6 +1381,7 @@ re_compile_pattern(pattern, size, bufp)
break;
case ':':
pending_exact = 0;
default:
break;
}
@ -1417,6 +1418,8 @@ re_compile_pattern(pattern, size, bufp)
break;
case ':':
if (fixup_jump)
store_jump(fixup_jump, jump, b);
default:
break;
}