| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
coverage measurement.
* thread.c (rb_get_coverages): rename and move from vm.c.
* vm.c (rb_vm_get_coverages): ditto.
* iseq.c (prepare_iseq_build): ditto.
* thread.c (clear_coverage): ditto.
* parse.y (coverage): ditto.
* ext/coverage/coverage.c: use above functions, add new method
Coverage.start and fix rdoc .
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@17961 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
klass during measurement.
* parse.y (coverage, yycompile0): ditto.
* iseq.c (prepare_iseq_build): use rb_hash_lookup instead of
rb_hash_aref.
* thread.c (rb_coverage_result): restore klass of coverage array and
return it.
* theaad.c (update_coverage): chcek whether its klass is 0.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@17959 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* iseq.c (prepare_iseq_build): add prototype.
* parse.y (coverage): ditto.
* thread.c (clear_coverage): ditto.
* thread.c (update_coverage): use rb_sourceline.
* thread.c (rb_get_coverages): rename and move to vm.c.
* vm.c (rb_vm_get_coverages): ditto.
* ext/coverage/coverage.c: add rdoc.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@17859 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
COVERAGE__ and introduce coverage.so instead. How to measure
coverage: (1) require "coverage.so", (2) require or load Ruby source
file, and (3) Coverage.result will return the same hash as COVERAGE__.
[ruby-dev:35324]
* thread.c (rb_enable_coverages): start coverage measurement by using
rb_add_event_hook.
* thread.c (rb_get_coverages): returns current results of coverage
measurement.
* include/ruby/intern.h: add prototype for above two functions.
* vm_core.h, vm.c: add field of coverages to rb_vm_t.
* insns.def (trace): remove special handling for COVERAGE__.
* iseq.c (prepare_iseq_build): switch COVERAGE__ to
rb_get_coverages().
* parse.y (coverage): ditto.
* thread.c (clear_coverage): ditto.
* lib/coverage.rb: use coverage.so instead of COVERAGE__.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@17857 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
for casual use. Usage: (1) assign {} to COVERAGE__, (2) require or
load Ruby source file, and (3) COVERAGE__["sourcefilepath"] will
return an array whose elements represent number of executions per
line of source code.
* vm_core.h: add field of coverage array to iseq.
* iseq.c (prepare_iseq_build): ditto.
* insns.def (trace): update coverage array.
* parse.y (coverage): create and initialize coverage array.
* compile.h (ADD_TRACE): add trace instruction to update covearge
array.
* thread.c (clear_coverage): delete coverage array when forking.
Otherwise, double count of coverage may occur.
* lib/coverage.rb: sample coverage measurement tool.
* error.c: distinguish explicitly between parse_in_eval and
mild_compile_error.
* load.c: ditto.
* vm_eval.c: ditto.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@17781 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
comma at end of enumerator list
* include/ruby/ruby.h (enum ruby_value_type): ditto.
* eval_intern.h (enum): ditto.
* vm_core.h (enum rb_thread_status): ditto.
* parse.y (enum lex_state_e): ditto.
* parse.y (enum string_type): ditto.
* process.c (enum): ditto.
* ruby.c (enum dump_flag_bits): ditto.
* ruby.c (enum disable_flag_bits): ditto.
* compile.c (iseq_link_element): ditto
* debug.c (union): ditto.
* cont.c (enum context_type): ditto.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@17766 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
| |
cf [ruby-dev:35227]
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@17611 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
| |
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@17574 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
| |
like function. see <http://d.hatena.ne.jp/ku-ma-me/20080624/p1>.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@17573 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
|
| |
* parse.y (parser_yylex): unified warnings at space between method
name and argument parenthese. [ruby-dev:33943]
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@17499 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
| |
* *.c: no cache in init functions.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@17053 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
| |
error message was output, which might cause null pointer access.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@16484 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
| |
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@16440 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
| |
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@16425 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
|
| |
converting to float. overflow is a nature of float values.
* parse.y (parser_yylex): ditto.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@16424 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
| |
parsed as "a += (b rescue c)" just like normal assignment.
[ruby-talk:301000]
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@16336 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
| |
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@16329 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
use iseq instead of NODE.
* gc.c (source_filenames): removed.
* include/ruby/intern.h, parse.y (yycompile, parser_mark, parser_free,
ripper_initialize): rb_source_filename() is no longer used.
* compile.c, compile.h (ERROR_ARGS), parse.y (node_newnode, fixpos,
parser_warn, e_option_supplied, warn_unless_e_option, range_op,
cond0): nd_file is no longer used.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@15983 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
|
|
| |
file's SCRIPT_LINES__ storage, instead of appending source lines
every time a file is re-loaded; submitted by Rocky Bernstein in
#18517.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@15831 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
| |
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@15793 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
| |
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@15686 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
|
|
|
|
|
| |
* parse.y (rb_intern3): non ASCII compatible symbols.
* re.c (rb_reg_regsub): add encoding check.
* string.c (rb_str_chomp_bang): ditto.
* test/ruby/test_utf16.rb (TestUTF16::test_chomp): raises exception.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@15640 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
| |
definition. [ruby-list:44479]
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@15638 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
| |
[ruby-core:15660]
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@15609 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
| |
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@15608 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
| |
to denote its a flag. [ruby-core:15529]
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@15537 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
|
| |
* string.c (rb_str_plus, srb_str_times): keep coderange.
* parse.y (STR_NEW0) use rb_usascii_str_new.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@15519 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
| |
exception before rb_reg_compile.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@15479 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
| |
rb_reg_compile() to one from reg_fragment_setenc().
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@15475 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
| |
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@15452 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
| |
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@15451 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
| |
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@15450 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
| |
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@15449 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
| |
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@15448 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
| |
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@15447 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
| |
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@15445 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
| |
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@15444 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
|
|
|
|
| |
hash comparison function.
* hash.c (rb_any_cmp): use rb_str_hash_cmp().
* string.c (rb_str_casecmp): should return nil for incompatible
comparison.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@15441 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
case (e.g. (?a ..?z).include(?x)) for performance.
[ruby-core:15481]
* string.c (rb_str_upto): specialize single character case.
* string.c (rb_str_hash): omit coderange scan for performance.
* object.c (rb_check_to_integer): check Fixnum first.
* object.c (rb_to_integer): ditto.
* string.c (rb_str_equal): inline memcmp to avoid unnecessary
rb_str_comparable().
* parse.y (rb_intern2): use US-ASCII encoding.
* parse.y (rb_intern_str): ditto.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@15433 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
| |
[ruby-dev:33592]
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@15373 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
| |
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@15349 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
|
|
|
|
|
| |
* parse.y (reg_fragment_check_len, reg_compile_gen): no need such
trick.
[ruby-dev:33399]
* test/ruby/test_m17n.rb (test_regexp_usacii_literal): add tests.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@15304 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
| |
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@15295 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
| |
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@15292 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
|
| |
US-ASCII script is UTF-8. [ruby-dev:33406]
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@15285 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
| |
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@15282 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
inline functions.
(onigenc_mbclen_charfound): removed.
(onigenc_mbclen_needmore): removed.
(onigenc_mbclen_recover): removed.
(ONIGENC_MBCLEN_CHARFOUND): removed.
(ONIGENC_MBCLEN_CHARFOUND_P): defined.
(ONIGENC_MBCLEN_CHARFOUND_LEN): defined.
(ONIGENC_MBCLEN_INVALID): removed.
(ONIGENC_MBCLEN_INVALID_P): defined.
(ONIGENC_MBCLEN_NEEDMORE): removed.
(ONIGENC_MBCLEN_NEEDMORE_P): defined.
(ONIGENC_MBCLEN_NEEDMORE_LEN): defined.
(ONIGENC_MBC_ENC_LEN): use onigenc_mbclen_approximate.
* regenc.c (onigenc_mbclen_approximate): defined.
* include/ruby/encoding.h (MBCLEN_CHARFOUND): removed.
(MBCLEN_INVALID): removed.
(MBCLEN_NEEDMORE): removed.
(MBCLEN_CHARFOUND_P): defined.
(MBCLEN_INVALID_P): defined.
(MBCLEN_NEEDMORE_P): defined.
(MBCLEN_CHARFOUND_LEN): defined.
(MBCLEN_NEEDMORE_LEN): defined.
* encoding.c: use new API.
* re.c: ditto.
* string.c: ditto.
* parse.y: ditto.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@15280 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
| |
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@15279 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
| |
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@15256 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* ruby.c (load_file): ditto.
* ruby.c (process_options): set script encoding of -e from locale
except when -K is specified.
* ruby.c (load_file): set script encoding of stdin from locale except
when -K is specified. [ruby-dev:33375]
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@15246 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|