[#9644] Determinant Problem in Matrix.rb — <noreply@...>
Bugs item #7001, was opened at 2006-12-01 03:50
This is 100% intended. You have to learn integer arithmetics when you
[#9654] Float numbers comparison — "Paulo Soeiro" <pcsoeiro@...>
Hi,
On 12/1/06, Paulo Soeiro <pcsoeiro@gmail.com> wrote:
[#9661] Dir.exist? — Kornelius Kalnbach <murphy@...>
hi!
[#9664] Bigdecimal isn't comparable — <noreply@...>
Bugs item #7045, was opened at 2006-12-04 19:20
On 12/4/06, noreply@rubyforge.org <noreply@rubyforge.org> wrote:
[#9685] Segmentation fault - bignorm() — ico@... (Ico Doornekamp)
[#9713] Sets and String subclasses — <noreply@...>
Bugs item #7253, was opened at 2006-12-13 12:26
> I would expect the second puts to return 5, not nil. In fact, I'd expect s.to_a[0] to return the same object as a.
[#9722] Kernel#system broken inside Dir.chdir(&block) if system command doesn't have shell characters — <noreply@...>
Bugs item #7278, was opened at 2006-12-14 13:59
Hi,
I bet your script /usr/local/bin/p4 is a shell script which doesn't have a
On Dec 14, 2006, at 18:57, Michael Selig wrote:
[#9725] Fixes going into 1.8.5.9 — "Zev Blut" <rubyzbibd@...>
Hello,
[#9749] System V IPC in standard library? — Steven Jenkins <steven.jenkins@...>
Back in August, I needed a semaphore to serialize access to an external
Hi,
Nobuyoshi Nakada wrote:
Hi,
[#9753] CVS freeze — SASADA Koichi <ko1@...>
Hi,
Hi,
Hi,
Hi,
Hi,
* Shugo Maeda (shugo@ruby-lang.org) wrote:
[#9794] Fwd: [Vit-core] Ruby 1.8.5-p2 Stable Version download bug-fix confusion. — James Edward Gray II <james@...>
The following is a complaint we received about the Ruby home page today.
[#9797] Where to start — "Strong Cypher" <cypherstrong@...>
-----BEGIN PGP SIGNED MESSAGE-----
[#9803] RDoc patch that fixes rb_const_define output — <noreply@...>
Patches item #7499, was opened at 2006-12-30 05:23
On 12/30/06, Eric Hodel <drbrain@segment7.net> wrote:
On Dec 30, 2006, at 19:16, Daniel Berger wrote:
On Dec 31, 2006, at 24:31, Eric Hodel wrote:
[#9816] merge YARV — SASADA Koichi <ko1@...>
Hi,
[ ruby-Patches-7499 ] RDoc patch that fixes rb_const_define output
Patches item #7499, was opened at 2006-12-30 05:23
You can respond by visiting:
http://rubyforge.org/tracker/?func=detail&atid=1700&aid=7499&group_id=426
Category: Ruby1.8
Group: None
Status: Open
Resolution: None
Priority: 3
Submitted By: Daniel Berger (djberg96)
Assigned to: Nobody (None)
Summary: RDoc patch that fixes rb_const_define output
Initial Comment:
Hi,
The current RDoc behavior for handling rb_const_define is not ideal. For example, if you have a code snippet like this:
/* The perfect score in bowling */
rb_const_define(cFoo, "PERFECT", INT2FIX(MAX_BOWLING_VALUE));
You'll end up seeing this in the generated HTML file:
PERFECT = INT2FIX(MAX_BOWLING_VALUE) The perfect score in bowling
When I really want to see this:
PERFECT = 300 The perfect score in bowling
While I could explicitly state the value in the comment, that still leaves the ugly "INT2FIX(MAX_BOWLING_VALUE)" as the definition for an end user to see. The attached patch fixes that by allowing the user to specify a value manually within the comment using a "value: comment" form. Literal ':' can be escaped with the '\' (backslash) character, if needed.
The patch is backwards compatible, i.e. it will simply default to the current behavior where no comments, or comments not in the 'value:comment' form, are found.
Below is the patch. Attached is a simple C file that you can run "rdoc foo.c" over to view the generated output to see how it looks. It covers every case of rb_define_const that I've ever used or seen, but please feel free to try to break it. :)
C:\rubyVC8\lib\ruby\1.8\rdoc\parsers>diff -u parse_c.rb parse_c.new
--- parse_c.rb Wed Aug 23 03:23:12 2006
+++ parse_c.new Sat Dec 30 05:02:57 2006
@@ -442,7 +442,27 @@
comment = find_const_comment(type, const_name)
- con = Constant.new(const_name, definition, mangle_comment(comment))
+ # In the case of rb_define_const, the definition and comment are in
+ # "/* definition: comment */" form. The literal ':' and '\' characters
+ # can be escaped with a backslash.
+ if type.downcase == 'const'
+ elements = mangle_comment(comment).split(':')
+ if elements.nil? || elements.empty?
+ con = Constant.new(const_name, definition, mangle_comment(comment))
+ else
+ new_definition = elements[0..-2].join(':')
+ if new_definition.empty? # Default to literal C definition
+ new_definition = definition
+ else
+ new_definition.gsub!("\:", ":")
+ new_definition.gsub!("\\", "\")
+ end
+ con = Constant.new(const_name, new_definition, elements.last)
+ end
+ else
+ con = Constant.new(const_name, definition, mangle_comment(comment))
+ end
+
class_obj.add_constant(con)
end
----------------------------------------------------------------------
You can respond by visiting:
http://rubyforge.org/tracker/?func=detail&atid=1700&aid=7499&group_id=426