summaryrefslogtreecommitdiff
path: root/test
AgeCommit message (Collapse)Author
2012-11-06* enumerator.c (obj_to_enum): Have #to_enum accept a blockmarcandre
[Feature #6636] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37498 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-11-06* enumerator: New method #size; constructor accepts sizemarcandre
[Feature #6636] * include/ruby/intern.h: RETURN_SIZED_ENUMERATOR for support of sized enumerators git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37497 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-11-06* enumerator.c (enumerator_initialize): Warn when using deprecated formmarcandre
[Feature #6636] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37495 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-11-06* object.c (rb_mod_const_get): Fix constant missing exception classtenderlove
and message to maintain backwards compatibility. Constant search should start at Object when constant starts with '::' * test/ruby/test_module.rb: test for fixes git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37494 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-11-06* test/win32ole/test_win32ole.rb: follow other test files.usa
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37490 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-11-06* test/win32ole/test_win32ole.rb: now source encoding is UTF-8, sousa
binary strings in old scripts are dangerous. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37489 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-11-06* lib/net/protocol.rb (Net::InternetMessageIO#each_crlf_line):naruse
don't use /n in universal regexp. [ruby-dev:46394] [Bug #7278] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37487 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-11-06* string.c (rb_str_b): Add String#b, returning a copied stringnaruse
whose encoding is ASCII-8BIT. [ruby-dev:45992] [Feature #6767] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37486 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-11-06* ruby.c (load_file_internal): set default source encoding asnaruse
UTF-8 instead of US-ASCII. [ruby-core:46021] [Feature #6679] * parse.y (parser_initialize): set default parser encoding as UTF-8 instead of US-ASCII. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37485 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-11-05* test/ruby/test_require.rbshirosaki
(TestRequire#test_require_to_path_redefined_in_load_path, TestRequire#test_require_to_str_redefined_in_load_path): Suppress method redefined warning when test-all with RUBYOPT=-w. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37484 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-11-05Fix compatibility of cached expanded load pathshirosaki
* file.c (rb_get_path_check_to_string): extract from rb_get_path_check(). We change the spec not to call to_path of String object. * file.c (rb_get_path_check_convert): extract from rb_get_path_check(). * file.c (rb_get_path_check): follow the above change. * file.c (rb_file_expand_path_fast): remove check_expand_path_args(). Instead we call it in load.c. * file.c (rb_find_file_ext_safe): use rb_get_expanded_load_path() to reduce expand cost. * file.c (rb_find_file_safe): ditto. * internal.h (rb_get_expanded_load_path): add a declaration. * internal.h (rb_get_path_check_to_string, rb_get_path_check_convert): add declarations. * load.c (rb_construct_expanded_load_path): fix for compatibility. Same checks in rb_get_path_check() are added. We don't replace $LOAD_PATH and ensure that String object of $LOAD_PATH are frozen. We don't freeze non String object and expand it every times. We add arguments for expanding load path partially and checking if load path have relative paths or non String objects. * load.c (load_path_getcwd): get current working directory for checking if it's changed when getting load path. * load.c (rb_get_expanded_load_path): fix for rebuilding cache properly. We check if current working directory is changed and rebuild expanded load path cache. We expand paths which start with ~ (User HOME) and non String objects every times for compatibility. We make this accessible from other source files. * load.c (rb_feature_provided): call rb_get_path() since we changed rb_file_expand_path_fast() not to call it. * load.c (Init_load): initialize vm->load_path_check_cache. * vm.c (rb_vm_mark): mark vm->load_path_check_cache for GC. * vm_core.h (rb_vm_struct): add vm->load_path_check_cache to store data to check load path cache validity. * test/ruby/test_require.rb (TestRequire): add tests for require compatibility related to cached expanded load path. [ruby-core:47970] [Bug #7158] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37482 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-11-05* lib/cgi/core.rb: check if Tempfile is defined before use it.naruse
* lib/cgi/core.rb: remove tempfiles only if tempfiles exist git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37473 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-11-05Mon Nov 5 09:55:05 2012 Takeyuki FUJIOKA <xibbar@ruby-lang.org>xibbar
* lib/cgi/core.rb: remove tempfile more early. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37471 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-11-04Sun Nov 4 20:41:28 2012 Takeyuki FUJIOKA <xibbar@ruby-lang.org>xibbar
* lib/cgi.rb, lib/cgi/*/rb: rename CGI#header to CGI#http_header, add and update HTML5 tag generater. [Bug #7110] Patch provided by Marcus Stollsteimer, thank you ! git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37466 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-11-04* array.c (recursive_equal): fix to return true when self and otherglass
are resized to same size and the current index become out of range. * test/ruby/test_array.rb: add a test for the above. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37464 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-11-04dir.c: FNM_EXTGLOBnobu
* dir.c (file_s_fnmatch): match with expanding braces if FNM_EXTGLOB is set. [ruby-core:40037] [Feature #5422] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37463 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-11-03* lib/rexml/output.rb (REXML::Output): Don't output BOM in middlekou
of the output string. * test/rexml/test_document.rb: Add a test for the above change. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37450 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-11-03* test/rexml/test_document.rb: Fix tests that expect encoding namekou
isn't normalized. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37448 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-11-03Revert r37439 and r37441kou
r37439: * lib/rexml/xmldecl.rb (REXML::XMLDecl): Stop using REXML::Encoding module because XMLDecl doesn't convert encoding. This causes removing XML encoding name normalization (encoding.upcase). Encoding name in XML declaration is what user specifies. I think this is reasonable change. * test/rexml/test_xml_declaration.rb: Add tests for the above change. r37441: * test/rexml/test_core.rb (Tester#test_ticket_88): Follow the change that encoding name in XML declaration isn't normalized. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37446 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-11-03* test/rexml/test_encoding.rb (EncodingTester#test_in_different_out):kou
Fix a test that expects encoding in XML declaration is changed by Output's encoding. It is dropped feature. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37442 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-11-03* test/rexml/test_core.rb (Tester#test_ticket_88): Follow thekou
change that encoding name in XML declaration isn't normalized. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37441 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-11-03* lib/rexml/document.rb (REXML::Document#write): Document encodingkou
option. Now different encoding between XML file's encoding and XML declaration's encodiong is support. [Feature #4872] (work in progress) * lib/rexml/xmldecl.rb (REXML::XMLDecl#write): Always use XMLDecl's encoding. * test/rexml/test_document.rb: Update tests for the above change. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37440 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-11-03* lib/rexml/xmldecl.rb (REXML::XMLDecl): Stop using REXML::Encodingkou
module because XMLDecl doesn't convert encoding. This causes removing XML encoding name normalization (encoding.upcase). Encoding name in XML declaration is what user specifies. I think this is reasonable change. * test/rexml/test_xml_declaration.rb: Add tests for the above change. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37439 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-11-03* test/rexml/test_xml_declaration.rb (TestXmlDeclaration#test_*):kou
Remove needless prefix from test names. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37437 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-11-03* test/rexml/test_xml_declaration_parent_child.rb: Rename to ...kou
* test/rexml/test_xml_declaration.rb: ... this. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37436 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-11-03* eval.c (f_current_dirname): add the new method for Kernel.nari
This method almotst same as File.dirname(__FILE__). One different behavior is it returns nil when __FILE__ returns nil. [Feature #3346] * NEWS: ditto * test/ruby/test_method.rb: related test. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37432 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-11-03* test/ruby/test_refinement.rb (test_new_method_by_send,shugo
test_new_method_by_method_object): add tests for Kernel#send and Kernel#method with refinements. * test/ruby/test_refinement.rb (test_symbol_to_proc): add a test calling a proc created by Symbol#to_proc outside the scope where a refinement is closed over. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37431 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-11-02* object.c (rb_mod_to_s): Module#{to_s,inspect}, when invoked onshugo
a refinement, returns a string in the format #<refinement:C@M>, where C is a refined class and M is a module at which the refinemet is defined. * eval.c (rb_mod_refine): store information on a refinement for the above change. * test/ruby/test_refinement.rb: related test. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37424 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-11-02* string.c (sym_to_proc, sym_call): A Proc created by Symbol#to_procshugo
should close over the current refinements. [ruby-dev:46345] [Bug #7261] * vm_eval.c (rb_call0, rb_search_method_entry, rb_funcall_passing_block_with_refinements): add a new argument `refinements' for the above changes. * test/ruby/test_refinement.rb: related test. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37418 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-11-01proc.c: main.define_methodnobu
* proc.c (top_define_method): new method, main.define_method. [ruby-core:45715] [Feature #6609] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37417 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-11-01test_process.rb: use never existing filenobu
* test/ruby/test_process.rb (test_execopts_preserve_env_on_exec_failure): use never existing file in the current temporary directory. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37413 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-11-01* ext/bigdecimal/bigdecimal.c (BigDecimal_new),mrkn
test/bigdecimal/test_bigdecimal.rb: Fix exception message of BigDecimal constructor with a Float. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37407 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-11-01* ext/bigdecimal/bigdecimal.c (BigDecimal_add),mrkn
test/bigdecimal/test_bigdecimal.rb: need to specify precision for converting Rational and Float. [ruby-core:48045] [Bug #7176] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37406 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-11-01* test/ruby/test_process.rb: Revert r37404. My ubuntu box hasmame
actually the directory named "/nonexistent"... Sorry. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37405 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-11-01* test/ruby/test_process.rb: Process.exec raised EACCES on Linuxmame
3.5.0-17-generic. This is a temporal fix to rescue that exception. Needs kosaki's review. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37404 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-11-01* eval.c (rb_using_module): using should be used indirectly.shugo
[ruby-dev:46326] [Feature #7251] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37399 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-10-30* ext/dl/lib/dl/struct.rb: fix strange require order. [ruby-dev:45702]tenderlove
* ext/dl/lib/dl/value.rb: ditto * test/dl/test_c_struct_entry.rb: remove strange require order from tests. * test/dl/test_c_union_entity.rb: ditto git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37391 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-10-30* eval.c (rb_mod_refine): fix the error message when no block isshugo
given. [ruby-dev:46319] [Bug #7244] * test/ruby/test_refinement.rb: related test. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37390 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-10-30Check if there is no error before reconnect [Bug #4387]naruse
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37387 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-10-29* thread.c: added Thread#thread_variable_(get|set),tenderlove
Thread#thread_variable?, and Thread#thread_variables for operating on variables that are local to threads. [ruby-core:47790] * vm.c: ditto * test/ruby/test_thread.rb: tests for thread variables. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37384 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-10-29stringio.c: close separatedlynobu
* ext/stringio/stringio.c (strio_close): close separatedly per each instances, as well as IO. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37382 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-10-29Use assert_normal_exit to split processnaruse
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37381 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-10-29* ext/psych/lib/psych/handlers/recorder.rb: added a class fortenderlove
recording YAML parse and emit events. * ext/psych/lib/psych/handler.rb: adding a list of events so that handler classes can more easily be meta-programmed. * test/psych/handlers/test_recorder.rb: tests for the change. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37378 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-10-28* lib/ostruct.rb: Add [] and []=, base on a patch by Thomas Sawyermarcandre
[ruby-core:42779] [Feature #6056] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37376 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-10-28* lib/ostruct.rb: Also accept {Open}Struct as argument to newmarcandre
[ruby-core:47476] [Feature #7007] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37375 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-10-28* lib/ostruct.rb: Add OpenStruct#eql? and OpenStruct#hashmarcandre
[ruby-core:42651] [Bug #6029] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37373 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-10-28* lib/ostruct.rb (each_pair): Add #each_pair [#1400]marcandre
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37372 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-10-28* test/rexml/test_document.rb: Remove needless indent.kou
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37367 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-10-28* test/rexml/test_document.rb: Add tests for parsing XML encodedkou
by UTF-8 with BOM. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37366 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-10-28* lib/rexml/parsers/baseparser.rb: Fix a bug that UTF-8 is usedkou
for UTF-16XX encoded XML that doesn't have encoding="UTF-16" in XML declration. * test/rexml/test_document.rb: Add tests for the above change. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37363 b2dd03c8-39d4-4d8f-98ff-823fe69b080e