[bug:trunk] inconsistent warning: character class has duplicated range: /[aa]/

e$B0J2<$N$h$&$K!"e(B
exit;if a;end;/[aa]/
exit;/[aa]/
e$B$H$$$&$U$?$D$NJ8;zNs$re(B eval e$B$7$?$H$-!"A0<T$KBP$7$F$Oe(B
warning: character class has duplicated range: /[aa]/
e$B$H$$$&7Y9p$,=P$k$N$K!"8e<T$K$O=P$^$;$s!#e(B

% ./ruby -w -e ‘eval(“exit;if a;end;/[aa]/”)’
(eval):1: warning: character class has duplicated range: /[aa]/
% ./ruby -w -e ‘eval(“exit;/[aa]/”)’
% ./ruby -v
ruby 1.9.2dev (2010-01-27 trunk 26450) [i686-linux]

e$B$^$?!“e(Beval e$B$G$J$/D>@\M?$($?$H$-$O!”$I$A$i$G$b7Y9p$5$l$^$9!#e(B

% ./ruby -w -e ‘exit;if a;end;/[aa]/’
-e:1: warning: character class has duplicated range: /[aa]/
% ./ruby -w -e ‘exit;/[aa]/’
-e:1: warning: character class has duplicated range: /[aa]/

e$B$3$l$O$J$K$+JQ$J5$$,$9$k$s$G$9$,$$$+$,$G$7$g$&e(B?

2010e$BG/e(B1e$B7ne(B28e$BF|e(B1:49 Tanaka A. [email protected]:

e$B0J2<$N$h$&$K!"e(B
exit;if a;end;/[aa]/
exit;/[aa]/
e$B$H$$$&$U$?$D$NJ8;zNs$re(B eval e$B$7$?$H$-!"A0<T$KBP$7$F$Oe(B
warning: character class has duplicated range: /[aa]/
e$B$H$$$&7Y9p$,=P$k$N$K!"8e<T$K$O=P$^$;$s!#e(B

valgrind
e$B$G0J2<$N$h$&$J$N$,=P$F$/$k$s$G$9$,!"$b$7$+$9$k$H$3$l$G$9$+$M!#e(B

% valgrind ./ruby -w -e ‘exit;/[aa]/’
==7830== Memcheck, a memory error detector.
==7830== Copyright © 2002-2007, and GNU GPL’d, by Julian Seward et al.
==7830== Using LibVEX rev 1854, a library for dynamic binary
translation.
==7830== Copyright © 2004-2007, and GNU GPL’d, by OpenWorks LLP.
==7830== Using valgrind-3.3.1-Debian, a dynamic binary instrumentation
framework.
==7830== Copyright © 2000-2007, and GNU GPL’d, by Julian Seward et al.
==7830== For more details, rerun with: -v
==7830==
==7830== Conditional jump or move depends on uninitialised value(s)
==7830== at 0x80E04DF: CC_DUP_WARN (regparse.c:2892)
==7830== by 0x80E42E8: next_state_val (regparse.c:4186)
==7830== by 0x80E4F73: parse_char_class (regparse.c:4555)
==7830== by 0x80E6B57: parse_exp (regparse.c:5388)
==7830== by 0x80E7083: parse_branch (regparse.c:5544)
==7830== by 0x80E71EE: parse_subexp (regparse.c:5587)
==7830== by 0x80E73A5: parse_regexp (regparse.c:5635)
==7830== by 0x80E7457: onig_parse_make_tree (regparse.c:5662)
==7830== by 0x80D0C0A: onig_compile (regcomp.c:5391)
==7830== by 0x80C0A3F: make_regexp (re.c:755)
==7830== by 0x80C41DA: rb_reg_initialize (re.c:2376)
==7830== by 0x80C4360: rb_reg_initialize_str (re.c:2402)
-e:1: warning: character class has duplicated range: /[aa]/
==7830==
==7830== ERROR SUMMARY: 1 errors from 1 contexts (suppressed: 29 from 1)
==7830== malloc/free: in use at exit: 1,341,790 bytes in 14,652 blocks.
==7830== malloc/free: 15,913 allocs, 1,261 frees, 1,643,306 bytes
allocated.
==7830== For counts of detected errors, rerun with: -v
==7830== searching for pointers to 14,652 not-freed blocks.
==7830== checked 855,696 bytes.
==7830==
==7830== LEAK SUMMARY:
==7830== definitely lost: 20 bytes in 2 blocks.
==7830== possibly lost: 0 bytes in 0 blocks.
==7830== still reachable: 1,341,770 bytes in 14,650 blocks.
==7830== suppressed: 0 bytes in 0 blocks.
==7830== Rerun with --leak-check=full to see details of leaked memory.

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs