mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
7194b66fb2
* eval.c (jump_tag_but_local_jump): preserve retval in LocalJumpError exceptions. * parse.y (command): no more check for "super outside of method". * eval.c (rb_mod_define_method): should set last_class and last_func in the block->frame. * eval.c (error_handle): should handle TAG_THROW as well. * parse.y (yylex): new decimal notation '0d4567'. * parse.y (yylex): new octal notation '0o777'. * parse.y (string_content): every string_content node should return string only. use NODE_EVSTR to coercing. * eval.c (rb_eval): NODE_EVSTR support. * re.c (rb_reg_quote): avoid unnecessary string allocation. * string.c (get_pat): quote metachracters before compiling a string into a regex. * string.c (rb_str_split_m): special treatment of strings of size 1, but AWK emulation. now uses get_pat(). * string.c (rb_str_match_m): quote metacharacters. * string.c (rb_str_match2): ditto. * ext/socket/socket.c (sock_addrinfo): make all 3 versions of getaddrinfo happy. [ruby-core:00184] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2654 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
42 lines
922 B
C
42 lines
922 B
C
/**********************************************************************
|
|
|
|
re.h -
|
|
|
|
$Author$
|
|
$Date$
|
|
created at: Thu Sep 30 14:18:32 JST 1993
|
|
|
|
Copyright (C) 1993-2002 Yukihiro Matsumoto
|
|
|
|
**********************************************************************/
|
|
|
|
#ifndef RE_H
|
|
#define RE_H
|
|
|
|
#include <sys/types.h>
|
|
#include <stdio.h>
|
|
|
|
#include "regex.h"
|
|
|
|
typedef struct re_pattern_buffer Regexp;
|
|
|
|
struct RMatch {
|
|
struct RBasic basic;
|
|
VALUE str;
|
|
struct re_registers *regs;
|
|
};
|
|
|
|
#define RMATCH(obj) (R_CAST(RMatch)(obj))
|
|
|
|
VALUE rb_reg_regcomp _((VALUE));
|
|
int rb_reg_search _((VALUE, VALUE, int, int));
|
|
VALUE rb_reg_regsub _((VALUE, VALUE, struct re_registers *));
|
|
int rb_reg_adjust_startpos _((VALUE, VALUE, int, int));
|
|
void rb_match_busy _((VALUE));
|
|
VALUE rb_reg_quote _((VALUE));
|
|
|
|
EXTERN int ruby_ignorecase;
|
|
|
|
int rb_reg_mbclen2 _((unsigned int, VALUE));
|
|
#define mbclen2(c,re) rb_reg_mbclen2((c),(re))
|
|
#endif
|