aboutsummaryrefslogtreecommitdiffstats
path: root/spec
Commit message (Collapse)AuthorAgeFilesLines
* array.c: improve operations on small arraysnobu2017-09-293-15/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | [Feature #13884] Reduce number of memory allocations for "and", "or" and "diff" operations on small arrays Very often, arrays are used to filter parameters and to select interesting items from 2 collections and very often these collections are small enough, for example: ```ruby SAFE_COLUMNS = [:id, :title, :created_at] def columns @all_columns & SAFE_COLUMNS end ``` In this patch, I got rid of unnecessary memory allocations for small arrays when "and", "or" and "diff" operations are performed. name | HEAD | PATCH -----------------+------:+------: array_small_and | 0.615 | 0.263 array_small_diff | 0.676 | 0.282 array_small_or | 0.953 | 0.463 name | PATCH -----------------+------: array_small_and | 2.343 array_small_diff | 2.392 array_small_or | 2.056 name | HEAD | PATCH -----------------+------:+------: array_small_and | 1.429 | 1.005 array_small_diff | 1.493 | 0.878 array_small_or | 1.672 | 1.152 name | PATCH -----------------+------: array_small_and | 1.422 array_small_diff | 1.700 array_small_or | 1.452 Author: Dmitry Bochkarev <dimabochkarev@gmail.com> git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60057 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Update to ruby/spec@691755deregon2017-09-2818-26/+134
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60051 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Update to ruby/mspec@c135328eregon2017-09-282-3/+4
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60050 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* removed bin/bundle_ruby, It was ignored upstream gemspec.hsbt2017-09-232-2/+2
| | | | | | * spec/bundler/other/*: Marked exclude tags for ruby repository. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59997 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* check_funcall_missing() should call respond_to_missing?(name, priv=true)eregon2017-09-201-4/+20
| | | | | | | * Improve spec rather than constrain implementation. * Coercion ignores visibility in Ruby. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59982 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Prefer adapting specs to complicating library codeeregon2017-09-201-4/+8
| | | | | | | | * lib/net/ftp.rb (Net::FTP#initialize): simplify as per the original intent. * spec/ruby/library/net/ftp/initialize_spec.rb: adapt specs. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59981 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Adapt tools to follow spec/rubyspec => spec/ruby renameeregon2017-09-202-13/+13
| | | | | | | * [Misc #13792] [ruby-core:82287] * Prefer test-spec over test-rubyspec in spec/README. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59980 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Move spec/rubyspec to spec/ruby for consistencyeregon2017-09-204370-0/+0
| | | | | | | * Other ruby implementations use the spec/ruby directory. [Misc #13792] [ruby-core:82287] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59979 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Update to ruby/spec@e3b6811eregon2017-09-205-25/+48
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59977 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Alias Set#=== to #include?knu2017-09-192-0/+14
| | | | | | | | * set.rb (Set#===): Added via [Feature #13801] by davidarnold. Closes #1673. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59966 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Enabled temporary disabled examples of bundler rspec.hsbt2017-09-194-4/+4
| | | | | | | These are fails when merging at r59779. But these are working now. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59959 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* rubyspec: jobserver fd may not be availablenobu2017-09-151-5/+9
| | | | | | | * spec/rubyspec/optional/capi/spec_helper.rb (compile_extension): rescue possible EBADF as jobserver fd may not be available. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59918 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* rubyspec: use mock directorynobu2017-09-151-2/+2
| | | | | | | * spec/rubyspec/core/dir/mkdir_spec.rb: the source directory may be on a read-only filesystem. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59917 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* rubyspec: fix typesnobu2017-09-153-13/+23
| | | | | | | | | | | | * spec/rubyspec/optional/capi/ext/fixnum_spec.c: FIX2INT and FXI2UINT return long, in spite of their names. * spec/rubyspec/optional/capi/ext/range_spec.c: err is int. * spec/rubyspec/optional/capi/ext/st_spec.c: st_index_t is larger than int. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59916 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Update to ruby/spec@a4bc1d8eregon2017-09-1431-122/+496
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59911 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Update to ruby/mspec@5bd9409eregon2017-09-1423-158/+121
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59909 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* cli_spec.rb: prefer BUNDLE_RUBYnobu2017-09-101-1/+2
| | | | | | | | | * spec/bundler/bundler/cli_spec.rb: prefer BUNDLE_RUBY over env hack. on macOS 10.11 or later, some system commands, e.g. /bin/sh and /usr/bin/env, clear DYLD_LIBRARY_PATH environment variable which is necessary to run not-yet installed command. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59821 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* spec/bundler/support: paths for ruby corenobu2017-09-093-30/+16
| | | | | | | | | | | | | * spec/bundler/support/path.rb (Spec::Path#for_ruby_core?): helper method to tell whether running in Ruby Core or not. * spec/bundler/support/helpers.rb (Spec::Helpers#bundle): use Path.bindir for ruby core case. * spec/bundler/support/rubygems_ext.rb (Spec::Rubygems.setup): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59792 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* rubygems_ext.rb: use BUNDLE_GEMnobu2017-09-091-1/+1
| | | | | | | * spec/bundler/support/rubygems_ext.rb (install_gems): use BUNDLE_GEM set in Makefile.in instead of the installed command. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59790 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Merge bundler to standard libraries.hsbt2017-09-08201-1/+35679
| | | | | | | | | | | | | | | | | | rubygems 2.7.x depends bundler-1.15.x. This is preparation for rubygems and bundler migration. * lib/bundler.rb, lib/bundler/*: files of bundler-1.15.4 * spec/bundler/*: rspec examples of bundler-1.15.4. I applied patches. * https://github.com/bundler/bundler/pull/6007 * Exclude not working examples on ruby repository. * Fake ruby interpriter instead of installed ruby. * Makefile.in: Added test task named `test-bundler`. This task is only working macOS/linux yet. I'm going to support Windows environment later. * tool/sync_default_gems.rb: Added sync task for bundler. [Feature #12733][ruby-core:77172] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59779 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* default.mspec: suppress warningsnobu2017-09-031-0/+4
| | | | | | | * spec/default.mspec: suppress tons of useless use of == in void context warnings. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59729 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* getoptlong.rb: multiline regexpsnobu2017-09-021-0/+6
| | | | | | | * lib/getoptlong.rb: make regexps multiline safe. [ruby-core:82627] [Bug #13858] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59722 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* script.rb: skip empty directoriesnobu2017-08-131-1/+2
| | | | | | | | | * spec/mspec/lib/mspec/utils/script.rb (entries): skip empty directories so that at least one file would run. Merged https://github.com/ruby/spec/issues/459 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59586 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* spec_helper.rb: pass jobserver fdsnobu2017-08-031-1/+8
| | | | | | | | * spec/rubyspec/optional/capi/spec_helper.rb (compile_extension): pass jobserver fds explicitly, because other specs might have set close_on_exec flags on these fds. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59475 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* fix typenobu2017-07-271-3/+3
| | | | | | | * spec/rubyspec/optional/capi/ext/io_spec.c (io_spec_rb_io_wait_readable): fix type of read(2). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59435 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Update to ruby/spec@c3e6b90eregon2017-07-2721-485/+353
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59432 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Update to ruby/mspec@353605feregon2017-07-278-35/+315
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59430 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Used a fixed seed in Random#rand speceregon2017-07-011-2/+2
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59248 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * append newline at EOF.svn2017-06-291-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59206 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Update to ruby/spec@abf1700eregon2017-06-2979-304/+1555
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59205 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Update to ruby/mspec@021a119eregon2017-06-2953-206/+259
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59203 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Added version guards [Bug #12684]nobu2017-06-241-22/+33
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59168 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Delegate to `eql?` [Fix GH-1564]nobu2017-06-241-3/+27
| | | | | | | | * lib/delegate.rb (eql?): Delegate to `eql?` of the inner object. based on the patch by giginet <giginet.net@gmail.com>. [ruby-core:76950] [Bug #12684] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59167 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* mspec.rb: keep jobserver fdsnobu2017-06-241-1/+1
| | | | | | | * spec/mspec/lib/mspec/commands/mspec.rb (MSpecMain#run): do not close jobserver FDs for mspec-run. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59166 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Use a file under tmp for File.real{,dir}path specs on Windowseregon2017-06-202-4/+16
| | | | | | | * The source file path could have pre-existing symlinks. * See https://github.com/ruby/spec/issues/445. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59123 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Adapt Time#zone spec to deal with differences of TZ validation on Windowseregon2017-06-191-1/+13
| | | | | | * [Bug #13591] [ruby-core:81347] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59113 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* capi/spec_helper.rb: suppress logonobu2017-06-181-0/+4
| | | | | | | | * spec/rubyspec/optional/capi/spec_helper.rb (compile_extension): suppress logo of nmake.exe to stderr. we want to show compiler warnings only. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59109 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* capi/spec_helper.rb: pass jobserver fdsnobu2017-06-172-3/+2
| | | | | | | | | | * spec/mspec/lib/mspec/commands/mspec.rb (MSpecMain#multi_exec): do not close GNU make jobserver auth fds. * spec/rubyspec/optional/capi/spec_helper.rb (compile_extension): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59106 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* capi/spec_helper.rb: use MAKE envnobu2017-06-171-1/+2
| | | | | | | | * spec/rubyspec/optional/capi/spec_helper.rb (compile_extension): prefer MAKE environment variable to hardcoded name if set by parent make. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59105 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* default.mspec: limit coresnobu2017-06-163-7/+8
| | | | | | | * spec/default.mspec (MSpecScript::JobServer#cores): limit max number of processors, not to acquire tokens more than necessary. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59103 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Clear `DESTDIR` when running makeusa2017-06-151-1/+1
| | | | | | | | | | * spec/rubyspec/optional/capi/spec_helper.rb (compile_extension): `DESTDIR` is the drive letter of the ruby installed path as default on mswin, but not builddir of the ruby. this causes spec errors if the drive letter is different in the installed path and builddir. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59096 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Update to ruby/spec@c730f07eregon2017-06-151-10/+12
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59095 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Update to ruby/spec@cd1b911eregon2017-06-1553-423/+316
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59093 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Update to ruby/mspec@d900a49eregon2017-06-1541-603/+500
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59092 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Fix DRb.start_service to use any available porteregon2017-06-011-17/+8
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58995 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Remove bad spec which cannot behave nicely in a multi-process environmenteregon2017-06-011-25/+0
| | | | | | | * A system port might be taken by another process at any time. * There are no useful expectations in this spec. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58994 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Remove empty files in drb specseregon2017-06-0130-30/+0
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58993 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Create the file in the File::TMPFILE spec in its own directoryeregon2017-06-011-3/+5
| | | | | | * Avoids failing the spec if rubyspec_temp is not empty. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58992 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Open files in binary modes for copying in MSpec's #cperegon2017-06-011-2/+2
| | | | | | | * See https://bugs.ruby-lang.org/issues/13570. * Found by MSP-Greg (Greg L). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58991 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Solaris 10 x86 raseis SEGVnaruse2017-05-301-2/+4
| | | | | | http://rubyci.s3.amazonaws.com/unstable10x/ruby-trunk/log/20170527T221806Z.diff.html.gz git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58966 b2dd03c8-39d4-4d8f-98ff-823fe69b080e