[#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,
ri cannot display documents about the attributes of classes
Hello,
I found that ri cannot display documents about the attributes
of classes.
It's because the documents are written in cdesc-*.yaml files
and ri never reads them except when displaying class information.
I write a patch to solve this problem, but it's too slow.
Does anyone have another idea?
Index: lib/rdoc/ri/ri_cache.rb
===================================================================
RCS file: /home/cvs/ruby/lib/rdoc/ri/ri_cache.rb,v
retrieving revision 1.8
diff -u -1 -p -r1.8 ri_cache.rb
--- lib/rdoc/ri/ri_cache.rb 30 Aug 2004 14:20:57 -0000 1.8
+++ lib/rdoc/ri/ri_cache.rb 7 Dec 2006 08:29:39 -0000
@@ -14,2 +14,3 @@ module RI
@inferior_classes = []
+ @attributes = []
end
@@ -36,3 +37,3 @@ module RI
- if name =~ /^(.*?)-(c|i).yaml$/
+ if /^(.*?)-(c|i)\.yaml$/ =~ name
external_name = $1
@@ -43,2 +44,4 @@ module RI
list << MethodEntry.new(path, internal_name, is_class_method, self)
+ elsif /^cdesc-.*?\.yaml$/ =~ name
+ @attributes.concat(YAML.load_file(File.join(dir, name)).attributes.map{|a| a.full_name = full_name + "\##{a.name}"; a})
else
@@ -116,5 +119,5 @@ module RI
list = case is_class_method
- when nil then @class_methods + @instance_methods
+ when nil then @class_methods + @instance_methods + @attributes
when true then @class_methods
- when false then @instance_methods
+ when false then @instance_methods + @attributes
else fail "Unknown is_class_method: #{is_class_method.inspect}"
Index: lib/rdoc/ri/ri_descriptions.rb
===================================================================
RCS file: /home/cvs/ruby/lib/rdoc/ri/ri_descriptions.rb,v
retrieving revision 1.8
diff -u -1 -p -r1.8 ri_descriptions.rb
--- lib/rdoc/ri/ri_descriptions.rb 14 Jun 2006 22:24:36 -0000 1.8
+++ lib/rdoc/ri/ri_descriptions.rb 7 Dec 2006 08:29:39 -0000
@@ -33,2 +33,3 @@ module RI
attr_reader :rw, :comment
+ attr_accessor :full_name
def initialize(name, rw, comment)
Index: lib/rdoc/ri/ri_display.rb
===================================================================
RCS file: /home/cvs/ruby/lib/rdoc/ri/ri_display.rb,v
retrieving revision 1.6
diff -u -1 -p -r1.6 ri_display.rb
--- lib/rdoc/ri/ri_display.rb 24 Mar 2004 19:17:13 -0000 1.6
+++ lib/rdoc/ri/ri_display.rb 7 Dec 2006 08:29:39 -0000
@@ -63,3 +63,3 @@ class DefaultDisplay
display_flow(method.comment)
- if method.aliases && !method.aliases.empty?
+ if method.respond_to?(:aliases) && method.aliases && !method.aliases.empty?
@formatter.blankline
@@ -135,3 +135,3 @@ class DefaultDisplay
@formatter.blankline
- @formatter.wrap("Attributes:", "")
+ @formatter.display_heading("Attributes:", 2, "")
@formatter.wrap(klass.attributes.map{|a| a.name}.sort.join(', '))
@@ -224,10 +224,14 @@ class DefaultDisplay
- params = method.params
+ if method.respond_to?(:params)
+ params = method.params
- if params[0,1] == "("
- if method.is_singleton
- params = method.full_name + params
- else
- params = method.name + params
+ if params[0,1] == "("
+ if method.is_singleton
+ params = method.full_name + params
+ else
+ params = method.name + params
+ end
end
+ elsif method.respond_to?(:rw)
+ params = "[#{method.rw}] #{method.name}"
end
Index: lib/rdoc/ri/ri_reader.rb
===================================================================
RCS file: /home/cvs/ruby/lib/rdoc/ri/ri_reader.rb,v
retrieving revision 1.7
diff -u -1 -p -r1.7 ri_reader.rb
--- lib/rdoc/ri/ri_reader.rb 30 Aug 2004 14:20:57 -0000 1.7
+++ lib/rdoc/ri/ri_reader.rb 7 Dec 2006 08:29:39 -0000
@@ -44,4 +44,8 @@ module RI
def get_method(method_entry)
- path = method_entry.path_name
- File.open(path) { |f| RI::Description.deserialize(f) }
+ if method_entry.respond_to?(:path_name)
+ path = method_entry.path_name
+ File.open(path) { |f| RI::Description.deserialize(f) }
+ else
+ method_entry
+ end
end
Regards,
--
U.Nakamura <usa@garbagecollect.jp>