1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00
Commit graph

18 commits

Author SHA1 Message Date
nahi
652b6f196a * lib/logger.rb: imported upstream version (logger/1.2.7)
* do not raise an exception even if log writing failed.
          * do not raise ShiftingError if an aged file already exists.
            (no ShiftingError will be raised from 1.2.7, just warn() instead)
        * test/logger/test_logger.rb: ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@20345 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-11-24 14:55:19 +00:00
nobu
2f97cf02d9 * lib/logger.rb (ProgName): fixed typo.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@20247 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-11-18 07:32:44 +00:00
nobu
abe48d7a4a * lib/logger.rb (ProgName): fixed for svn, based on a patch from
Nobuhiro IMAI at [ruby-dev:37108].


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@20245 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-11-18 07:18:29 +00:00
matz
6a7b828892 * lib/rdoc.rb: massive spelling correction patch from Evan Farrar
<evanfarrar at gmail.com> in [ruby-doc:1382] applied.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@16811 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-06-04 09:39:55 +00:00
drbrain
91edcb053b Merge RDoc changes from HEAD.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@10679 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-08-04 22:00:31 +00:00
matz
d10ecdfe73 * lib/logger.rb: improves the amount of documentation that Rdoc
picks up when processing logger.rb by moving the require
  statement back before the comment block.  a patch from Hugh
  Sasse <hgs at dmu.ac.uk>.  [ruby-core:08422]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@10638 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-07-28 16:28:27 +00:00
nahi
5d0bf56235 * lib/logger.rb (Logger): added formatter accessor to logger for
dictating the way in which the logger should format the messages it
          displays.  Thanks to Nicholas Seckar (cf. [ruby-talk:153391]) and
          Daniel Berger.

        * lib/logger.rb (Logger): added VERSION constant.

        * lib/logger.rb: removed document for LogDevice. It is an
          implementation detail and is not a public interface.

        * test/logger/test_logger.rb: added tests.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@9151 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-09-13 13:13:41 +00:00
nahi
d17031f41a * lib/logger.rb (write, shift_log?, shift_log): file shifting race
condition bug fixed.  [ruby-dev:26764]

        * test/logger/test_logger.rb: tests.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@9011 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-08-20 13:43:46 +00:00
