Граф коммитов

3424 Коммитов

Автор SHA1 Сообщение Дата
mame b511e1bfbe * variable.c (rb_mod_const_of, sv_i): Module#constant should exclude
private constants.  see [ruby-core:32912].

* test/ruby/test_module.rb (test_constants_with_private_constant): add
  a test for above.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30716 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-01-28 17:57:48 +00:00
mame b1e829fb30 * variable.c (rb_const_set): const_set shoud preserve constant
visibility.  see [ruby-core:32912].

* test/ruby/test_module.rb: add a test for above.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30715 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-01-28 17:57:42 +00:00
mame a2ec8666cf * compile.c (NODE_CLASS, NODE_MODULE), insns.def (defineclass): raise
an exception when "class Foo::Bar" is evaluated and Foo::Bar is
  private.  To implement this, define_type of "defineclass" is added
  so that the instruction can distinguish whether the class definition
  is scoped (class Foo::Bar) or not (class Bar).

* test/ruby/test_class.rb (test_redefine_private_class),
  test/ruby/test_module.rb
  (test_define_module_under_private_constant): add tests for above.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30714 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-01-28 17:57:34 +00:00
mame f0483c494f * constant.h, variable.c: to ensure compatibility, rb_const_get_* must
not raise an exception even when the constant is private.  Instead,
  rb_public_const_get_* and rb_public_const_defined_* are introduced,
  which raise an exception when the referring constant is private.
  see [ruby-core:32912].

* vm_insnhelper.c (vm_get_ev_const): use rb_public_const_get_* instead
  of rb_const_get_* to follow the constant visibility when user code
  refers a constant.

* test/ruby/test_marshal.rb (test_marshal_private_class): add a test.
  This test had failed because of incompatibility of rb_const_get.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30713 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-01-28 17:57:27 +00:00
