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

40 Коммитов

Автор SHA1 Сообщение Дата
kazu 886e805799 {ext,test}/dbm: Specify frozen_string_literal: true.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57445 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-01-28 04:36:08 +00:00
akr 0565551930 update comments.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54866 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-05-01 12:50:19 +00:00
naruse 3e92b635fb Add frozen_string_literal: false for all files
When you change this to true, you may need to add more tests.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53141 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-12-16 05:07:31 +00:00
akr ae831861be * test/ruby/test_object.rb: Specify an exception class for rescue clause.
* test/dbm/test_dbm.rb: Ditto.

* test/gdbm/test_gdbm.rb: Ditto.

* test/sdbm/test_sdbm.rb: Ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48383 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-11-11 15:28:17 +00:00
akr 8e6faa4f97 * test/dbm/test_dbm.rb: Use Etc.uname.
* test/gdbm/test_gdbm.rb: Ditto.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46015 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-05-19 10:37:14 +00:00
nobu e4518c5bde dbm.c: yield dup of keystr
* ext/dbm/dbm.c (fdbm_fetch): yield dup of keystr, to make it shared
  and get rid of use of uninitialized variable.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44482 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-01-01 18:43:13 +00:00
nobu 56fae61460 test_dbm.rb: no fork
* test/dbm/test_dbm.rb (have_fork?): no longer used already.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41423 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-19 07:47:31 +00:00
akr 05a2cd709f add a test.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34699 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-02-19 14:44:36 +00:00
akr 1efa14169a add assertions.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34694 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-02-19 08:33:01 +00:00
akr 460bb8a829 * test/dbm/test_dbm.rb (test_dbmfile_suffix): check pag and dir is
empty for 4.3BSD ndbm.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34693 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-02-19 08:08:37 +00:00
akr c509bec71d cosmetic change.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34687 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-02-18 18:05:24 +00:00
akr 62debc952d * test/dbm/test_dbm.rb (test_dbmfile_suffix): check magic numbers.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34686 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-02-18 18:01:02 +00:00
akr 90cc116431 simplify a test.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34680 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-02-18 10:06:24 +00:00
akr 4c1ea85dd8 * test/dbm/test_dbm.rb (test_dbmfile_suffix): DBM::VERSION should
be Berkeley DB if foo.db is created by DBM.open.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34674 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-02-18 04:54:09 +00:00
akr 48a97f2c94 * test/dbm/test_dbm.rb (test_dbmfile_suffix): test dbm file suffix.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34673 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-02-18 04:41:15 +00:00
akr d698ea8991 * test/dbm/test_dbm.rb: fix skip condition for libgdbm 1.8.0 or prior.
reported by Bohuslav Kabrda.
  [ruby-core:42685] [Bug #6036]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34646 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-02-16 15:25:06 +00:00
naruse 1ff15071d0 See the string "GDBM version".
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33962 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-12-06 06:59:29 +00:00
naruse 0209f8d476 Fix copy and paste miss of r33960.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33961 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-12-06 06:41:38 +00:00
naruse 20c91cafba Skip tests when the lib is with gdbm 1.8.0.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33960 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-12-06 04:40:04 +00:00
naruse 52f61eaef7 Comment out tests which fails with GDBM-DBM compat mode.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33956 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-12-05 21:47:16 +00:00
akr ddb9acd9f8 * test/dbm/test_dbm.rb: split tests for read only database.
* test/gdbm/test_gdbm.rb: ditto.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33673 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-11-08 11:51:28 +00:00
nobu 287a34ae0d * {ext,lib,test}/**/*.rb: removed trailing spaces.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22784 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-03-06 03:56:38 +00:00
matz 703fb3d9be * ext/gdbm/gdbm.c (fgdbm_index): make #index warn like Hash.
[ruby-dev:37039]

* ext/sdbm/init.c (Init_sdbm): typo fixed.  [ruby-dev:37039]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20148 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-11-08 03:15:28 +00:00
matz c82769f227 * ext/dbm/dbm.c (fdbm_index): make #index warn like Hash.
* ext/dbm/dbm.c (fdbm_key): new method.

* ext/sdbm/init.c: ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20146 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-11-07 22:07:05 +00:00
matz 4a3f2a7bc5 * string.c (rb_external_str_new_with_enc): no implicit strlen call.
[ruby-dev:36854]

* string.c (rb_external_str_new_cstr): new function to create
  string from external NUL terminated C string.

* string.c (rb_locale_str_new_cstr): ditto.

* ext/readline/readline.c: now use rb_locale_str_new_cstr().

* test/sdbm/test_sdbm.rb (TestSDBM#test_delete_with_block):
  deleted key to the block may be a copy of specified key.

* test/dbm/test_dbm.rb (TestDBM#test_delete_with_block): ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19885 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-22 05:55:22 +00:00
nobu 00b4a3f9c4 * test: assert_raises has been deprecated since a long time ago.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19536 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-09-24 17:44:39 +00:00
akr 7eee7f1cde forgot to modify TestDBM2 and TestGDBM2.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13764 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-10-24 06:29:59 +00:00
akr 462d4e1224 use Dir.mktmpdir.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13763 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-10-24 06:20:31 +00:00
akr a9c2a18cc7 don't generate temporary files under current directory.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13553 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-09-28 16:51:41 +00:00
usa c67d0e35e7 * test/{dbm,gdbm}/test_{dbm,gdbm}.rb: shouldn't use host_os. use
target_os instead. [ruby-list:43225]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@11923 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-02-27 16:22:10 +00:00
akr 04946de81b * mkconfig.rb: generate RbConfig instead of Config.
* instruby.rb, rubytest.rb, runruby.rb, bcc32/Makefile.sub,
  ext/extmk.rb, ext/dl/extconf.rb, ext/iconv/charset_alias.rb,
  lib/mkmf.rb, lib/rdoc/ri/ri_paths.rb,
  lib/webrick/httpservlet/cgihandler.rb,
  test/dbm/test_dbm.rb, test/gdbm/test_gdbm.rb,
  test/ruby/envutil.rb, test/soap/calc/test_calc_cgi.rb,
  test/soap/header/test_authheader_cgi.rb, test/soap/ssl/test_ssl.rb,
  win32/mkexports.rb, win32/resource.rb: Use RbConfig instead of
  Config.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@9970 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-02-20 08:34:53 +00:00
matz 22f1926644 * range.c (rb_range_beg_len): should return Qfalse for non-range
object.

* pack.c (EXTEND16): [ruby-dev:27383]

* eval.c (set_trace_func): add rb_secure(4) to prevent adding
  tracing function.

* lib/delegate.rb: document update from James Edward Gray II
  <james@grayproductions.net>.  [ruby-core:05942]

* process.c (proc_daemon): should restrict execution on levels
  higher than $SAFE=2.  suggested by URABE Shyouhei
  <shyouhei@ice.uec.ac.jp>.

* lib/forwardable.rb: replaced by new implementation from
  <Daniel.Berger@qwest.com>.  [ruby-core:05899]

* file.c (path_check_0): disallow sticky world writable directory
  in PATH (and $LOAD_PATH).  [ruby-dev:27226]

* numeric.c (fix_idiv): 1.div(1.0) should return integer value.
  [ruby-dev:27235]

* lib/yaml.rb: require 'yaml/constants'.  [ruby-core:5776]

* lib/xmlrpc/client.rb (XMLRPC::Client::do_rpc): add charset
  information to content-type header.[ruby-core:5127]

* lib/xmlrpc/server.rb (CGIServer::serve): ditto.

* lib/xmlrpc/server.rb (ModRubyServer::serve): ditto.

* lib/xmlrpc/server.rb (WEBrickServlet::service): ditto.

* test/dbm/test_dbm.rb (TestDBM::test_s_open_error): remove
  test_s_open_error test to detect duplicate open.
  [ruby-dev:27202]

* eval.c (splat_value): use to_a to splat non Array object.

* object.c (nil_to_a): remove nil.to_a.  [experimental]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@9349 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-10-05 16:15:16 +00:00
matz 757f06fdc7 * test/dbm/test_dbm.rb: remove locking test, which may not be
supported on some platforms.  [ruby-dev:27030]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@9133 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-09-12 15:12:52 +00:00
akr 2b5bb9ad00 dbm/test_dbm.rb: specify pid for Process.wait.
gdbm/test_gdbm.rb: ditto.
sdbm/test_sdbm.rb: ditto.

dbm/test_dbm.rb: add tests for open when db is not exist.
gdbm/test_gdbm.rb: ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8977 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-08-12 15:53:06 +00:00
usa 60f2184922 * test/{dbm,gdbm,sdbm}/test_{dbm,gdbm,sdbm}.rb: skip some tests
which using fork on fork-less platforms.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8717 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-07-04 02:24:54 +00:00
usa b03649bc2a * ext/dbm/dbm.c (fdbm_closed): new method DBM#closed?
* ext/gdbm/gdbm.c (fgdbm_closed): new method GDBM#closed?

* ext/sdbm/init.c (fsdbm_closed): new method SDBM#closed?

* test/dbm/test_dbm.rb, test/gdbm/test_gdbm.rb, test/sdbm/test_sdbm.rb
  (teardown): close all db objects before deleting data files.

* win32/win32.{ch} (unlink): hook runtime function to change
  file attribute before unlinking.
  merge from 1.8, see [ruby-dev:26360]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8650 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-06-20 08:17:53 +00:00
akr cd8d93d0cd * test/dbm/test_dbm.rb: merged from ext/dbm/testdbm.rb.
* test/gdbm/test_gdbm.rb: merged from ext/gdbm/testgdbm.rb.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8566 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-06-04 05:59:16 +00:00
matz 5141d3ea79 * hash.c (rb_f_getenv): prohibit for $SAFE=4. [ruby-dev:24908]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7311 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-11-18 08:11:12 +00:00
akr eeb5c7e18e * ext/dbm/dbm.c (fdbm_initialize): accept optional 3rd argument to
specify an open flag.
  (Init_dbm): define open flags: DBM::READER, DBM::WRITER, DBM::WRCREAT
  and DBM::NEWDB.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6326 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-05-16 12:03:23 +00:00
akr d92f10ac06 add freeze test for dbm and gdbm.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6264 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-05-07 09:39:12 +00:00