summaryrefslogtreecommitdiff
path: root/test/ruby/test_require.rb
AgeCommit message (Collapse)Author
2013-03-24* test/ruby/test_require.rb: Remove temporally files in the tests.akr
* test/ruby/test_rubyoptions.rb: Ditto. * test/logger/test_logger.rb: Ditto. * test/psych/test_psych.rb: Ditto. * test/readline/test_readline.rb: Ditto. * test/syslog/test_syslog_logger.rb: Ditto. * test/webrick/test_httpauth.rb: Ditto. * test/zlib/test_zlib.rb: Ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39899 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-02-06test_require.rb: shared drivenobu
* test/ruby/test_require.rb (TestRequire#test_require_with_unc): cannot test unless the local drive is shared. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39085 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-01-09Add RUBYOPT=>nil to avoid false negativenaruse
add RUBYOPT=nil to suppress circular require warnings to avoid false negative with stderr assertion. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38746 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-01-09* test/ruby/test_require.rb: improve test for r38744.glass
fix to use Tempfile instead of temporary file in current directory. the patch is from nobu (Nobuyoshi Nakada). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38745 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-01-09* load.c (load_lock): fix not to delete thread shield twice.glass
it may break the shield locked by another thread. [Bug #7530] [ruby-core:50645] * test/ruby/test_require.rb: a test for above. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38744 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-12-25error.c: rb_write_error_strnobu
* error.c (compile_err_append, compile_warn_print, warn_print): use rb_write_error_str() instead of writing to rb_stderr directly. * io.c (rb_write_error_str): a stopgap measure not to unblock GVL. warning from require seems to still have race condition errors. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38590 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-12-21Add test for r38529 [Bug #7536]naruse
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38530 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-12-20test_require.rb: clear load pathnobu
* test/ruby/test_require.rb (test_require_invalid_shared_object), (test_require_too_long_filename, test_require_changed_current_dir), (test_require_not_modified_load_path, test_require_changed_home), (test_require_to_path_redefined_in_load_path), (test_require_to_str_redefined_in_load_path), (assert_require_with_shared_array_modified): clear preset load path so that unexpected files will not get loaded. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38486 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-12-18Show $LOAD_PATH and RUBYLIB to debug easiernaruse
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38435 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-12-13* test/ruby/test_require.rb (TestRequire#test_loaded_features_encoding):usa
need to check compatibility, not equality of encodings. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38356 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-11-22Fix cache validity check of requireshirosaki
* array.c (rb_ary_shared_with_p): fix cache validity check. If #pop or #shift has been called against $: or $", the array will be still shared with the snapshot. We check array length for cache validity. [ruby-core:49518] [Bug #7383] * test/ruby/test_require.rb (TestRequire#test_require_with_array_pop, TestRequire#test_require_with_array_shift): add tests for above. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37808 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-10-16* test/ruby/envutil.rb (Test::Unit::Assertions#assert_file): rename from ↵kazu
file_assertion. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37215 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-10-15envutil.rb: file_assertionnobu
* test/ruby/envutil.rb (Test::Unit::Assertions#file_assertion): rewrite file assertions. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37193 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-10-09envutil.rb: assert_file and assert_file_notnobu
* test/ruby/envutil.rb (assert_file, assert_file_not): more descriptive assertions for File predicates. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37127 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-08-23load.c: keep encoding of feature namenobu
* file.c (rb_find_file_ext_safe, rb_find_file_safe): default to US-ASCII for encdb and transdb. * load.c (search_required): keep encoding of feature name. set loading path to filesystem encoding. [Bug #6377][ruby-core:44750] * ruby.c (add_modules, require_libraries): assume default external encoding as well as ARGV. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36800 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-08-07* test/ruby/test_require.rb (TestRequire#test_require_twice): added.usa
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36651 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-03-15* test/ruby/test_arity.rb (TestArity#err_mess): use assert_raise.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35026 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-03-07* error.c (rb_load_fail): should honor encoding.nobu
* load.c (load_failed): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34944 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-03-06* error.c (rb_loaderror_with_path): Adding the missing file as antenderlove
instance variable to the LoadError exception. * load.c: call rb_loaderror_with_path so that the missing path is added to the exception. * ruby.c: call rb_loaderror rather than raising our own LoadError exception. * include/ruby/intern.h: add declaration for rb_loaderror_with_path. * test/ruby/test_require.rb: add supporting test for LoadError#path method. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34938 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-12-20* test/ruby/test_require.rb (test_race_exception): delete temporary library ↵nobu
name. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34088 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-12-20* test/ruby/test_require.rb (test_race_exception): rewrote withoutnobu
global attribute. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34077 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-12-15* test/ruby/test_require.rb (test_race_exception): get rid ofnobu
not-guaranteed timing issue. [ruby-core:41655] [Bug #5754] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34046 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-12-13* load.c (load_unlock): all threads requiring one file shouldnobu
share same loading barrier, so it must be kept alive while those are waiting on it. [ruby-core:41618] [Bug #5754] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34027 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-05-22* include/ruby/defines.h (CASEFOLD_FILESYSTEM): Revert r30508. See #4255.nahi
Now __APPLE__ is not CASEFOLD_FILESYSTEM again. * load.c (loaded_feature_path, rb_feature_p, load_lock): Revert r30508. See #4255. Make $LOADED_FEATURES scanning case-sensitive again. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31692 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-03-14 * test/ruby/test_require.rb (test_require_too_long_filename):nagachika
increase path length, because MAXPATHLEN is defined as 4096 on linux. * test/ruby/test_require.rb (test_require_path_home_1): ditto. * test/ruby/test_require.rb (test_require_path_home_2): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31106 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-03-10* test/ruby/test_require.rb: setting too long string to ENV causesusa
Errno::EINVAL on Windows. long path name errors may causes over about 1024 bytes, then limit it about 4000 bytes. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31083 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-02-01* test/ruby/test_require.rb (TestRequire#test_require_with_unc):usa
use ``127.0.0.1'' instead of ``localhost'' as host name, because XP or earlier cannot resolv it as NBT hostname. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30754 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-01-28 * test/ruby/test_require.rb (TestRequire#test_require_too_long_filename):kosaki
Added -w option because too long path error don't output a message by default since r30660. [Bug #4336] [ruby-dev:43134] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30705 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-01-28 * test/ruby/test_require.rb (TestRequire#test_require_path_home_{1,2}):kosaki
Added -w option because too long path error don't output a message by default since r30660. [Bug #4336] [ruby-dev:43134] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30704 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-01-28remove unnecessary local variable.kosaki
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30703 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-01-28 * test/ruby/test_require.rb (TestRequire#test_require_path_home_{1,2,3}):kosaki
split from test_require_path_home. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30702 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-01-10* include/ruby/defines.h (CASEFOLD_FILESYSTEM): HFS+ is casenobu
insensitive. * load.c (loaded_feature_path, rb_feature_p, load_lock): on a case-insensitive filesystem, loaded features search should ignore case. [ruby-core:34297] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30508 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-09-11* hash.c (ruby_setenv): raise if putenv and SetEnvironmentVariablenobu
failed, because of the restriction of the size on Windows. based on a patch from Peter Weldon at [ruby-core:32304]. fix: Bug#3812, [ruby-core:32250] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29225 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-08-29* load.c (rb_provide_feature): clarify error message for frozennobu
$LOADED_FEATURES. based on a patch from Run Paint Run Run at [ruby-core:31913]. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29135 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-08-29* load.c (load_failed): should honor encoding. [ruby-core:31915]nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29133 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-08-08* test/ruby/test_require.rb (test_require_too_long_filename):nobu
clear -w option. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28930 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-06-29* test_require.rb (test_require_with_unc): test for r28473.usa
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28475 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-05-04* test/ruby/test_require.rb (test_relative_symlink): skip if symlink is notusa
implemented. * test/ruby/test_file_exhaustive.rb (test_stat, test_expand_path): ignore tests about nlink on Windows because its not imeplented because of performance problem. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27617 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-04-27* iseq.c (set_relation): do not use top_wrapper as bottom of cref,mame
which caused constant lookup error when "wrapped load" is used; instead, use Object as bottom, and push top_wrapper on Object. [ruby-core:25039] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27514 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-01-21* test/ruby/test_require.rb (test_define_class): expect TypeErrormame
instead of NameError. [ruby-core:27504] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26368 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-01-12add ML ref.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26292 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-01-12* prelude.rb (require_relative): use File.realpath. [ruby-dev:40040]akr
* include/ruby/intern.h: declare rb_dir_getwd. * dir.c (rb_dir_getwd): copied from dir_s_getwd to export. (dir_s_getwd): use rb_dir_getwd. * file.c (rb_file_s_realpath): new method File.realpath. (rb_file_s_realdirpath): new method File.realdirpath. * lib/pathname.rb (Pathname#realpath): use File.realpath. (Pathname#realdirpath): use File.realdirpath. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26290 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-09-12* test/ruby/test_require.rb (test_relative): test without currentnobu
directory. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24874 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-09-09* test/ruby/test_require.rb (test_relative): tests for require_relative.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24818 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-06-26* test/ruby/test_rubyoptions.rb (TestRubyOptions#test_rubyopt):matz
test suite add '.' to RUBYLIB. remove checks. * test/ruby/test_require.rb (TestRequire#test_tainted_loadpath): the default tempdir directory /tmp is world writable, so SecrurityError would be raised. check removed. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23860 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-02adds a test case for r21955 and r21917.yugui
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21974 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-28* test/ruby/test_require.rb (test_require_too_long_filename): too longusa
commandline may be rejected by OS. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19998 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-07-28* test/ruby/test_require.rb (test_require_too_long_filename):mame
Kernel#require does not use dln_find_file_r (at r18242). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18247 b2dd03c8-39d4-4d8f-98ff-823fe69b080e