[#8123] Unit/Regression tests for Ruby builtin classes and modules — Wayne Kelly <w.kelly@...>
[#8129] segmentation fault while evaluating printf:Kernel — <noreply@...>
Bugs item #4949, was opened at 2006-07-05 18:03
[#8131] thread mystery — ara.t.howard@...
[#8132] rdoc, C extensions, stop and start — "Daniel Berger" <Daniel.Berger@...>
Hi,
[#8136] Confused exception handling in Continuation Context — "Robert Dober" <robert.dober@...>
Hi all
Robert Dober schrieb:
On 7/6/06, Pit Capitain <pit@capitain.de> wrote:
Hi,
[#8142] thread/sync.rb memory corruption — ara.t.howard@...
Could someone please confirm this can be reproduced on 1.8.5 pre1?
On Thu, 6 Jul 2006, URABE Shyouhei wrote:
[#8167] bug in printf — <noreply@...>
Bugs item #4970, was opened at 2006-07-07 14:18
Hi,
On 7/25/06, nobu@ruby-lang.org <nobu@ruby-lang.org> wrote:
Hi,
[#8169] next in ensure body (Ruby 1.8.x) — "Dominik Bathon" <dbatml@...>
Hi,
[#8180] Called method not removed after remove_method — <noreply@...>
Bugs item #4998, was opened at 2006-07-09 13:20
[#8194] rss patch -- mostly doc, plus English adjustments. — Hugh Sasse <hgs@...>
This is a patch set against the stable snapshot.
Hi,
[#8196] SONY VIAOLAPTOP-------------$750USD,NOKIA N93-------------------$250USD — <noreply@...>
Bugs item #5032, was opened at 2006-07-12 18:41
I think this is more of an enhancement...
> Subject: Re: [ ruby-Bugs-5032 ] SONY
[#8201] Please implement expect.rb for Windows Ruby — <noreply@...>
Bugs item #5036, was opened at 2006-07-12 14:44
Hi,
Yukihiro Matsumoto wrote:
Hi,
[#8203] Re: [PATCH] --fqname option to test/unit/autorunner.rb — "Berger, Daniel" <Daniel.Berger@...>
> -----Original Message-----
Thanks again for getting back to me. Perhaps my original focus on the
[#8222] Rdoc patch for lib/prettyprint.rb — Hugh Sasse <hgs@...>
This is a first pass at converting the RDTool docs for lib/prettyprint.rb
[#8223] Unexpected pointer behavior with unpack — "Justin Bailey" <jgbailey@...>
I have had the opportunity to work [1] a lot with Ruby's ability to create
[#8229] open-uri fails under multithreading — <noreply@...>
Bugs item #5067, was opened at 2006-07-14 19:11
[#8243] tuplespace - make comments visible to rdoc. — Hugh Sasse <hgs@...>
comments in rdoc conventionally don't start with two # marks and don't
On Jul 17, 2006, at 10:09 AM, Hugh Sasse wrote:
That 'doesn't add anything' is meant to the last paragraph, as i understood it.
On Tue, 18 Jul 2006, Jan Svitok wrote:
[#8248] One-Click Installer: MinGW? or VC2005? — "Curt Hibbs" <ml.chibbs@...>
I just posted this to ruby-talk. But I would also like to discuss this
Dear Curt,
On 7/20/06, Kaspar Schiess <eule@space.ch> wrote:
I was wondering if the toolchain could be built around rake?
The One-Click Ruby Installer's build process is, in fact, controlled via
From my experience using both tool chains on Windows (for the ruby-prof
Tim, I'm going to top reply since your post was so long. I'm interested in
> Tim, I'm going to top reply since your post was so long. I'm interested in
On 7/19/06, Charlie Savage <cfis@savagexi.com> wrote:
Curt Hibbs wrote:
On 7/19/06, M. Edward (Ed) Borasky <znmeb@cesmail.net> wrote:
Hello,
[#8262] Instability around popen due to missing rb_thread_atfork — <noreply@...>
Patches item #5111, was opened at 2006-07-18 22:36
Hi,
On 19 Jul 2006, at 8:25, <nobu@ruby-lang.org> <nobu@ruby-lang.org>
[#8271] my sandboxing extension!! — why the lucky stiff <ruby-core@...>
I have (what feels like) very exciting news. I finally sat down to code up my
On Wed, Jul 19, 2006 at 06:40:34PM +0900, why the lucky stiff wrote:
On Wed, Jul 19, 2006 at 08:00:15PM +0900, Mauricio Fernandez wrote:
On Wed, Jul 19, 2006 at 11:18:27PM +0900, why the lucky stiff wrote:
Okay, it turns out that, in order for this to work, I also need the following
Hi,
On Thu, Jul 20, 2006 at 03:11:34PM +0900, Yukihiro Matsumoto wrote:
Hi,
On 7/20/06, Yukihiro Matsumoto <matz@ruby-lang.org> wrote:
[#8273] Regular-Expressions Problem/Bug — Reto Schuettel <reto-ruby-core@...>
Hi
On Wed, 19 Jul 2006, Reto Schuettel wrote:
Hi
>>>>> "R" == Reto Schuettel <reto-ruby-core@schuettel.ch> writes:
[#8299] Interest in NTLM/Negotiate patch for net/http? — "Justin Bailey" <jgbailey@...>
My workplace recently installed Microsoft's ISA server, which proxies all
On Jul 19, 2006, at 5:01 PM, Justin Bailey wrote:
[#8331] (Fwd) Re: Patch to Ruby in 2005 — "John Fletcher" <J.P.Fletcher@...>
Hi
Hi,
On Fri, 21 Jul 2006, nobu@ruby-lang.org wrote:
[#8379] rdoc grows to large size. — Hugh Sasse <hgs@...>
While working on that .document patch I noticed that rdoc grew to
On Jul 24, 2006, at 6:09 AM, Hugh Sasse wrote:
[#8394] Re: rdoc grows to large size. — "Berger, Daniel" <Daniel.Berger@...>
> -----Original Message-----
[#8423] doc patch: readbytes.rb — Hugh Sasse <hgs@...>
A patch against the stable snapshot.
[#8427] RDoc picking up comments from function prototypes — Tilman Sauerbeck <tilman@...>
Hi,
Tilman Sauerbeck [2006-07-29 02:39]:
On Aug 9, 2006, at 9:52 AM, Tilman Sauerbeck wrote:
[#8430] Re: doc patch: weakref. — "Berger, Daniel" <Daniel.Berger@...>
> -----Original Message-----
Hi,
Yukihiro Matsumoto wrote:
On Sat, Jul 29, 2006 at 07:37:24PM +0900, Daniel Berger wrote:
On Sun, 30 Jul 2006, Mauricio Fernandez wrote:
On Jul 31, 2006, at 3:20 AM, Hugh Sasse wrote:
On Tue, 1 Aug 2006, Eric Hodel wrote:
On Aug 1, 2006, at 2:13 AM, Hugh Sasse wrote:
[#8441] Inconsistency in scoping during module_eval? — "Charles O Nutter" <headius@...>
I have the following code:
Hi,
Why does this:
Hi,
So to clarify...
I don't want to take this thread off-course, but what I meant was
On Mon, 31 Jul 2006, Matt Todd wrote:
On 7/30/06, Mathieu Bouchard <matju@artengine.ca> wrote:
Awesome. Thank you very much for your responses. Curious. I knew a
On 7/31/06, Matt Todd <chiology@gmail.com> wrote:
[#8447] #if should be #ifdef in ruby.h — <noreply@...>
Bugs item #5243, was opened at 2006-07-30 16:31
noreply@rubyforge.org wrote:
[#8466] Multi-Line Date Formate Patch — James Edward Gray II <james@...>
It was pointed out to me that the following code is surprising:
On Jul 31, 2006, at 8:26 AM, James Edward Gray II wrote:
Hi,
tuplespace - make comments visible to rdoc.
comments in rdoc conventionally don't start with two # marks and don't
have a blank line before the thing (class, method) they document.
This patch against
-rw-r--r-- 1 hgs staff 4467350 Jul 17 17:39 stable-snapshot.tar.gz
md5sum: d4afdc6b4b827e269a2eac9f7aa7f434 stable-snapshot.tar.gz
attempts to fix this. Only the comment <I>Documentation?</i> before
WaitTemplateEntry has not been processed this way, as it doesn't add
anything at the moment.
HTH
Hugh
--- ./lib/rinda/tuplespace.rb.orig 2005-10-24 16:31:30.000000000 +0100
+++ ./lib/rinda/tuplespace.rb 2006-07-17 17:58:10.839431000 +0100
@@ -5,23 +5,23 @@
module Rinda
- ##
+ #
# A TupleEntry is a Tuple (i.e. a possible entry in some Tuplespace)
# together with expiry and cancellation data.
-
+ #
class TupleEntry
include DRbUndumped
attr_accessor :expires
- ##
+ #
# Creates a TupleEntry based on +ary+ with an optional renewer or expiry
# time +sec+.
#
# A renewer must implement the +renew+ method which returns a Numeric,
# nil, or true to indicate when the tuple has expired.
-
+ #
def initialize(ary, sec=nil)
@cancel = false
@expires = nil
@@ -30,37 +30,37 @@
renew(sec)
end
- ##
+ #
# Marks this TupleEntry as canceled.
-
+ #
def cancel
@cancel = true
end
- ##
+ #
# A TupleEntry is dead when it is canceled or expired.
-
+ #
def alive?
!canceled? && !expired?
end
- ##
+ #
# Return the object which makes up the tuple itself: the Array
# or Hash.
-
+ #
def value; @tuple.value; end
- ##
+ #
# Returns the canceled status.
-
+ #
def canceled?; @cancel; end
- ##
+ #
# Has this tuple expired? (true/false).
#
# A tuple has expired when its expiry timer based on the +sec+ argument to
# #initialize runs out.
-
+ #
def expired?
return true unless @expires
return false if @expires > Time.now
@@ -70,7 +70,7 @@
return @expires < Time.now
end
- ##
+ #
# Reset the expiry time according to +sec_or_renewer+.
#
# +nil+:: it is set to expire in the far future.
@@ -79,19 +79,19 @@
#
# Otherwise the argument refers to some kind of renewer object
# which will reset its expiry time.
-
+ #
def renew(sec_or_renewer)
sec, @renewer = get_renewer(sec_or_renewer)
@expires = make_expires(sec)
end
- ##
+ #
# Returns an expiry Time based on +sec+ which can be one of:
# Numeric:: +sec+ seconds into the future
# +true+:: the expiry time is the start of 1970 (i.e. expired)
# +nil+:: it is Tue Jan 19 03:14:07 GMT Standard Time 2038 (i.e. when
# UNIX clocks will die)
-
+ #
def make_expires(sec=nil)
case sec
when Numeric
@@ -103,43 +103,43 @@
end
end
- ##
+ #
# Retrieves +key+ from the tuple.
-
+ #
def [](key)
@tuple[key]
end
- ##
+ #
# Fetches +key+ from the tuple.
-
+ #
def fetch(key)
@tuple.fetch(key)
end
- ##
+ #
# The size of the tuple.
-
+ #
def size
@tuple.size
end
- ##
+ #
# Creates a Rinda::Tuple for +ary+.
-
+ #
def make_tuple(ary)
Rinda::Tuple.new(ary)
end
private
- ##
+ #
# Returns a valid argument to make_expires and the renewer or nil.
#
# Given +true+, +nil+, or Numeric, returns that value and +nil+ (no actual
# renewer). Otherwise it returns an expiry value from calling +it.renew+
# and the renewer.
-
+ #
def get_renewer(it)
case it
when Numeric, true, nil
@@ -155,14 +155,14 @@
end
- ##
+ #
# A TemplateEntry is a Template together with expiry and cancellation data.
-
+ #
class TemplateEntry < TupleEntry
- ##
+ #
# Matches this TemplateEntry against +tuple+. See Template#match for
# details on how a Template matches a Tuple.
-
+ #
def match(tuple)
@tuple.match(tuple)
end
@@ -175,7 +175,7 @@
end
- ##
+ #
# <i>Documentation?</i>
class WaitTemplateEntry < TemplateEntry
@@ -211,7 +211,7 @@
end
- ##
+ #
# A NotifyTemplateEntry is returned by TupleSpace#notify and is notified of
# TupleSpace changes. You may receive either your subscribed event or the
# 'close' event when iterating over notifications.
@@ -237,10 +237,10 @@
class NotifyTemplateEntry < TemplateEntry
- ##
+ #
# Creates a new NotifyTemplateEntry that watches +place+ for +event+s that
# match +tuple+.
-
+ #
def initialize(place, event, tuple, expires=nil)
ary = [event, Rinda::Template.new(tuple)]
super(ary, expires)
@@ -248,17 +248,17 @@
@done = false
end
- ##
+ #
# Called by TupleSpace to notify this NotifyTemplateEntry of a new event.
-
+ #
def notify(ev)
@queue.push(ev)
end
- ##
+ #
# Retrieves a notification. Raises RequestExpiredError when this
# NotifyTemplateEntry expires.
-
+ #
def pop
raise RequestExpiredError if @done
it = @queue.pop
@@ -266,9 +266,9 @@
return it
end
- ##
+ #
# Yields event/tuple pairs until this NotifyTemplateEntry expires.
-
+ #
def each # :yields: event, tuple
while !@done
it = pop
@@ -281,19 +281,19 @@
end
- ##
+ #
# TupleBag is an unordered collection of tuples. It is the basis
# of Tuplespace.
-
+ #
class TupleBag
def initialize # :nodoc:
@hash = {}
end
- ##
+ #
# +true+ if the TupleBag to see if it has any expired entries.
-
+ #
def has_expires?
@hash.each do |k, v|
v.each do |tuple|
@@ -303,55 +303,55 @@
false
end
- ##
+ #
# Add +ary+ to the TupleBag.
-
+ #
def push(ary)
size = ary.size
@hash[size] ||= []
@hash[size].push(ary)
end
- ##
+ #
# Removes +ary+ from the TupleBag.
-
+ #
def delete(ary)
size = ary.size
@hash.fetch(size, []).delete(ary)
end
- ##
+ #
# Finds all live tuples that match +template+.
-
+ #
def find_all(template)
@hash.fetch(template.size, []).find_all do |tuple|
tuple.alive? && template.match(tuple)
end
end
- ##
+ #
# Finds a live tuple that matches +template+.
-
+ #
def find(template)
@hash.fetch(template.size, []).find do |tuple|
tuple.alive? && template.match(tuple)
end
end
- ##
+ #
# Finds all tuples in the TupleBag which when treated as templates, match
# +tuple+ and are alive.
-
+ #
def find_all_template(tuple)
@hash.fetch(tuple.size, []).find_all do |template|
template.alive? && template.match(tuple)
end
end
- ##
+ #
# Delete tuples which dead tuples from the TupleBag, returning the deleted
# tuples.
-
+ #
def delete_unless_alive
deleted = []
@hash.keys.each do |size|
@@ -370,7 +370,7 @@
end
- ##
+ #
# The Tuplespace manages access to the tuples it contains,
# ensuring mutual exclusion requirements are met.
#
@@ -382,13 +382,13 @@
include DRbUndumped
include MonitorMixin
- ##
+ #
# Creates a new TupleSpace. +period+ is used to control how often to look
# for dead tuples after modifications to the TupleSpace.
#
# If no dead tuples are found +period+ seconds after the last
# modification, the TupleSpace will stop looking for dead tuples.
-
+ #
def initialize(period=60)
super()
@bag = TupleBag.new
@@ -399,9 +399,9 @@
@keeper = nil
end
- ##
+ #
# Adds +tuple+
-
+ #
def write(tuple, sec=nil)
entry = TupleEntry.new(tuple, sec)
start_keeper
@@ -426,16 +426,16 @@
entry
end
- ##
+ #
# Removes +tuple+
-
+ #
def take(tuple, sec=nil, &block)
move(nil, tuple, sec, &block)
end
- ##
+ #
# Moves +tuple+ to +port+.
-
+ #
def move(port, tuple, sec=nil)
template = WaitTemplateEntry.new(self, tuple, sec)
yield(template) if block_given?
@@ -470,9 +470,9 @@
end
end
- ##
+ #
# Reads +tuple+, but does not remove it.
-
+ #
def read(tuple, sec=nil)
template = WaitTemplateEntry.new(self, tuple, sec)
yield(template) if block_given?
@@ -494,9 +494,9 @@
end
end
- ##
+ #
# Returns all tuples matching +tuple+. Does not remove the found tuples.
-
+ #
def read_all(tuple)
template = WaitTemplateEntry.new(self, tuple, nil)
synchronize do
@@ -507,7 +507,7 @@
end
end
- ##
+ #
# Registers for notifications of +event+. Returns a NotifyTemplateEntry.
# See NotifyTemplateEntry for examples of how to listen for notifications.
#
@@ -518,7 +518,7 @@
#
# The TupleSpace will also notify you of the 'close' event when the
# NotifyTemplateEntry has expired.
-
+ #
def notify(event, tuple, sec=nil)
template = NotifyTemplateEntry.new(self, event, tuple, sec)
synchronize do
@@ -529,9 +529,9 @@
private
- ##
+ #
# Removes dead tuples.
-
+ #
def keep_clean
synchronize do
@read_waiter.delete_unless_alive.each do |e|
@@ -549,10 +549,10 @@
end
end
- ##
+ #
# Notifies all registered listeners for +event+ of a status change of
# +tuple+.
-
+ #
def notify_event(event, tuple)
ev = [event, tuple]
@notify_waiter.find_all_template(ev).each do |template|
@@ -560,9 +560,9 @@
end
end
- ##
+ #
# Creates a thread that scans the tuplespace for expired tuples.
-
+ #
def start_keeper
return if @keeper && @keeper.alive?
@keeper = Thread.new do
@@ -573,9 +573,9 @@
end
end
- ##
+ #
# Checks the tuplespace to see if it needs cleaning.
-
+ #
def need_keeper?
return true if @bag.has_expires?
return true if @read_waiter.has_expires?