ocean
e16487938d document fix [ruby-dev:26516] (patch from Kazuhiro NISHIYAMA)
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@8777 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-07-16 05:14:23 +00:00
nahi
1c9d6dd646 * lib/logger.rb: leading 0 padding of timestamp usec part.
* lib/csv.rb (CSV.parse): [CAUTION] behavior changed.  in the past,
          CSV.parse accepts a filename to be read-opened (it was just a
          shortcut of CSV.open(filename, 'r')).  now CSV.parse accepts a
          string or a stream to be parsed e.g.
          CSV.parse("1,2\n3,r") #=> [['1', '2'], ['3', '4']]

        * lib/csv.rb: CSV::Row and CSV::Cell are deprecated.  these classes
          are removed in the future.  in the new csv.rb, row is represented
          as just an Array.  since CSV::Row was a subclass of Array, it won't
          hurt almost all programs except one which depended CSV::Row#match.
          and a cell is represented as just a String or nil(NULL).  this
          change will cause widespread destruction.

              CSV.open("foo.csv", "r") do |row|
                row.each do |cell|
                  if cell.is_null       # using Cell#is_null
                    p "(NULL)"
                  else
                    p cell.data         # using Cell#data
                  end
                end
              end

            must be just;

              CSV.open("foo.csv", "r") do |row|
                row.each do |cell|
                  if cell.nil?
                    p "(NULL)"
                  else
                    p cell
                  end
                end
              end

        * lib/csv.rb: [CAUTION] record separator(CR, LF, CR+LF) behavior
          change.  CSV.open, CSV.parse, and CSV,generate now do not force
          opened file binmode.  formerly it set binmode explicitly.

          with CSV.open, binmode of opened file depends the given mode
          parameter "r", "w", "rb", and "wb".  CSV.parse and CSV.generate open
          file with "r" and "w".

          setting mode properly is user's responsibility now.

        * lib/csv.rb: accepts String as a fs (field separator/column separator)
          and rs (record separator/row separator)

        * lib/csv.rb (CSV.read, CSV.readlines): added.  works as IO.read and
          IO.readlines in CSV format.

        * lib/csv.rb: added CSV.foreach(path, rs = nil, &block).  CSV.foreach
          now does not handle "| cmd" as a path different from IO.foreach.
          needed?

        * test/csv/test_csv.rb: updated.

        * test/ruby/test_float.rb: added test_strtod to test Float("0").


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@6424 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-05-27 14:39:11 +00:00
matz
2b5a14bf7c * eval.c (rb_eval): too many line trace call. (ruby-bugs PR#1320)
* numeric.c (flo_to_s): tweak output string based to preserve
  decimal point and to remove trailing zeros.  [ruby-talk:97891]

* string.c (rb_str_index_m): use unsigned comparison for T_FIXNUM
  search.  [ruby-talk:97342]

* hash.c (rb_hash_equal): returns true if two hashes have same set
  of key-value set.  [ruby-talk:97559]

* hash.c (rb_hash_eql): returns true if two hashes are equal and
  have same default values.

* string.c (rb_str_equal): always returns true or false, never
  returns nil. [ruby-dev:23404]

* io.c (rb_io_reopen): should use rb_io_check_io().


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@6263 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-05-07 08:48:30 +00:00
nobu
6c30c6be3a * dln.c, io.c, lib/benchmark.rb, lib/cgi.rb, lib/csv.rb, lib/date.rb,
lib/ftools.rb, lib/getoptlong.rb, lib/logger.rb, lib/matrix.rb,
  lib/monitor.rb, lib/set.rb, lib/thwait.rb, lib/timeout.rb,
  lib/yaml.rb, lib/drb/drb.rb, lib/irb/workspace.rb, lib/net/ftp.rb,
  lib/net/http.rb, lib/net/imap.rb, lib/net/telnet.rb,
  lib/racc/parser.rb, lib/rinda/rinda.rb, lib/rinda/tuplespace.rb,
  lib/shell/command-processor.rb, lib/soap/rpc/soaplet.rb,
  lib/test/unit/testcase.rb, lib/test/unit/testsuite.rb: typo fix.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@6179 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-04-18 23:20:33 +00:00
gsinclair
a587059518 Backported revisions 1.5 -> 1.8 into ruby_1_8 branch
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@5436 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-01-11 12:46:27 +00:00
nahi
523cd7be9c * lib/logger.rb: check if the given logdevice object respond_to :write and
:close, not is_a? IO.  duck duck.

* test/logger/test_logger.rb: self IO.pipe reading/writing may be locked by the
  flood.  use tempfile.

* lib/wsdl/xmlSchema/data.rb: wrong constant reference.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4622 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-09-29 07:27:57 +00:00
nahi
406fd7754e * lib/logger.rb: add Logger#<<(msg) for writing msg without any formatting.
* test/logger/test_logger.rb: ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4586 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-09-23 14:12:42 +00:00
nahi
deb2caf4b5 * lib/logger.rb: typo fixed.
* test/logger/test_logger.rb: new file.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4580 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-09-20 02:51:06 +00:00
nahi
c40f4227f5 * lib/logger.rb: Comment fix. I don't like inline documentation... Hard to
maintain, doesn't go together with refactoring.  [defensively]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4570 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-09-18 07:58:09 +00:00
nahi
9c219837b3 * lib/logger.rb: new file. Logger, formerly called devel-logger or
Devel::Logger.

* sample/logger/*: new file.  samples of logger.rb.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4568 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-09-18 06:31:25 +00:00