summaryrefslogtreecommitdiffstats
path: root/test
Commit message (Collapse)AuthorAgeFilesLines
* * vm_method.c (rb_remove_method_id): exported.nobu2009-08-271-0/+1
| | | | | | | * numeric.c (num_sadded): fix for non-ascii method name. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@24684 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * re.c (rb_reg_preprocess_dregexp): set encoding as ASCII-8BITnaruse2009-08-271-0/+1
| | | | | | when /n is specified and the embeded string is escaped text. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@24683 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/strscan/strscan.c (strscan_set_string): set string should not benobu2009-08-261-0/+20
| | | | | | | | | dupped or frozen, because freezing it causes #concat method failure, and unnecessary to dup without freezing. a patch from Aaron Patterson at [ruby-core:25145]. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@24679 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * random.c (random_rand): fixed for edge cases of ranges.nobu2009-08-261-0/+8
| | | | | | | [ruby-dev:39166] git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@24674 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * random.c (random_rand): unified random_int and random_float.nobu2009-08-261-44/+50
| | | | | | | | [ruby-dev:39158]. and fixes [ruby-core:24655], [ruby-core:24677], [ruby-core:24679]. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@24670 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/test_tempfile.rb: merged from Hongli Lai's fork.nobu2009-08-261-4/+257
| | | | | | | cf [ruby-core:25131]. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@24667 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/rss/maker/base.rb, test/rss/test_maker_2.0.rb: fix a bugkou2009-08-241-0/+20
| | | | | | | | that RSS Maker doesn't accept 'false' as guid's isPermaLink. Reported by Joe Holt. Thanks!!! git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@24639 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * enumerator.c (ary2sv): add dup argument.akr2009-08-211-0/+22
| | | | | | | | | | | (enumerator_next): call ary2sv with dup=0. (enumerator_peek): call ary2sv with dup=1 to return duplicated array. (enumerator_peek_values_m): new function to return duplicated array. (Init_Enumerator): use enumerator_peek_values_m as Enumerator#peek_value. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@24619 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Change modestr syntax for BOM to "BOM|UTF-*".naruse2009-08-211-1/+1
| | | | | | | | | * io .c (rb_io_fmode_modestr): change modestr syntax for BOM to "BOM|UTF-*". * io.c (parse_mode_enc): ditto. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@24605 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * enumerator.c (next_init): don't clear feedvalue.akr2009-08-191-0/+34
| | | | git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@24588 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * enumerator.c: implement Enumerator#{next_values,peek_values,feed}akr2009-08-191-0/+125
| | | | | | | | | | | | | | | | | | | | | | and StopIteration#result. [ruby-dev:39109] (struct enumerator): replace no_next by stop_exc. new field feedvalue. (enumerator_mark): mark feedvalue and stop_exc. (enumerator_init): initialize feedvalue and stop_exc. (enumerator_init_copy): initialize feedvalue. (next_ii): send yield arguments as an array. return feedvalue. (next_i): generate StopIteration exception here. set result. (next_init): initialize feedvalue. (enumerator_next_values): new method Enumerator#next_values. (ary2sv): new function. (enumerator_peek_values): new method Enumerator#peek_values. (enumerator_feed): new method Enumerator#feed. (yielder_yield): return the yield value. (generator_each): return the iterator value. (stop_result): new method StopIteration#result. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@24587 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/ruby/test_settracefunc.rb (test_return, test_return2): add twomame2009-08-181-0/+83
| | | | | | tests for [ruby-dev:38701] and [ruby-core:24463]. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@24581 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * enumerator.c (enumerator_peek): new method Enumerator#peek. akr2009-08-181-0/+22
| | | | | | | | (enumerator_next): don't rewind at end. [ruby-dev:38932] git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@24578 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Tue Aug 18 13:46:14 2009 TAKANO Mitsuhiro (takano32) <tak@no32.tk>takano322009-08-181-0/+0
| | | | | | | | * touch test/rdoc/empty.dat to run test_rdoc_parser.rb git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@24575 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * vm_insnhelper.c (vm_call_cfunc): ensure hook c-return.wanabe2009-08-181-0/+2
| | | | | | | | | | [Bug #1588] * test/ruby/test_settracefunc.rb (TestSetTraceFunc#test_raise): follow above. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@24574 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * range.c (range_step): treat symbols specially so that iteratingmatz2009-08-171-0/+4
| | | | | | | | over symbols should work like strings. [ruby-core:24780] * range.c (range_each): ditto. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@24573 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * range.c (range_each): should honor to_str conversion.matz2009-08-171-0/+3
| | | | git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@24571 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * parse.y (lex_get_str, lex_io_gets, rb_parser_compile_string):nobu2009-08-171-0/+7
| | | | | | | must be ascii compatible. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@24569 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/date/format.rb (strptime): removed \v; since \s includes \v.tadf2009-08-161-0/+15
| | | | git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@24566 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * complex.c (nucomp_rationalize) added. [experimental]tadf2009-08-161-0/+55
| | | | | | | | * rational.c ({nurat,nilclass,integer,float}_rationalize) ditto. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@24565 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * string.c (rb_str_upto): generate numerical sequence whenmatz2009-08-161-0/+6
| | | | | | characters in both edges are all digits. [ruby-talk:343186] git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@24562 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * parse.y (yylex): should dispatch scan-event even when followsnobu2009-08-161-0/+5
| | | | | | | just after delayed-token. [ruby-dev:37855] [Bug #1071] git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@24557 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* rescue Encoding::ConverterNotFoundError.naruse2009-08-161-2/+6
| | | | git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@24554 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * regparse.c (add_ctype_to_cc_by_range): fix the firstnaruse2009-08-151-0/+6
| | | | | | | | | character bigger than sb_out was dropped. * test/ruby/test_regexp.rb (TestRegexp#test_posix_bracket): add tests for above. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@24546 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* \d, \s and \w are now non Unicode class. [ruby-dev:39026]naruse2009-08-151-0/+7
| | | | | | | | | | | | | | | | | | | | * include/ruby/oniguruma.h (ONIGENC_CTYPE_SPECIAL_MASK): added. (ONIGENC_CTYPE_D): ditto. (ONIGENC_CTYPE_S): ditto. (ONIGENC_CTYPE_W): ditto. * regparse.c: \d, \s and \w are now non Unicode class. [ruby-dev:39026] (fetch_token_in_cc): use ONIGENC_CTYPE_[DSW] for \d/\s/\w. (fetch_token): ditto. (add_ctype_to_cc): add routines for ONIGENC_CTYPE_[DSW]. (parse_exp): ditto. * test/ruby/test_regexp.rb (TestRegexp#test_char_class): add tests for above. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@24544 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * re.c (rb_reg_preprocess_dregexp): change Exception class tonaruse2009-08-141-7/+7
| | | | | | | | | | RegexpError. * test/ruby/test_m17n.rb (test_regexp_usascii): follow above. * test/ruby/test_m17n.rb (test_regexp_embed): ditto. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@24539 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/ruby/test_marshal.rb (test_class_nonascii): test for non-ascii name ↵nobu2009-08-121-0/+6
| | | | | | class. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@24514 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * class.c (rb_define_class_id_under, rb_define_module_id_under):nobu2009-08-121-0/+7
| | | | | | | | | | | | new functions to define a nested class/module with non-ascii name. * struct.c (make_struct): use name with encoding. * struct.c (inspect_struct): ditto. [ruby-core:24849] git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@24513 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/ruby/test_struct.rb (test_inspect): use assert_match.nobu2009-08-121-1/+1
| | | | git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@24512 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * string.c (rb_str_new_frozen): must not change encoding of frozennobu2009-08-121-0/+13
| | | | | | | shared string. [ruby-dev:39068] git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@24509 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * encoding.c (rb_enc_compatible): If a string is empty andnaruse2009-08-111-0/+2
| | | | | | | other's encoding is US-ASCII, returns the empty string's encoding. [ruby-list:46274] git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@24506 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/ruby/test_rubyoptions.rb (test_shebang): fix for new behavior.nobu2009-08-111-2/+2
| | | | git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@24501 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/date.rb (complete_frags): Monday must be suitable for %W'stadf2009-08-111-1/+1
| | | | | | | | default day. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@24500 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* New API Encoding#ascii_compatible?.naruse2009-08-081-0/+7
| | | | | | | * encoding.c (enc_ascii_compatible_p): added. [ruby-core:24793] (Init_Encoding): New API Encoding#ascii_compatible?. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@24480 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * marshal.c (w_symbol r_symlink, r_symbol, r_object0): fix fornobu2009-08-071-0/+6
| | | | | | | | non-ascii symbols. loading such symbols can cause segfaults in older versions. [ruby-core:24788] git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@24443 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/mkmf/base.rb (TestMkmf): was turned into a class, becausenobu2009-08-062-5/+10
| | | | | | | MiniUnit doesn't complain even if a testcase has no tests. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@24420 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/mkmf/base.rb: split from test_sizeof.rb.nobu2009-08-062-19/+34
| | | | git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@24419 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/mkmf.rb (check_sizeof): added optional compiler optionnobu2009-08-061-0/+27
| | | | | | | | | | argument. [ruby-core:24785] * lib/mkmf.rb (create_makefile): suppressed shadowing outer local variable warnings. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@24418 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ruby.c (load_file_internal): assumes -x flag if no "ruby" is innobu2009-08-051-0/+12
| | | | | | | the shebang line. [ruby-dev:39015] git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@24410 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * range.c (range_eql, range_eq): fixed equality to work formatz2009-08-051-0/+4
| | | | | | | | | subclasses of Range. a patch from Marc-Andre Lafortune. [ruby-core:22190] * test/ruby/test_range.rb: add assertions for above. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@24405 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Fix test for previous commit.naruse2009-08-051-1/+1
| | | | git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@24399 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/pp.rb (guard_inspect_key): untrust internal hash to preventmame2009-08-041-0/+36
| | | | | | | | unexpected SecurityError. * test/ruby/test_object.rb: add a test for [ruby-dev:38982]. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@24396 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * random.c (rb_random_int): arguments have to be converted tonobu2009-08-021-0/+1
| | | | | | | integer. [ruby-core:24679] git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@24358 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/ruby/test_rand.rb: add tests for Random#float's rejectionmame2009-08-021-0/+3
| | | | | | against Infinity and NaN. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@24354 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * random.c (rand_int): prevent from GC.nobu2009-08-021-1/+12
| | | | git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@24353 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/ruby/test_module.rb (test_ancestors, test_included_modules):mame2009-07-301-4/+10
| | | | | | | ignore rake mixins. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@24331 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/ruby/test_rand.rb: add tests for Random class.mame2009-07-301-0/+190
| | | | git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@24326 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * transcode.c: added check for frozen string for encode! (see Bug #1836)duerst2009-07-301-0/+2
| | | | | | | * test/ruby/test_transcode.rb: added tests for the above git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@24322 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * insns.def (defineclass): preserve encoding of class/modulenobu2009-07-302-0/+15
| | | | | | | | | | names. [ruby-core:24600] * variable.c (rb_set_class_path_string): set class path with a string value. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@24321 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* add a test.xibbar2009-07-301-0/+5
| | | | git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@24319 b2dd03c8-39d4-4d8f-98ff-823fe69b080e