[#18436] [ANN] Ruby 1.9.1 feature freeze — "Yugui (Yuki Sonoda)" <yugui@...>
Hi all,
On Tue, Sep 2, 2008 at 3:09 PM, Yugui (Yuki Sonoda) <yugui@yugui.jp> wrote:
Michael Fellinger schrieb:
On 12/09/2008, Michael Neumann <mneumann@ntecs.de> wrote:
Hi,
Hi, Yusuke
Hi,
Ryan Davis wrote:
Dave Thomas wrote:
Jim Weirich wrote:
On Wed, Oct 8, 2008 at 3:05 AM, Ryan Davis <ryand-ruby@zenspider.com> wrote=
On Wed, Oct 08, 2008 at 09:28:22PM +0900, Austin Ziegler wrote:
2008/10/8 Paul Brannan <pbrannan@atdesk.com>:
T24gV2VkLCBPY3QgOCwgMjAwOCBhdCA0OjM4IFBNLCBQaXQgQ2FwaXRhaW4gPHBpdC5jYXBpdGFp
Trans wrote:
Hi,
Hi,
NARUSE, Yui wrote:
On Fri, Oct 3, 2008 at 12:01 AM, David Flanagan <david@davidflanagan.com> wrote:
[#18437] Class as second-generation singleton class — "David A. Black" <dblack@...>
Hi --
[#18444] [PATCH] remove timer signal after last ruby thread has died — Joe Damato <ice799@...>
Hi -
Hi,
[#18446] Global constants and other magic in 1.9 stdlib — "Michal Suchanek" <hramrach@...>
Hello
On Thu, Sep 4, 2008 at 05:01, Michal Suchanek <hramrach@centrum.cz> wrote:
[#18447] useless external functions — SASADA Koichi <ko1@...>
Hi,
[#18452] [ANN] Ruby 1.9.1 feature freeze — "Roger Pack" <rogerpack2005@...>
Would it be possible to have a few patches applied before freeze [if
Hi,
Hi,
Hi,
[#18454] WEBrick issue - HTTP/1.1 and IO objects — Brian Candler <B.Candler@...>
I am wondering if the following is a bug in WEBrick.
[#18486] Ruby 1.9 strings & character encoding — "Michael Selig" <michael.selig@...>
Firstly, I apologise if I am going over old ground here - I haven't been
Hi,
On Mon, 08 Sep 2008 19:45:36 +1000, Yukihiro Matsumoto
Hi,
On Sep 8, 2008, at 10:43 AM, NARUSE, Yui wrote:
# First off, I'm neutral to this issue
On Sep 8, 2008, at 9:06 PM, Urabe Shyouhei wrote:
In article <3119E5AB-AEC8-4FEE-B2FA-8C75482E0E9D@sun.com>,
At 18:07 08/09/10, Manfred Stienstra wrote:
In article <6.0.0.20.2.20080916184943.08a281f0@localhost>,
On 16/09/2008, Tanaka Akira <akr@fsij.org> wrote:
In article <a5d587fb0809170303x71ebde31r8adae082b82af182@mail.gmail.com>,
On Tue, 09 Sep 2008 03:43:54 +1000, NARUSE, Yui <naruse@airemix.jp> wrote:
In article <op.ug6ubske9245dp@kool>,
In article <9888DBB2-0FE8-4C5C-8EF0-02D7C30157FA@pragprog.com>,
[#18513] Make irb start a new line on EOF — "Daniel Luz" <dev@...>
Other interactive interpreters (namely `python`, `lua`, `psh`, and
[#18522] Warning for trailing comma in method declarations — Kornelius Kalnbach <murphy@...>
hello!
[#18525] Ruby for OS/2 Maintainer — "Brendan Oakley" <gentux2@...>
Hello.
[#18532] Ruby 1.9 string performance — "Michael Selig" <michael.selig@...>
I would like to submit the attached patch to string.c which substantially
[#18535] [Bug #557] Regexp does not match longest string — Wim Yedema <redmine@...>
Bug #557: Regexp does not match longest string
Wim Yedema schrieb:
2008/9/10 Wolfgang N=E1dasi-Donner <ed.odanow@wonado.de>:
Robert Klemme schrieb:
[#18572] Working on CSV's Encoding Support — James Gray <james@...>
I'm trying to get the standard CSV library ready for m17n in Ruby
On Sat, Sep 13, 2008 at 6:32 PM, James Gray <james@grayproductions.net> wrote:
On Sep 13, 2008, at 5:44 PM, Gregory Brown wrote:
On Sep 13, 2008, at 5:39 PM, James Gray wrote:
On Sep 13, 2008, at 11:55 PM, James Gray wrote:
At 00:43 08/09/15, James Gray wrote:
On Sun, 14 Sep 2008 14:48:47 +1000, James Gray <james@grayproductions.net>
On Sep 14, 2008, at 2:49 AM, Michael Selig wrote:
On Mon, 15 Sep 2008 04:51:55 +1000, James Gray <james@grayproductions.net>
On Sep 14, 2008, at 6:48 PM, Michael Selig wrote:
On Mon, 15 Sep 2008 10:45:52 +1000, James Gray <james@grayproductions.net>
On Sep 14, 2008, at 8:42 PM, Michael Selig wrote:
[#18594] [Bug #564] Regexp fails on UTF-16 & UTF-32 character encodings — Michael Selig <redmine@...>
Bug #564: Regexp fails on UTF-16 & UTF-32 character encodings
In article <48cddb5533ad_8725cd9524342@redmine.ruby-lang.org>,
On Mon, 15 Sep 2008 18:08:14 +1000, Tanaka Akira <akr@fsij.org> wrote:
[#18600] [Bug #566] String encoding error messages are inconsistent — Michael Selig <redmine@...>
Bug #566: String encoding error messages are inconsistent
[#18631] Request: File.binread (Or File.read_binary) — "Gregory Brown" <gregory.t.brown@...>
Just incase it got lost in the other thread, I'd like to recommend the
Hi,
On Wed, Sep 17, 2008 at 12:35 PM, Yukihiro Matsumoto <matz@ruby-lang.org> wrote:
On Sep 17, 2008, at 09:48 AM, Gregory Brown wrote:
On Sep 18, 2008, at 6:56 PM, Eric Hodel wrote:
[#18637] Reading non-ascii compatible files — "Michael Selig" <michael.selig@...>
Hi,
Hi,
[#18640] Character encodings - a radical suggestion — "Michael Selig" <michael.selig@...>
Hi,
On Sep 16, 2008, at 8:20 PM, Michael Selig wrote:
On Sep 16, 2008, at 8:20 PM, Michael Selig wrote:
On Wed, 17 Sep 2008 12:51:14 +1000, James Gray <james@grayproductions.net>
On Sep 16, 2008, at 11:21 PM, Michael Selig wrote:
Hi,
On 9/17/2008 3:39 PM, NARUSE, Yui wrote:
Hi,
Hi,
On Sep 17, 2008, at 9:45 AM, NARUSE, Yui wrote:
At 00:01 08/09/18, Yukihiro Matsumoto wrote:
Hi,
On Fri, 19 Sep 2008 18:24:41 +1000, Yukihiro Matsumoto
Oops, I misfired my mail reader; the following is the right one:
On Fri, 19 Sep 2008 19:52:30 +1000, Yukihiro Matsumoto
Hi,
On Sun, 21 Sep 2008 02:05:30 +1000, Yukihiro Matsumoto
Hello Michael,
On Sep 21, 2008, at 9:35 PM, Martin Duerst wrote:
On Mon, 22 Sep 2008 12:35:49 +1000, Martin Duerst <duerst@it.aoyama.ac.jp>
At 12:25 08/09/22, Michael Selig wrote:
On Sep 21, 2008, at 9:35 PM, Martin Duerst wrote:
Hi,
Hi,
----- Original Message -----
On Sep 17, 2008, at 9:32 PM, Michael Selig wrote:
On Sep 17, 2008, at 8:43 PM, James Gray wrote:
[#18698] Next design meeting — Evan Phoenix <evan@...>
Hi everyone,
[#18710] Encoding Safe Regexp.escape() — James Gray <james@...>
As part of my ongoing process to make CSV m17n savvy, I'm needing an =20
[#18750] M17N Inspect Messages — James Gray <james@...>
What is the correct way to handle inspect() with regards to M17N? Do
[#18762] [Feature #578] add method to disassemble Proc objects — Roger Pack <redmine@...>
Feature #578: add method to disassemble Proc objects
[#18813] Feature idea: Class#subclasses — Charles Oliver Nutter <charles.nutter@...>
In JRuby we have added an extension that provides a "subclasses" method
[#18815] mv trunk/include/ruby/node.h to trunk/node.h — SASADA Koichi <ko1@...>
I moved trunk/include/ruby/node.h to trunk/node.h. On 1.9, only
[#18820] miniunit added — Ryan Davis <ryand-ruby@...>
I've replaced test/unit with miniunit in order to meet the feature
SASADA Koichi wrote:
I got it.
[#18844] [Bug #592] String#rstrip sometimes strips NULLs, sometimes doesn't - encoding dependent — Michael Selig <redmine@...>
Bug #592: String#rstrip sometimes strips NULLs, sometimes doesn't - encoding dependent
[#18861] tokenizing regular expressions when passed as method params — "Seth Dillingham" <seth.dillingham@...>
Hi,
[#18866] I'm changing the PickAxe to document miniunit — Dave Thomas <dave@...>
What's the correct way to load it up:
[#18872] [RIP] Guy Decoux. — "Jean-Fran輟is Tr穗" <jftran@...>
Hello,
[#18879] Mini Unit changing exceptions — Jim Weirich <jim.weirich@...>
Why does mini-unit change the exception in the test below?
On Sep 25, 2008, at 3:13 AM, Ryan Davis wrote:
[#18888] Re: [ruby-cvs:26761] Ruby:r19543 (trunk): Not a typo. The name is better plural. Better English and more consistent with the other assertions. — Nobuyoshi Nakada <nobu@...>
Hi,
[#18899] refute_{equal, match, nil, same} is not useful — Fujioka <fuj@...>
Hi,
On Thu, Sep 25, 2008 at 8:15 AM, Fujioka <fuj@rabbix.jp> wrote:
On Tue, Oct 7, 2008 at 10:40 PM, Ryan Davis <ryand-ruby@zenspider.com> wrote:
>I can actually see Ryan's point of saying that "refute_equal a, b"
Related to this:
On Wed, Oct 8, 2008 at 2:48 AM, Martin Duerst <duerst@it.aoyama.ac.jp>wrote:
2008/10/8 Eric Mahurin :
On Wed, Oct 8, 2008 at 5:08 PM, Jean-Fran=E7ois Tr=E2n
[#18905] output format of miniunit — "Yusuke ENDOH" <mame@...>
Hi,
Hi,
[#18931] test/testunit and miniunit — Tanaka Akira <akr@...>
Currently test-all exits prematurely.
[#18934] [ANN] delay of releasing 1.9.0-5 — "Yugui (Yuki Sonoda)" <yugui@...>
Hi,
[#18937] A stupid question... — Dave Thomas <dave@...>
Just what was wrong with Test::Unit? Sure, it was slightly bloated.
> -----Original Message-----
On Sun, Sep 28, 2008 at 9:10 PM, Trans <transfire@gmail.com> wrote:
On Mon, Sep 29, 2008 at 1:20 AM, Meinrad Recheis
On Sep 28, 2008, at 3:19 PM, hemant wrote:
2008/9/28 Trans <transfire@gmail.com>:
[#18944] [RCR] $ABOUT.ts — _why <why@...>
I don't want to be indelicate and we can address this some other
[#18985] Encodings::default_internal patch — "Michael Selig" <michael.selig@...>
Hi,
On Sep 27, 2008, at 2:28 AM, Michael Selig wrote:
On Sun, 28 Sep 2008 02:02:57 +1000, James Gray <james@grayproductions.net>
On Sep 27, 2008, at 8:56 PM, Michael Selig wrote:
[#18986] miniunit problems and release of Ruby 1.9.0-5 — "Yugui (Yuki Sonoda)" <yugui@...>
Hi,
Hi,
Hi,
Hi,
[#19043] Ruby is "stealing" names from operating system API:s — "Johan Holmberg" <johan556@...>
Hi!
Hi,
[ruby-core:18905] output format of miniunit
Hi,
The output format of miniunit changed dramatically from one of Test::Unit.
I think that compatibility must be more respected because Test::Unit is not
deprecated but removed and because we don't have the time to discuss change
of the behavior/specification.
In addition, I believe that the old format is easy to see in many aspects.
So I insist:
(1) miniunit should use pretty_inspect. Currently, long message that
spreads to multiple lines is never human-readable. If you mind speed,
I think it's a good solution to provide a command-line option that
disables use of pretty_print. At least, it should provide a option
that enables pretty_inspect.
(2) An expected and actual values should be put in angle brackets, like
<"foo">. This is very helpful to distinguish values and template
messages by a glance.
(3) An expected and actual values should be put at head of line. This also
improves visibility much.
Thank you for consideration,
Here is an instant patch (I didn't test enough):
Index: lib/mini/test.rb
===================================================================
--- lib/mini/test.rb (revision 19552)
+++ lib/mini/test.rb (working copy)
@@ -43,11 +43,28 @@
module Assertions
def mu_pp(obj)
- s = obj.inspect
+ if Assertions.use_pp
+ begin
+ require 'pp'
+ rescue LoadError
+ Assertions.use_pp = false
+ end
+ s = obj.pretty_inspect.chomp
+ else
+ s = obj.inspect
+ end
s = s.force_encoding(Encoding.default_external) if defined? Encoding
s
end
+ def Assertions.use_pp=(f)
+ @use_pp = f
+ end
+
+ def Assertions.use_pp
+ @use_pp
+ end
+
def _assertions= n
@_assertions = n
end
@@ -57,7 +74,7 @@
end
def assert test, msg = nil
- msg ||= "Failed assertion, no message given."
+ msg ||= "failed assertion, no message given."
self._assertions += 1
unless test then
msg = msg.call if Proc === msg
@@ -67,24 +84,24 @@
end
def assert_block msg = nil
- msg = message(msg) { "Expected block to return true value" }
+ msg = message(msg) { "block expected to return true value" }
assert yield, msg
end
def assert_empty obj, msg = nil
- msg = message(msg) { "Expected #{obj.inspect} to be empty" }
+ msg = message(msg) { "empty expected but was\n<#{mu_pp(obj)}>" }
assert_respond_to obj, :empty?
assert obj.empty?, msg
end
def assert_equal exp, act, msg = nil
- msg = message(msg) { "Expected #{mu_pp(exp)}, not #{mu_pp(act)}" }
+ msg = message(msg) { "<#{mu_pp(exp)}> expected but
was\n<#{mu_pp(act)}>" }
assert(exp == act, msg)
end
def assert_in_delta exp, act, delta = 0.001, msg = nil
n = (exp - act).abs
- msg = message(msg) { "Expected #{exp} - #{act} (#{n}) to be < #{delta}" }
+ msg = message(msg) { "<#{exp}> and\n<#{act}> expected to be
within\n<#{delta}> of each other" }
assert delta > n, msg
end
@@ -93,39 +110,39 @@
end
def assert_includes collection, obj, msg = nil
- msg = message(msg) { "Expected #{mu_pp(collection)} to include
#{mu_pp(obj)}" }
+ msg = message(msg) { "<#{mu_pp(collection)}> expected to
include\n<#{mu_pp(obj)}>" }
assert_respond_to collection, :include?
assert collection.include?(obj), msg
end
def assert_instance_of cls, obj, msg = nil
- msg = message(msg) { "Expected #{mu_pp(obj)} to be an instance
of #{cls}" }
+ msg = message(msg) { "<#{mu_pp(obj)}> expected to be an
instance of\n<#{cls}> but was\n<#{obj.class}>" }
flip = (Module === obj) && ! (Module === cls) # HACK for specs
obj, cls = cls, obj if flip
assert cls === obj, msg
end
def assert_kind_of cls, obj, msg = nil # TODO: merge with instance_of
- msg = message(msg) { "Expected #{mu_pp(obj)} to be a kind of #{cls}" }
+ msg = message(msg) { "<#{mu_pp(obj)}> expected to be
kind_of?\n<#{cls}> but was\n<#{obj.class}>" }
flip = (Module === obj) && ! (Module === cls) # HACK for specs
obj, cls = cls, obj if flip
assert obj.kind_of?(cls), msg
end
def assert_match exp, act, msg = nil
- msg = message(msg) { "Expected #{mu_pp(act)} to match #{mu_pp(exp)}" }
+ msg = message(msg) { "<#{mu_pp(act)}> expected to be
=~\n<#{mu_pp(exp)}>" }
assert_respond_to act, :=~
exp = /#{exp}/ if String === exp && String === act
assert act =~ exp, msg
end
def assert_nil obj, msg = nil
- msg = message(msg) { "Expected #{mu_pp(obj)} to be nil" }
+ msg = message(msg) {"<#{mu_pp(obj)}> expected to be nil" }
assert obj.nil?, msg
end
def assert_operator o1, op, o2, msg = nil
- msg = message(msg) { "Expected #{mu_pp(o1)} to be #{op} #{mu_pp(o2)}" }
+ msg = message(msg) { "<#{mu_pp(o1)}> expected to
be\n#{op}\n<#{mu_pp(o2)}>" }
assert o1.__send__(op, o2), msg
end
@@ -136,43 +153,42 @@
yield
should_raise = true
rescue Exception => e
- assert_includes exp, e.class
- exception_details(e, "<#{mu_pp(exp)}> exception expected, not")
+ assert_includes exp, e.class, exception_details(e,
"<#{mu_pp(exp)}> exception expected but was\n")
return e
end
exp = exp.first if exp.size == 1
- fail "#{mu_pp(exp)} expected but nothing was raised." if should_raise
+ fail "<#{mu_pp(exp)}> exception expected but nothing was
raised." if should_raise
end
def assert_respond_to obj, meth, msg = nil
- msg = message(msg) { "Expected #{mu_pp(obj)} to respond to #{meth}" }
+ msg = message(msg) { "<#{mu_pp(obj)}> of type <#{obj.class}>
expected to respond_to?<#{meth}>" }
flip = (Symbol === obj) && ! (Symbol === meth) # HACK for specs
obj, meth = meth, obj if flip
assert obj.respond_to?(meth), msg
end
def assert_same exp, act, msg = nil
- msg = message(msg) { "Expected #{mu_pp(act)} to be the same as
#{mu_pp(exp)}" }
+ msg = message(msg) { "<#{mu_pp(exp)}> with id
<#{exp.object_id}> expected to be equal? to\n<#{mu_pp(act)}> with id
<#{act.object_id}>" }
assert exp.equal?(act), msg
end
def assert_send send_ary, msg = nil
- recv, msg, *args = send_ary
- msg = message(msg) { "Expected ##{msg} on #{mu_pp(recv)} to
return true" }
- assert recv.__send__(msg, *args), msg
+ recv, meth, *args = send_ary
+ msg = message(msg) { "#{mu_pp(recv)} expected to respond
to\n<#{meth}(#{mu_pp(args)})> with a true value" }
+ assert recv.__send__(meth, *args), msg
end
def assert_throws sym, msg = nil
- default = "Expected #{mu_pp(sym)} to have been thrown"
+ default = "<#{mu_pp(sym)}> should have been thrown"
caught = true
catch(sym) do
begin
yield
rescue ArgumentError => e # 1.9 exception
- default += ", not #{e.message.split(/ /).last}"
+ default += " but\n<#{e.message.split(/ /).last}> was thrown"
rescue NameError => e # 1.8 exception
- default += ", not #{e.name.inspect}"
+ default += " but\n<#{e.name.inspect}> was thrown"
end
caught = false
end
@@ -225,24 +241,25 @@
end
def refute test, msg = nil
- msg ||= "Failed refutation, no message given"
+ msg ||= "failed refutation, no message given"
not assert(! test, msg)
end
def refute_empty obj, msg = nil
- msg = message(msg) { "Expected #{obj.inspect} to not be empty" }
+ msg = message(msg) { "empty not expected but was\n#{obj.inspect}" }
assert_respond_to obj, :empty?
refute obj.empty?, msg
end
def refute_equal exp, act, msg = nil
- msg = message(msg) { "Expected #{mu_pp(act)} to not be equal to
#{mu_pp(exp)}" }
+ msg = message(msg) { "<#{mu_pp(exp)}> not expected but
was\n<#{mu_pp(act)}>" }
refute exp == act, msg
end
def refute_in_delta exp, act, delta = 0.001, msg = nil
n = (exp - act).abs
- msg = message(msg) { "Expected #{exp} - #{act} (#{n}) to not be
< #{delta}" }
+ msg = message(msg) { "<#{exp}> and\n<#{act}> not expected to be
within\n<#{del
+ ta}> of each other" }
refute delta > n, msg
end
@@ -251,49 +268,49 @@
end
def refute_includes collection, obj, msg = nil
- msg = message(msg) { "Expected #{mu_pp(collection)} to not
include #{mu_pp(obj)}" }
+ msg = message(msg) { "<#{mu_pp(collection)}> not expected to
include\n<#{mu_pp(obj)}>" }
assert_respond_to collection, :include?
refute collection.include?(obj), msg
end
def refute_instance_of cls, obj, msg = nil
- msg = message(msg) { "Expected #{mu_pp(obj)} to not be an
instance of #{cls}" }
+ msg = message(msg) { "<#{mu_pp(obj)}> not expected to be an
instance of\n<#{cls}> but was\n<#{obj.class}>" }
flip = (Module === obj) && ! (Module === cls) # HACK for specs
obj, cls = cls, obj if flip
refute cls === obj, msg
end
def refute_kind_of cls, obj, msg = nil # TODO: merge with instance_of
- msg = message(msg) { "Expected #{mu_pp(obj)} to not be a kind
of #{cls}" }
+ msg = message(msg) { "<#{mu_pp(obj)}> not expected to be
kind_of?\n<#{cls}> but was\n<#{obj.class}>" }
flip = (Module === obj) && ! (Module === cls) # HACK for specs
obj, cls = cls, obj if flip
refute obj.kind_of?(cls), msg
end
def refute_match exp, act, msg = nil
- msg = message(msg) { "Expected #{mu_pp(act)} to not match
#{mu_pp(exp)}" }
+ msg = message(msg) { "<#{mu_pp(act)}> not expected to be
=~\n<#{mu_pp(exp)}>" }
refute act =~ exp, msg
end
def refute_nil obj, msg = nil
- msg = message(msg) { "Expected #{mu_pp(obj)} to not be nil" }
+ msg = message(msg) {"<#{mu_pp(obj)}> not expected to be nil" }
refute obj.nil?, msg
end
def refute_operator o1, op, o2, msg = nil
- msg = message(msg) { "Expected #{mu_pp(o1)} to not be #{op}
#{mu_pp(o2)}" }
+ msg = message(msg) { "<#{mu_pp(o1)}> not expected to
be\n#{op}\n<#{mu_pp(o2)}>" }
refute o1.__send__(op, o2), msg
end
def refute_respond_to obj, meth, msg = nil
- msg = message(msg) { "Expected #{mu_pp(obj)} to not respond to #{meth}" }
+ msg = message(msg) { "<#{mu_pp(obj)}> of type <#{obj.class}>
not expected to respond_to?<#{meth}>" }
flip = (Symbol === obj) && ! (Symbol === meth) # HACK for specs
obj, meth = meth, obj if flip
refute obj.respond_to?(meth), msg
end
def refute_same exp, act, msg = nil
- msg = message(msg) { "Expected #{mu_pp(act)} to not be the same
as #{mu_pp(exp)}" }
+ msg = message(msg) { "<#{mu_pp(exp)}> with id
<#{exp.object_id}> not expected to be equal? to\n<#{mu_pp(act)}> with
id <#{act.object_id}>" }
refute exp.equal?(act), msg
end
end
@@ -347,6 +364,7 @@
def run args
@verbose = args.delete('-v')
+ Assertions.use_pp = true if args.delete('-pp')
filter = if args.first =~ /^(-n|--name)$/ then
args.shift
--
Yusuke ENDOH <mame@tsg.ne.jp>