mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
Merge trivial changes to reduce diffs from ruby_1_8.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8_6@11798 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
bfdd14d505
commit
e745f9b270
4 changed files with 14 additions and 17 deletions
2
dir.c
2
dir.c
|
@ -1061,7 +1061,7 @@ find_dirsep(const char *s, int flags)
|
|||
return (char *)p-1;
|
||||
}
|
||||
|
||||
/* Remove escaping baskclashes */
|
||||
/* Remove escaping baskslashes */
|
||||
static void
|
||||
remove_backslashes(p)
|
||||
char *p;
|
||||
|
|
|
@ -398,8 +398,7 @@ class OptionParser
|
|||
self
|
||||
end
|
||||
|
||||
# :nodoc:
|
||||
def add_banner(to)
|
||||
def add_banner(to) # :nodoc:
|
||||
unless @short or @long
|
||||
s = desc.join
|
||||
to << " [" + s + "]..." unless s.empty?
|
||||
|
@ -407,8 +406,7 @@ class OptionParser
|
|||
to
|
||||
end
|
||||
|
||||
# :nodoc:
|
||||
def match_nonswitch?(str)
|
||||
def match_nonswitch?(str) # :nodoc:
|
||||
@pattern =~ str unless @short or @long
|
||||
end
|
||||
|
||||
|
@ -643,8 +641,7 @@ class OptionParser
|
|||
end
|
||||
end
|
||||
|
||||
# :nodoc:
|
||||
def add_banner(to)
|
||||
def add_banner(to) # :nodoc:
|
||||
list.each do |opt|
|
||||
if opt.respond_to?(:add_banner)
|
||||
opt.add_banner(to)
|
||||
|
@ -1244,8 +1241,7 @@ class OptionParser
|
|||
parse_in_order(argv, &nonopt)
|
||||
end
|
||||
|
||||
# :nodoc:
|
||||
def parse_in_order(argv = default_argv, setter = nil, &nonopt)
|
||||
def parse_in_order(argv = default_argv, setter = nil, &nonopt) # :nodoc:
|
||||
opt, arg, sw, val, rest = nil
|
||||
nonopt ||= proc {|arg| throw :terminate, arg}
|
||||
argv.unshift(arg) if arg = catch(:terminate) {
|
||||
|
|
3
pack.c
3
pack.c
|
@ -1402,7 +1402,6 @@ pack_unpack(str, fmt)
|
|||
s += len;
|
||||
break;
|
||||
|
||||
|
||||
case 'b':
|
||||
{
|
||||
VALUE bitstr;
|
||||
|
@ -1562,6 +1561,7 @@ pack_unpack(str, fmt)
|
|||
}
|
||||
PACK_ITEM_ADJUST();
|
||||
break;
|
||||
|
||||
case 'L':
|
||||
PACK_LENGTH_ADJUST(unsigned long,4);
|
||||
while (len-- > 0) {
|
||||
|
@ -1582,6 +1582,7 @@ pack_unpack(str, fmt)
|
|||
}
|
||||
PACK_ITEM_ADJUST();
|
||||
break;
|
||||
|
||||
case 'Q':
|
||||
PACK_LENGTH_ADJUST_SIZE(QUAD_SIZE);
|
||||
while (len-- > 0) {
|
||||
|
|
12
parse.y
12
parse.y
|
@ -83,11 +83,11 @@ static int yyerror();
|
|||
|
||||
static enum lex_state {
|
||||
EXPR_BEG, /* ignore newline, +/- is a sign. */
|
||||
EXPR_END, /* newline significant, +/- is a operator. */
|
||||
EXPR_ARG, /* newline significant, +/- is a operator. */
|
||||
EXPR_CMDARG, /* newline significant, +/- is a operator. */
|
||||
EXPR_ENDARG, /* newline significant, +/- is a operator. */
|
||||
EXPR_MID, /* newline significant, +/- is a operator. */
|
||||
EXPR_END, /* newline significant, +/- is an operator. */
|
||||
EXPR_ARG, /* newline significant, +/- is an operator. */
|
||||
EXPR_CMDARG, /* newline significant, +/- is an operator. */
|
||||
EXPR_ENDARG, /* newline significant, +/- is an operator. */
|
||||
EXPR_MID, /* newline significant, +/- is an operator. */
|
||||
EXPR_FNAME, /* ignore newline, no reserved words. */
|
||||
EXPR_DOT, /* right after `.' or `::', no reserved words. */
|
||||
EXPR_CLASS, /* immediate after `class', no here document. */
|
||||
|
@ -6105,7 +6105,7 @@ rb_id2name(id)
|
|||
char *name;
|
||||
|
||||
if (id < tLAST_TOKEN) {
|
||||
int i = 0;
|
||||
int i;
|
||||
|
||||
for (i=0; op_tbl[i].token; i++) {
|
||||
if (op_tbl[i].token == id)
|
||||
|
|
Loading…
Add table
Reference in a new issue