summaryrefslogtreecommitdiff
path: root/test
AgeCommit message (Collapse)Author
2012-12-11* lib/rdoc/options.rb: Added --page-dir option for moving pages indrbrain
doc/ to the top-level. * lib/rdoc/rdoc.rb: ditto. * test/rdoc/test_rdoc_options.rb: Test for the above. * test/rdoc/test_rdoc_rdoc.rb: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38311 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-12-11test_settracefunc.rb: envutilnobu
* test/ruby/test_settracefunc.rb: EnvUtil is required for assert_normal_exit when running solely. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38306 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-12-11Experimentally revert r38041naruse
"vm_dump.c: no methods in segv handler" It may cause segv: http://fb.rubyci.org/~chkbuild/ruby-trunk/log/20121130T090301Z.diff.html.gz git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38304 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-12-10* fix the behavior when a module is included into a refinement.shugo
This change is a little tricky, so it might be better to prohibit module inclusion to refinements. * include/ruby/ruby.h (RMODULE_INCLUDED_INTO_REFINEMENT): new flag to represent that a module (iclass) is included into a refinement. * class.c (include_modules_at): set RMODULE_INCLUDED_INTO_REFINEMENT if klass is a refinement. * eval.c (rb_mod_refine): set the superclass of a refinement to the refined class for super. * eval.c (rb_using_refinement): skip the above superclass (the refined class) when creating iclasses for refinements. Otherwise, `using Refinement1; using Refinement2' creates iclasses: <Refinement2> -> <RefinedClass> -> <Refinement1> -> RefinedClass, where <Module> is an iclass for Module, so RefinedClass is searched before Refinement1. The correct iclasses should be <Refinement2> -> <Refinement1> -> RefinedClass. * vm_insnhelper.c (vm_search_normal_superclass): if klass is an iclass for a refinement, use the refinement's superclass instead of the iclass's superclass. Otherwise, multiple refinements are searched by super. For example, if a refinement Refinement2 includes a module M (i.e., Refinement2 -> <M> -> RefinedClass, and if refinements iclasses are <Refinement2> -> <M>' -> <Refinement1> -> RefinedClass, then super in <Refinement2> should use Refinement2's superclass <M> instead of <Refinement2>'s superclass <M>'. * vm_insnhelper.c (vm_search_super_method): do not raise a NotImplementError if current_defind_class is a module included into a refinement. Because of the change of vm_search_normal_superclass(), the receiver might not be an instance of the module('s iclass). * test/ruby/test_refinement.rb: related test. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38298 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-12-10* vm_method.c (rb_method_entry_without_refinements): useshugo
rb_resolve_refined_method() to search superclasses if me->def->orig_me is 0. This change fixes make test-all TESTS="json ruby/test_refinement.rb". * test/ruby/test_refinement.rb: related test. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38297 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-12-10vm_trace.c: exceptions in event hooksnobu
* vm_trace.c (rb_threadptr_exec_event_hooks): exceptions in event hooks should not propagate outside. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38293 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-12-10compile.c, vm_insnhelper.c: flip-flop without hidden string keynobu
* compile.c (iseq_compile_each): count flip-flop state in local iseq not in each iseqs, so that the keys can be other than hidden strings. [ruby-core:47253] [Bug #6899] * vm_insnhelper.c (lep_svar_get, lep_svar_set, vm_getspecial): store flip-flop states in an array instead of a hash. * iseq.c (set_relation): main iseq also can has local scope. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38292 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-12-10test_gem_rdoc.rb: shut up skipping warningsnobu
* test/rubygems/test_gem_rdoc.rb (TestGemRDoc): skip method definitions for older rdoc and shut up obsolete warnings. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38286 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-12-10* lib/rubygems/ext/cmake_builder.rb: Added a builder for cmake.drbrain
* lib/rubygems/ext.rb: ditto. * lib/rubygems/installer.rb: ditto. * test/rubygems/test_gem_ext_cmake_builder.rb: Test for above. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38283 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-12-10* lib/rubygems/package.rb: Omit directories when packaging gems likedrbrain
RubyGems 1.8.x * test/rubygems/test_gem_package.rb: Test for above. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38281 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-12-09envutil.rb: kill childnobu
* test/ruby/envutil.rb (EnvUtil#invoke_ruby): kill the child process certainly. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38280 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-12-09* vm_insnhelper.c (vm_call_opt_send): Kernel#send should not useshugo
refinements. * proc.c (mnew): Kernel#method, Kernel#public_method, Module#instance_method, and Module#public_instance_method should not use refinements. * vm_method.c (rb_method_boundp): Kernel#respond_to? should not use refinements. * test/ruby/test_refinement.rb: related test. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38279 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-12-08* lib/rdoc/markdown/entities.rb: Added documentation.drbrain
* lib/rdoc/parser/ruby.rb: Updated style * lib/rdoc/ruby_lex.rb: Parse characters up to \u{FFFFF} * test/rdoc/test_rdoc_ruby_lex.rb: Test for above. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38277 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-12-08* eval.c: remove Module#refinements.shugo
* test/ruby/test_refinement.rb: remove tests for Module#refinements. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38275 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-12-08* eval.c (top_using): raise a RuntimeError if using is called in ashugo
module definition or a method definition. * test/ruby/test_refinement.rb: related test. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38274 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-12-08* lib/rubygems/commands/cleanup_command.rb: Skip default gems whendrbrain
cleaning up. * test/rubygems/test_gem_commands_cleanup_command.rb: Test for above. * lib/rubygems/commands/query_command.rb: Fixed listing remote gems. * lib/rubygems/dependency_installer.rb: Ignore non-files when looking for local gems. * test/rubygems/test_gem_dependency_installer.rb: Test for above. * lib/rubygems/uninstaller.rb: The user must confirm uninstalling gems that have dependencies. * test/rubygems/test_gem_uninstaller.rb: Test for above. * lib/rubygems.rb (module Gem): Updated version. * test/rubygems/*.pem: Updated to run in FIPS mode. * test/rubygems/test_gem_security.rb: ditto. * test/rubygems/test_gem_security_signer.rb: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38272 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-12-08* vm_insnhelper.c (vm_search_normal_superclass): super in ashugo
refinement always uses the refined class as its superclass. * test/ruby/test_refinement.rb: related test. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38271 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-12-08* eval.c (rb_mod_refine): raise an ArgumentError if a givenshugo
block is of a Proc object. * vm_insnhelper.c (vm_call_method): store refined methods in inline cache to improve performance. It's safe now because blocks cannot be yielded with different refinements in the new specification. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38270 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-12-08* eval.c (rb_mod_refine), vm_eval.c (rb_yield_refine_block):shugo
Module#refine activates all refinements defined in that module only in a given block. * string.c (sym_to_proc, sym_call): don't use refinements. * test/ruby/test_refinement.rb: related test. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38269 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-12-08* ext/objspace/objspace.c (iow_size): return size of internal objectko1
for ObjectSpace.memsize_of(). * test/objspace/test_objspace.rb: add a test. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38266 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-12-07* lib/csv.rb: A fix for row comparison by Stephen Wattam. [Bug #7528]jeg2
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38265 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-12-07* vm_eval.c (yield_under, eval_under): do not activate refinementsshugo
of the receiver in module_eval and instance_eval. * eval.c (ruby_Init_refinement): undef Class#refine. * eval.c (ruby_Init_refinement): remove Module#using. * eval.c (ruby_Init_refinement): main.using should be private. * eval.c (rb_mod_refine): the argument of Module#refine should not be a module. * insns.def (defineclass): do not activate refinements in a class or module. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38262 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-12-07Revert r38216 and r38221. Release manager mark this feature as "next minor".kosaki
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38260 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-12-07* lib/rdoc/markup/to_joined_paragraph.rb: Completed documentationdrbrain
* lib/rdoc/parser/c.rb: ditto * lib/rdoc/parser/changelog.rb: ditto * lib/rdoc/servlet.rb: ditto * lib/rdoc/store.rb: ditto * lib/rdoc/store.rb: Improved HTML error page. Completed documentation * lib/rdoc/parser/ruby.rb: Fixed bug attaching a comment to A::B = 42 * test/rdoc/test_rdoc_parser_ruby.rb: Test for above * test/rdoc/test_rdoc_comment.rb: Removed garbage git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38256 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-12-07timeout.rb: replace deferred exception after async_interrupt_timingnobu
* lib/timeout.rb (Timeout#timeout): since async_interrupt_timing re-raises a deferred exception, replace the timeout exception with Timeout::Error after it. [Bug #7503] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38255 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-12-07* test/ruby/test_refinement.rb: suppress warning.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38254 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-12-07test: remove or replace trailing spacesnobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38253 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-12-07Use more portable value for ENV['TZ']naruse
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38248 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-12-07* time.c (time_mdump): dump timezone string to private instance variablenaruse
on marshaling. * time.c (time_mload): load timezone string from private instance variable named 'zone'. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38247 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-12-07Add freebsd to force_tz_testnaruse
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38246 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-12-07Canada/Newfoundland was renamed to America/St_Johnsnaruse
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38245 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-12-06* test/ruby/test_refinement.rb: fix some tests to use neithershugo
Module#using nor Module#module_eval. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38241 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-12-06* eval.c (ruby_Init_refinement): a new function to enableshugo
Refinements with a warning "Refinements are experimental...". * ext/refinement/refinement.c, ext/refinement/extconf.rb: a new extension library to enable Refinements. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38239 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-12-06* revised r37993 to avoid SEGV/ILL in tests. In r37993, a methodshugo
entry with VM_METHOD_TYPE_REFINED holds only the original method definition, so ci->me is set to a method entry allocated in the stack, and it causes SEGV/ILL. In this commit, a method entry with VM_METHOD_TYPE_REFINED holds the whole original method entry. Furthermore, rb_thread_mark() is changed to mark cfp->klass to avoid GC for iclasses created by copy_refinement_iclass(). * vm_method.c (rb_method_entry_make): add a method entry with VM_METHOD_TYPE_REFINED to the class refined by the refinement if the target module is a refinement. When a method entry with VM_METHOD_TYPE_UNDEF is invoked by vm_call_method(), a method with the same name is searched in refinements. If such a method is found, the method is invoked. Otherwise, the original method in the refined class (rb_method_definition_t::body.orig_me) is invoked. This change is made to simplify the normal method lookup and to improve the performance of normal method calls. * vm_method.c (EXPR1, search_method, rb_method_entry), vm_eval.c (rb_call0, rb_search_method_entry): do not use refinements for method lookup. * vm_insnhelper.c (vm_call_method): search methods in refinements if ci->me is VM_METHOD_TYPE_REFINED. If the method is called by super (i.e., ci->call == vm_call_super_method), skip the same method entry as the current method to avoid infinite call of the same method. * class.c (include_modules_at): add a refined method entry for each method defined in a module included in a refinement. * class.c (rb_prepend_module): set an empty table to RCLASS_M_TBL(klass) to add refined method entries, because refinements should have priority over prepended modules. * proc.c (mnew): use rb_method_entry_with_refinements() to get a refined method. * vm.c (rb_thread_mark): mark cfp->klass for iclasses created by copy_refinement_iclass(). * vm.c (Init_VM), cont.c (fiber_init): initialize th->cfp->klass. * test/ruby/test_refinement.rb (test_inline_method_cache): do not skip the test because it should pass successfully. * test/ruby/test_refinement.rb (test_redefine_refined_method): new test for the case a refined method is redefined. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38236 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-12-06parse.y: flush string contentnobu
* parse.y (parser_here_document): flush string content between new line and :string_embexpr. [ruby-core:48703] [Bug #7255] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38235 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-12-06test_scanner_events.rb: ruby-mode highlight by heredocnobu
* test/ripper/test_scanner_events.rb (TestRipper::ScannerEvents): get rid of make ruby-mode highlight confused by heredoc. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38234 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-12-06memory_status.rb: EnvUtilnobu
* test/ruby/memory_status.rb (Memory): suppress_warning is in EnvUtil. [ruby-core:50599] [Bug #7523] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38233 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-12-06* test/rake/helper.rb: Load envutil correctly. Removed useless rescuedrbrain
for signal propagation tests * lib/rake/file_utils.rb: Prefer the built ruby. * test/rake/test_rake_functional.rb: ditto git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38232 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-12-06* lib/rdoc/context.rb: Don't warn for duplicate methods while loading.drbrain
* test/rdoc/test_rdoc_context.rb: Test for above. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38231 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-12-06* lib/rubygems/command_manager.rb: Removed string concatenationdrbrain
syntax. [Bug #6265] * lib/rubygems/commands/install_command.rb: ditto * lib/rubygems/commands/uninstall_command.rb: ditto * lib/rubygems/indexer.rb: ditto * lib/rubygems/security/policy.rb: ditto * lib/rubygems/security.rb: ditto * lib/rubygems/uninstaller.rb: ditto * test/rubygems/test_gem_commands_cert_command.rb: ditto * test/rubygems/test_gem_package.rb: ditto * test/rubygems/test_gem_security.rb: ditto * test/rubygems/test_gem_security_policy.rb: ditto git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38230 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-12-06* lib/rubygems/package.rb: Set rubygems_version before validation.drbrain
Fixes issue with bundler. * test/rubygems/test_gem_package.rb: Test for above. * lib/rubygems/remote_fetcher.rb: Only update the cache when we have permission. [ruby-trunk - Bug #7509] * lib/rubygems/source.rb (class Gem): ditto * test/rubygems/test_gem_remote_fetcher.rb: Test for above. * lib/rubygems/test_utilities.rb: ditto * lib/rubygems/specification.rb: Derive base_dir properly for default gems. [ruby-trunk - Bug #7496] * test/rubygems/test_gem_specification.rb: Test for above. * lib/rubygems.rb: Untaint Dir.pwd when searching for gemdeps files for operation under $SAFE=1 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38229 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-12-06* vm_trace.c: TracePoint#enable should not cause an errorko1
when it is already enabled. TracePoint#disable is too. [ruby-core:50561] [ruby-trunk - Bug #7513] * test/ruby/test_settracefunc.rb: add tests. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38227 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-12-05* lib/rdoc*: Improved display of ChangeLog files as HTML.drbrain
* test/rdoc*: Test for above. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38226 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-12-05* thread.c (rb_uninterruptible): helper function for providingkosaki
temporary async_interrupt_timing(Object => :defer) * io.c (rb_f_p): use rb_uninterruptible. * io.c (rb_f_p_internal): helper function for rb_f_p(). * io.c (struct rb_f_p_arg): new struct for rb_f_p_internal. * test/ruby/test_thread.rb (test_async_interrupt_and_p): test for the above. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38225 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-12-05* io.c (io_binwrite): check interrupt before io issue.kosaki
* test/ruby/test_thread.rb (test_async_interrupt_and_io): test for the above. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38224 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-12-05vm_eval.c: public_send does not consider how it is callednobu
* vm_eval.c (rb_method_call_status): use Qundef as no self instead of the current self. * vm_eval.c (send_internal): public_send does not consider how it is called, as mentioned in r14173. patched by charliesome (Charlie Somerville). [ruby-core:50489] [Bug #7499] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38223 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-12-05test_object.rb: test for public_sendnobu
* test/ruby/test_object.rb (TestObject#test_public_send): add test for public_send. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38222 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-12-05Suppress warningsnaruse
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38219 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-12-05Use underscore-begging name for dummy variables to suppress warningnaruse
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38218 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-12-05* lib/timeout.rb (Timeout#timeout): setkosaki
async_interrupt_timeing(:on_blocking) by default. [Bug #7503] [ruby-core:50524] * test/test_timeout.rb (#test_timeout_blocking): test for the above. * test/test_timeout.rb (test_timeout_immediate): ditto * test/test_timeout.rb (test_timeout_immediate2): ditto. * NEWS: news for the above. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38216 b2dd03c8-39d4-4d8f-98ff-823fe69b080e