[macruby-changes] [3212] MacRuby/trunk
source_changes at macosforge.org
source_changes at macosforge.org
Fri Jan 8 12:34:13 PST 2010
Revision: 3212
http://trac.macosforge.org/projects/ruby/changeset/3212
Author: ernest.prabhakar at gmail.com
Date: 2010-01-08 12:34:12 -0800 (Fri, 08 Jan 2010)
Log Message:
-----------
Un-reverted rdoc parser changes, added error checking, fixed doc bug in object.c
Modified Paths:
--------------
MacRuby/trunk/lib/rdoc/parser/c.rb
MacRuby/trunk/object.c
Modified: MacRuby/trunk/lib/rdoc/parser/c.rb
===================================================================
--- MacRuby/trunk/lib/rdoc/parser/c.rb 2010-01-08 06:19:50 UTC (rev 3211)
+++ MacRuby/trunk/lib/rdoc/parser/c.rb 2010-01-08 20:34:12 UTC (rev 3212)
@@ -195,7 +195,7 @@
end
def do_methods
- @content.scan(%r{rb_define_
+ @content.scan(%r{rb_(objc_)?define_
(
singleton_method |
method |
@@ -206,9 +206,9 @@
\s*"([^"]+)",
\s*(?:RUBY_METHOD_FUNC\(|VALUEFUNC\()?(\w+)\)?,
\s*(-?\w+)\s*\)
- (?:;\s*/[*/]\s+in\s+(\w+?\.[cy]))?
+ (?:;\s*/[*/]\s+in\s+(\w+?\.[cy]p?p?))?
}xm) do
- |type, var_name, meth_name, meth_body, param_count, source_file|
+ |objc, type, var_name, meth_name, meth_body, param_count, source_file|
# Ignore top-object and weird struct.c dynamic stuff
next if var_name == "ruby_top_self"
@@ -520,7 +520,7 @@
class_obj = find_class(var_name, class_name)
unless class_obj
- warn("Enclosing class/module '#{const_name}' for not known")
+ warn("Enclosing class/module for '#{const_name}' not known")
return
end
@@ -590,7 +590,12 @@
if source_file then
file_name = File.join(@file_dir, source_file)
- body = (@@known_bodies[source_file] ||= File.read(file_name))
+ begin
+ body = (@@known_bodies[source_file] ||= File.read(file_name))
+ rescue
+ warn "Couldn't find file #{file_name}"
+ body = @content
+ end
else
body = @content
end
Modified: MacRuby/trunk/object.c
===================================================================
--- MacRuby/trunk/object.c 2010-01-08 06:19:50 UTC (rev 3211)
+++ MacRuby/trunk/object.c 2010-01-08 20:34:12 UTC (rev 3212)
@@ -2993,8 +2993,8 @@
rb_objc_define_method(rb_mKernel, "__native__?", rb_obj_is_native, 0);
- rb_objc_define_module_function(rb_mKernel, "sprintf", rb_f_sprintf_imp, -1); /* in sprintf.c */
- rb_objc_define_module_function(rb_mKernel, "format", rb_f_sprintf_imp, -1); /* in sprintf.c */
+ rb_objc_define_module_function(rb_mKernel, "sprintf", rb_f_sprintf_imp, -1); /* in sprintf.cpp */
+ rb_objc_define_module_function(rb_mKernel, "format", rb_f_sprintf_imp, -1); /* in sprintf.cpp */
rb_objc_define_module_function(rb_mKernel, "Integer", rb_f_integer, 1);
rb_objc_define_module_function(rb_mKernel, "Float", rb_f_float, 1);
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macruby-changes/attachments/20100108/a9eac77f/attachment.html>
More information about the macruby-changes
mailing list