kosaki 77a7137c4b * test/gdbm/test_gdbm.rb (TestGDBM#test_s_open_no_create,
TestGDBM2#test_writer_open_notexist): We only need to skip libgdbm 1.8.0,
	not all 1.8.x. 1.8.1 or later don't have GDBM_WRITER sickness.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30710 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-01-28 14:23:04 +00:00
kosaki 3a0ec68109 * test/gdbm/test_gdbm.rb (TestGDBM2#test_writer_open_notexist):
gdbm 1.8.x changed GDBM::WRITER behavior. Thus our testcase need
	  to be changed too.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30707 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-01-28 08:50:18 +00:00
kosaki 36f71db31e * test/gdbm/test_gdbm.rb (TestGDBM#test_s_open_no_create): skip
the test if gdbm version is 1.8.x.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30706 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-01-28 08:36:46 +00:00
kosaki a3d861ef2f * test/ruby/test_require.rb (TestRequire#test_require_too_long_filename):
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 07:31:44 +00:00
kosaki bacc7e6a42 * test/ruby/test_require.rb (TestRequire#test_require_path_home_{1,2}):
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-28 07:21:38 +00:00
kosaki 6526985522 remove unnecessary local variable.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30703 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-01-28 07:13:49 +00:00
kosaki 29422e5d31 * test/ruby/test_require.rb (TestRequire#test_require_path_home_{1,2,3}):
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-28 07:06:48 +00:00
usa d4f8142d18 * test/ruby/test_process.rb (TestProcess#test_too_long_path{,2}):
should handle Errno::E2BIG, because this test checks crash of ruby,
  not the error type system.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30697 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-01-28 02:48:46 +00:00
kosaki 41bbb319dd * test/ruby/test_process.rb (TestProcess#test_too_long_path)
TestProcess#test_too_long_path): Reduced string size from 100MB
	  to 10MB. 100MB may cause no memory error. It isn't intended.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30682 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-01-27 16:36:21 +00:00
kosaki 6c2b2c2853 * test/ruby/test_process.rb (TestProcess#test_too_long_path2):
Factored out from test_too_long_path. A test should only do
	  one test.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30680 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-01-27 16:33:23 +00:00
nobu beec203a1d * process.c (proc_exec_v, rb_proc_exec_n, rb_proc_exec)
(proc_spawn_n, proc_spawn): get rid of too huge alloca().
  [ruby-core:34827], [ruby-core:34833]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30662 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-01-26 23:41:47 +00:00
nahi 0522ffd51f * ext/openssl/ossl_asn1.c (ossl_asn1_decode0): OpenSSL::ASN1.decode
should reject indefinite length primitive encodings as that is
          illegal. Patch by Martin Bosslet. See #4324.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30656 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-01-26 08:17:01 +00:00
kazu 9a4a8673c0 * test/ruby/test_thread.rb: remove unused variables.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30651 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-01-24 22:50:21 +00:00
kazu fa6f4336f3 * test/ruby/test_thread.rb (TestThread#test_condvar_nolock_2): get rid of method redefined.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30650 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-01-24 22:50:18 +00:00
nobu 7a6113d6b6 * string.c (rb_string_value_cstr): rb_str_modify can change
RSTRING_PTR.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30648 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-01-24 22:00:55 +00:00
kosaki 68823fdea5 * test/ruby/test_thread.rb: Added various ConditionVariable tests.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30647 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-01-24 18:25:20 +00:00
nobu 97b8e4996f * error.c (rb_invalid_str): prevent intermediate variable from GC.
[ruby-core:34820]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30641 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-01-24 12:04:47 +00:00
kosaki b9c0b5039c * test/io/console/test_io_console.rb: Don't run test if the system
don't support io/console.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30640 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-01-23 14:03:24 +00:00
kosaki 99ef86707c * test/fiddle/test_fiddle.rb: Don't run test if the system don't support
fiddle.

	* test/fiddle/test_function.rb: ditto.
	* test/fiddle/test_closure.rb: ditto.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30639 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-01-23 13:20:58 +00:00
tenderlove 18e3c52bc4 reverting r30628 since this seems like a bug in libyaml
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30634 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-01-22 22:43:41 +00:00
kosaki fe505c47c8 * test/test_syslog.rb: Fix to make a lot of test failure if
the platform doesn't support syslog.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30632 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-01-22 15:46:11 +00:00
tenderlove 6e5aa6311a * ext/psych/lib/psych/visitors/to_ruby.rb: fixing merge key support
when multiple merge keys are specified.
* test/psych/test_merge_keys.rb: tests for multi-merge key support

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30630 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-01-22 02:51:14 +00:00
tenderlove 5b1c06c74b * ext/psych/lib/psych/visitors/to_ruby.rb: merge keys are actually
part of YAML 1.1, so they should be supported.  Remove warning and
  merge keys to parent.  [ruby-core:34679]
* test/psych/test_merge_keys.rb: test for merge keys

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30629 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-01-22 02:34:50 +00:00
tenderlove 7b876e65ed * ext/psych/parser.c (parse): fixing off-by-one error on line numbers
in parse exceptions.  [ruby-core:34690]
* test/psych/test_parser.rb: test for error

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30628 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-01-22 02:23:12 +00:00
tenderlove cab95ab712 fixed a bug in the test suite. Thanks Benoit Daloze! [ruby-core:34641]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30627 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-01-22 02:18:21 +00:00
tenderlove 8dd3a4af66 * ext/psych/parser.c (parse): add the file name to the exception when
parse errors occur.
* test/psych/test_parser.rb: test for parse error file name

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30626 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-01-22 01:26:40 +00:00
tenderlove 0331314d27 * ext/psych/parser.c (parse): fix assertion error when reusing a
parser after an exception has been raised
* test/psych/test_parser.rb: test for assertion error

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30625 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-01-22 01:13:52 +00:00
tenderlove 960720ef4f * ext/psych/lib/psych/nodes/node.rb: Make Psych::Nodes::Node
enumerable.
* ext/psych/lib/psych/visitors/depth_first.rb: Add a depth-first
  visitor to enumerate over a YAML AST in a depth-first fashion
* test/psych/nodes/test_enumerable.rb: test for enumerating nodes
* test/psych/visitors/test_depth_first.rb: test for depth-first
  visitor

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30624 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-01-21 19:11:53 +00:00
kosaki 7fd0d4a4d3 revert unrelated fix from r30615. Sorry!
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30619 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-01-20 15:40:04 +00:00
kosaki d41d2f26ce * configure.in: Add '#include <stdlib.h>' to
rb_cv_localtime_overflow test too. It's reported by Tomoyuki
	  Chikanaga. Thanks.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30615 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-01-20 14:34:39 +00:00
usa a9f76259ce * test/webrick/utils.rb (TestWEBrick::RubyBin): test CGI does not need
to load rubygems.  if it activated, ruby raises LoadError about
  rbconfig.rb.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30611 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-01-20 02:41:09 +00:00
tenderlove 74b0a7a06f * ext/psych/lib/psych/visitors/json_tree.rb: Fix JSON emit for
DateTime and Time classes.
* test/psych/test_json_tree.rb: test for JSON emit

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30610 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-01-20 00:20:57 +00:00
tenderlove a17cdfdde2 * ext/psych/lib/psych/coder.rb (represent_object): arbitrary objects
may be passed to the Psych::Coder object.
* ext/psych/lib/psych/visitors/yaml_tree.rb: support for visiting
  arbitrary objects set on the coder.
* test/psych/test_coder.rb: supporting test case.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30609 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-01-19 23:05:53 +00:00
ryan 64847a9cfe Importing rubygems @ c2d4131: Deal with platforms that have DLEXT2 == nil. Fixes RF#28867
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30608 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-01-19 21:23:04 +00:00
drbrain 4993a1a814 Finish removing code, (fixes sources command test).
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30603 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-01-19 04:17:17 +00:00
ryan e798ccbacf Import rubygems 1.5.0 (release candidate)
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30599 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-01-19 00:08:49 +00:00
tenderlove 0b38e9bc9d * ext/psych/lib/psych/parser.rb (Mark): Adding a class to wrap
marker information
* ext/psych/parser.c (mark): Add a method to return the mark object
  for the parser
* test/psych/test_parser.rb: tests for the Mark class.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30588 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-01-17 19:44:31 +00:00
tenderlove eacee9d95f * ext/psych/lib/psych/visitors/json_tree.rb (visit_String): JSON
strings should be dumped with double quotes. [ruby-core:34186]
* test/psych/test_json_tree.rb: test for double quotes

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30587 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-01-17 17:48:09 +00:00
nobu 49cf75e675 * test/net/smtp/test_ssl_socket.rb: fix dependency.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30551 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-01-15 03:01:19 +00:00
nobu b794a2bd8c * configure.in (warnflags): add -Werror=implicit-function-declaration
if available.
* lib/mkmf.rb (init_mkmf): ignore warnings in mkmf tests.
* test/mkmf/base.rb (setup, teardown): restore config values.
* test/mkmf/test_flags.rb: split from test_find_executable.rb.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30550 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-01-15 02:57:36 +00:00
shugo 9d155ebf51 * test/net/imap/test_imap.rb: call neither logout nor disconnect
unless connected.  patch by Kazuhiro NISHIYAMA.  [ruby-dev:42860]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30544 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-01-14 06:38:32 +00:00
naruse 2dbf7d11f2 * pack.c (pack_unpack): the resulted string of unpack('M') must have
ASCII-8BIT encoding (and ENC_CODERANGE_VALID). [ruby-core:34482]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30542 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-01-14 05:03:22 +00:00
ryan f52c2cc24d Reduced gem_prelude to just require rubygems. Reviewed by Evan Phoenix
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30538 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-01-14 02:02:12 +00:00
nobu 7909af18ed * io.c (argf_next_argv): go advance when the next file cannot be
read.  [ruby-core:34446]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30536 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-01-13 22:30:50 +00:00
ryan b404cbac77 Simple fix for emacs parsing. (emacs doesn't like _heredocs_)
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30530 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-01-12 21:53:31 +00:00
yugui ef0736604a * lib/net/http.rb (Net::HTTP#connect): makes it timeout during
SSL handshake too. [ruby-core:34203]
  Patch by Marc Slemko.

* test/net/http/test_http.rb (TestNetHTTP_v1_2#test_timeout_during_HTTP_session):
  test for [ruby-core:34203]

* test/net/http/test_https.rb (TestNetHTTPS#test_timeout_during_SSL_handshake):
  ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30520 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-01-12 07:26:18 +00:00