[#28395] [Bug #2830] Some methods raise ArgumentError instead of TypeError — Marc-Andre Lafortune <redmine@...>
Bug #2830: Some methods raise ArgumentError instead of TypeError
[#28405] [Feature #2832] Vector#each and Enumerable — Marc-Andre Lafortune <redmine@...>
Feature #2832: Vector#each and Enumerable
[#28452] Watched issues on redmine — Caleb Clausen <vikkous@...>
Is there a page on redmine that will show me the list of issues that
[#28482] Question on scoped constant resolution Class vs Module — Peter McLain <peter.mclain@...>
I asked this on ruby-talk, but didn't get anywhere. Someone suggested
[#28505] [Bug #2838] Ruby 1.8.7 (2009-06-12 patchlevel 174) strange round behaviour — P K <redmine@...>
Bug #2838: Ruby 1.8.7 (2009-06-12 patchlevel 174) strange round behaviour
[#28552] [Bug #2945] Regexp#=== is failed by an exception when the exception is occurred in method_missing — Kenta Murata <redmine@...>
Bug #2945: Regexp#=== is failed by an exception when the exception is occurred in method_missing
Hi,
Hi,
Hi,
Hi,
[#28561] Ruby::DL vs Ruby::FFI — Aston <blackapache512-ticket@...>
Ruby.DL and FFI libraries are great for programmers like me who are not internet programmers, but are more interested in scientific and number processing etc.
On Mon, Mar 8, 2010 at 4:56 PM, Aston <blackapache512-ticket@yahoo.com> wrote:
[#28576] "rake not found" error on a rubygems test — Yusuke ENDOH <mame@...>
Hi Eric Hodel,
[#28583] build failure on 26861 using msys/mingw — Jon <jon.forums@...>
Can anyone replicate? I've recently updated both binutils and the mingw runtime so this may very well be my configuration.
[#28602] [Bug #2952] Time.strftime format %N — Russell Penney <redmine@...>
Bug #2952: Time.strftime format %N
[#28643] [Bug #2957] IO.print emits field separator after each object, rather than between — Daniel Kelley <redmine@...>
Bug #2957: IO.print emits field separator after each object, rather than between
[#28665] [ANN] 1.9.2 release plan — Yusuke ENDOH <mame@...>
Hi,
[#28686] trunk (26947) build fail with msys/mingw/vista — Jon <jon.forums@...>
I get the following build failure when msysgit's "c:\git\cmd" dir is on PATH.
On Tue, Mar 16, 2010 at 5:50 AM, Jon <jon.forums@gmail.com> wrote:
[#28712] When a trace hook raises an exception, should it terminate the program? — Rocky Bernstein <rockyb@...>
In Ruby 1.8 and the Ruby 1.9 trunk when running a trace hook that raises an
On Wed, Mar 17, 2010 at 5:42 AM, Rocky Bernstein <rockyb@rubyforge.org> wrote:
Let me clarify a bit because I think some of the facts (some by me) may have
On Thu, Mar 18, 2010 at 5:52 AM, Rocky Bernstein <rockyb@rubyforge.org> wrote:
[#28724] [Feature:trunk] Array#repeated_(permutation|combination) — "KISHIMOTO, Makoto" <ksmakoto@...4u.or.jp>
New methods Array#repeated_(permutation|combination).
[#28735] [Bug #2982] Ruby tries to link with both openssl and readline — Lucas Nussbaum <redmine@...>
Bug #2982: Ruby tries to link with both openssl and readline
Issue #2982 has been updated by caleb clausen.
Hi,
[#28783] [Feature #2065] An ancestors iterator — Simon Chiang <redmine@...>
Issue #2065 has been updated by Simon Chiang.
Hi,
[#28837] [Bug #2993] Module#instance_methods' flag seems to be ignored in singleton classes — Xavier Noria <redmine@...>
Bug #2993: Module#instance_methods' flag seems to be ignored in singleton classes
[#28859] st.c: pool allocator for tables and entries — Eric Wong <normalperson@...>
Hi all,
[#28865] Can DRb be used across a fork() — Chris Schlaeger <cschlaeger@...>
I'm trying to use DRb to communicate between a parent and child
[#28871] WeakRef extending Delegator is a bug waiting to happen? — Charles Oliver Nutter <headius@...>
Hopefully this doesn't contradict my other email too much :)
[#28902] [Bug #2998] gets fails in mingw — Roger Pack <redmine@...>
Bug #2998: gets fails in mingw
[#28907] [Bug #3000] Open SSL Segfaults — Christian Höltje <redmine@...>
Bug #3000: Open SSL Segfaults
Issue #3000 has been updated by Hiroshi NAKAMURA.
Hi,
Hi,
Hi,
[#28924] [Bug #3005] Ruby core dump - [BUG] rb_sys_fail() - errno == 0 — Sebastian YEPES <redmine@...>
Bug #3005: Ruby core dump - [BUG] rb_sys_fail() - errno == 0
[#28954] [Feature #3010] slow require gems in ruby 1.9.1 — Miao Jiang <redmine@...>
Feature #3010: slow require gems in ruby 1.9.1
[#29019] [Bug #3015] NetBSD vs test/dl — Michael Graff <redmine@...>
Bug #3015: NetBSD vs test/dl
On Fri, Mar 26, 2010 at 11:49:59AM +0900, Michael Graff wrote:
[#29031] [Feature #1395](Open) Steppable Kernel::eval — Yusuke Endoh <redmine@...>
Issue #1395 has been updated by Yusuke Endoh.
[#29045] [Feature #3021] Array#product should accept a block. — Marc-Andre Lafortune <redmine@...>
Feature #3021: Array#product should accept a block.
[#29092] merged psych to trunk — Aaron Patterson <aaron@...>
Hey everyone,
[#29118] [Bug #3051] psych is too osx-specifc — Michael Graff <redmine@...>
Bug #3051: psych is too osx-specifc
[#29128] [Bug #3052] DRb::start_service fails to detect used port — Chris Schlaeger <redmine@...>
Bug #3052: DRb::start_service fails to detect used port
Issue #3052 has been updated by Yusuke Endoh.
[#29131] [trunk:bug] Many rubygems tests fail with psych tests. — Tanaka Akira <akr@...>
Many rubygems tests fail with psych tests.
(2010/03/30 17:55), Tanaka Akira wrote:
On Tue, Mar 30, 2010 at 07:13:32PM +0900, NARUSE, Yui wrote:
[#29161] [Bug #3058] Inconsistent eol conversion of IO#read on Windows — Heesob Park <redmine@...>
Bug #3058: Inconsistent eol conversion of IO#read on Windows
[#29167] [Feature #3067] complex.c : Question: why Complex#~ is disabled? It's in the doc — Benoit Daloze <redmine@...>
Feature #3067: complex.c : Question: why Complex#~ is disabled? It's in the doc
[#29179] [Bug #3071] Convert rubygems and rdoc to use psych — Aaron Patterson <redmine@...>
Bug #3071: Convert rubygems and rdoc to use psych
Doesn't this mean the the RubyGems codevase would now be forked
Issue #3071 has been updated by Nobuyoshi Nakada.
[#29186] [Bug #3072] Classes Inheriting from Data — Run Paint Run Run <redmine@...>
Bug #3072: Classes Inheriting from Data
[ruby-core:28700] Re: [Feature #1400] Please add a method to enumerate fields in OpenStruct
unsubscribe
-----Original Message-----
From: "Dan Rathbun" [redmine@ruby-lang.org]
Date: 03/16/2010 04:39 PM
To: ruby-core@ruby-lang.org
Subject: Re: [ruby-core:28699] [Feature #1400] Please add a method to enumerate fields in OpenStruct
Note: Original message sent as attachment
------------------------------------------------------------
Home Improvement Projects
Click here to find experienced pros to help with your home improvement project.
http://216.21.215.31/c?cp=QDUzL5DtxXzfSbgdUgxN8wAAKZVY5T0TJO72Jl_bl7CO2arfAAYAAAAAAAAAAAAAAAAAAADNAAAAAAAAAAAAAAAAAAAShK6NZeY=
--1912791164-1268773977=:23085
Content-transfer-encoding: quoted-printable
Content-Type: text/html; charset=UTF-8
unsubscribe<br>
<br>
<br>
<br>
<br>
-----Original Message-----<br>
From: "Dan Rathbun" [redmine@ruby-lang.org]<br>
Date: 03/16/2010 04:39 PM<br>
To: ruby-core@ruby-lang.org<br>
Subject: Re: [ruby-core:28699] [Feature #1400] Please add a method to enumer=
ate fields in OpenStruct<br>
<br>
Note: Original message sent as attachment<hr style=3D" border: 0px; border-t=
op: thin solid grey; margin-top: 15px; padding-top: 5px;"><TABLE height=3D58=
width=3D500 cellborder=3D0 cellpadding=3D0 cellspacing=3D0 border=3D0 =
=
style=3Dcursor:pointer; > =
<TR> =
=
<TD valign=3Dcenter> =
=
<TABLE cellborder=3D0 cellpadding=3D0 cellspacing=3D0 border=3D0> =
<TR> =
<TD rowspan=3D3> </TD> =
<TD><SPAN><a href=3D"http://216.21.215.31/c?cp=3DQDUzL5DtxXzfSbgdUgx=
N8wAAKZVY5T0TJO72Jl_bl7CO2arfAAYAAAAAAAAAAAAAAAAAAADNAAAAAAAAAAAAAAAAAAAShK6=
NZeY=3D" target=3D"_blank" style=3Dtext-decoration:underline;font-size:12pt;=
font-family:Arial;color:green;cursor:pointer;>Home Improvement Projects</a><=
/SPAN></TD> =
</TR> =
<TR> =
<TD><SPAN><a href=3D"http://216.21.215.31/c?cp=3DQDUzL5DtxXzfSbgdUgx=
N8wAAKZVY5T0TJO72Jl_bl7CO2arfAAYAAAAAAAAAAAAAAAAAAADNAAAAAAAAAAAAAAAAAAAShK6=
NZeY=3D" target=3D"_blank" style=3Dtext-decoration:none;font-size:8pt;font-f=
amily:Arial;color:black;cursor:pointer;>Click here to find experienced pros =
to help with your home improvement project.</a></SPAN></TD> =
</TR> =
<TR> =
<TD><SPAN><a href=3D"http://216.21.215.31/c?cp=3DQDUzL5DtxXzfSbgdUgx=
N8wAAKZVY5T0TJO72Jl_bl7CO2arfAAYAAAAAAAAAAAAAAAAAAADNAAAAAAAAAAAAAAAAAAAShK6=
NZeY=3D" target=3D"_blank" style=3Dtext-decoration:underline;font-size:8pt;f=
ont-family:Arial;color:#FD0000;cursor:pointer;>Click Here For More Informati=
on</a></SPAN></TD> =
</TR> =
</TABLE> =
</TD> =
</TR> =
<TR> =
<TD colspan=3D2> </TD> =
</TR> =
</TABLE>
--1912791164-1268773977=:23085--
--1913079234-1268773977=:23085
Content-Type: message/rfc822; charset=UTF-8; name="0riginal_message"
Content-Disposition: attachment; filename="0riginal_message"
x-btFieldFwd: Yes
Return-Path: <ruby-core-admin@ruby-lang.org>
X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on
aspam007.roc2.bluetie.com
X-Spam-Level:
X-Spam-Status: No, score=0.1 required=5.0 tests=RDNS_NONE autolearn=disabled
version=3.2.5
X-Original-To: achoi.myway@masc011.roc2.bluetie.com
Delivered-To: achoi.myway@masc011.roc2.bluetie.com
Received: from inbound005.roc2.bluetie.com (btroc2-lb.roc2.bluetie.com [10.200.2.8])
by mas000.roc2.bluetie.com (Postfix) with ESMTP id 58688D60121
for <achoi.myway@masc011.roc2.bluetie.com>; Tue, 16 Mar 2010 16:39:37 -0400 (EDT)
Received: from carbon.ruby-lang.org ([221.186.184.68])
by inbound005.roc2.bluetie.com with inbound005
id twfY1d00Y1UxlsV01wfZvk; Tue, 16 Mar 2010 16:39:35 -0400
X-CMAE-Category: X-CMAE-Score: 0.00
X-CMAE-Analysis: v=1.1 cv=RpqRin20EikNPFC0NhhZyb7qtlqqDp4huBytcwwpogY= c=1
sm=1 a=ArQbOOmHeV8A:10 a=ICSgjsODHzIA:10 a=IkcTkHD0fZMA:10
a=fsK9XiHaSW3i/zTWbPYSMA==:17 a=w2PP7KgtAAAA:8 a=n_fk8HZggZt73Jy_5SkA:9
a=nCiXqMp3NW-viTWGPe0A:7 a=yVpoqy3WzZe-EXTlJ8zh8IQGiRMA:4 a=QEXdDO2ut3YA:10
a=Gq-bTBa4UauwmX4M:21 a=0YMPf0GKTFsJXbk3:21 a=fsK9XiHaSW3i/zTWbPYSMA==:117
Received: from beryllium.ruby-lang.org (beryllium.ruby-lang.org [127.0.0.1])
by carbon.ruby-lang.org (Postfix) with ESMTP id 7F5163C227284;
Wed, 17 Mar 2010 05:39:25 +0900 (JST)
Received: from svn.ruby-lang.org (svn.ruby-lang.org [210.251.121.215])
by carbon.ruby-lang.org (Postfix) with ESMTP id 6E7C03C21EB88
for <ruby-core@ruby-lang.org>; Wed, 17 Mar 2010 05:39:20 +0900 (JST)
Received: from ruby-lang.org (localhost [127.0.0.1])
by svn.ruby-lang.org (8.13.8+Sun/8.13.8) with ESMTP id o2GKdKEn023711
for <ruby-core@ruby-lang.org>; Wed, 17 Mar 2010 05:39:20 +0900 (JST)
Delivered-To: ruby-core@ruby-lang.org
Date: Wed, 17 Mar 2010 05:39:20 +0900
Posted: Wed, 17 Mar 2010 05:39:20 +0900
From: Dan Rathbun <redmine@ruby-lang.org>
Reply-To: ruby-core@ruby-lang.org
Subject: [ruby-core:28699] [Feature #1400] Please add a method to enumerate fields in OpenStruct
To: ruby-core@ruby-lang.org
Message-Id: <4b9fec7854f4b_999c76fc303843@redmine.ruby-lang.org>
X-ML-Name: ruby-core
X-Mail-Count: 28699
X-MLServer: fml [fml 4.0.3 release (20011202/4.0.3)]; post only (only members can post)
X-ML-Info: If you have a question, send e-mail with the body
"help" (without quotes) to the address ruby-core-ctl@ruby-lang.org;
help=<mailto:ruby-core-ctl@ruby-lang.org?body=help>
X-Mailer: Redmine
X-Redmine-Issue-Author: tpo
X-Redmine-Issue-Id: 1400
X-Redmine-Journal-Id: 9022
X-Redmine-Project: ruby
X-Redmine-Site: Ruby Issue Tracking System
X-Redmine-Host: redmine.ruby-lang.org
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8
Precedence: bulk
Lines: 32
List-Id: ruby-core.ruby-lang.org
List-Software: fml [fml 4.0.3 release (20011202/4.0.3)]
List-Post: <mailto:ruby-core@ruby-lang.org>
List-Owner: <mailto:ruby-core-admin@ruby-lang.org>
List-Help: <mailto:ruby-core-ctl@ruby-lang.org?body=help>
List-Unsubscribe: <mailto:ruby-core-ctl@ruby-lang.org?body=unsubscribe>
X-BtMT: Tue, 16 Mar 2010 16:39:37 -0400 (EDT)
Issue #1400 has been updated by Dan Rathbun.
This can be done right now. In several ways.
# obj is an class OpenStruct which some number of members.
ary = obj.methods(false).sort -> Array of attr getters and setters
keys=[]
ary.each {|i| keys.push(i) unless i.include?('=') }
# keys is now an Array of fieldnames
Also using existing method .marshal_dump which is really an attribute getter for @table (having a name different than the attribute.)
Just noticed .table as a attribute getter alias of .marshal_dump, BUT .table is set protected, while .marshal_dump is not?
Why is THAT?
# obj is an class OpenStruct which some number of members.
obj.marshal_dump.keys -> Array of keys
obj.marshal_dump.values -> Array of values
obj.marshal_dump.each {|k,v| ... }
The danger in accessing the Hash directly is someone's going to modify it without removing the attr getter and setter methods defined in the class instance. Which by the way is a bug in the current OpenStruct. It's delete_field method does just that, lea
ving the accessor methods without a key/value pair in @table.
There is also an opposite bug. IF an attempt is made, to create a field who's name is already used as a method (without the '='); new_ostruct_member does NOT create the accessor methods, BUT does NOT return a indicator of success, so method_missing just
goes ahead and adds the field to @table.
Ex:
obj.inspect='Sherlock Holmes'
The unless block (line 72) in new_ostruct_member needs an else clause thats raises a NameError Exception "#{name} is already in use as a method of #{self}."
Additionally, .marshal_load is flawed. It wipes out @table instead of appending; and puts everything in @table before checking it. The arg x should be typechecked as an OpenStruct or Hash; it should be put first in a temp reference. Looks like another ar
gument may be needed for overwrite/ignore of matching keys.
----------------------------------------
http://redmine.ruby-lang.org/issues/show/1400
----------------------------------------
http://redmine.ruby-lang.org
AdGFib
--1913079234-1268773977=:23085--