summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog15
-rw-r--r--ext/etc/etc.c6
-rw-r--r--lib/fileutils.rb2
-rw-r--r--lib/rdoc/generators/html_generator.rb6
-rw-r--r--lib/rdoc/generators/ri_generator.rb2
-rw-r--r--misc/ruby-mode.el6
-rw-r--r--string.c29
7 files changed, 45 insertions, 21 deletions
diff --git a/ChangeLog b/ChangeLog
index 689376caaf..402f8e7127 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -12,6 +12,11 @@ Sat Feb 12 13:54:03 2005 Tanaka Akira <akr@m17n.org>
* lib/open-uri.rb: support https if the platform provides CA
certificates.
+Sat Feb 12 06:18:28 2005 URABE Shyouhei <shyouhei@ice.uec.ac.jp>
+
+ * ext/etc/etc.c (Init_etc): sGroup needs HAVE_ST_GR_PASSWD check.
+ [ruby-dev:25675]
+
Fri Feb 11 17:40:42 2005 GOTOU Yuuzou <gotoyuzo@notwork.org>
* ext/openss/ossl_x509store.c (ossl_x509store_set_default_paths):
@@ -23,6 +28,16 @@ Fri Feb 11 11:33:53 2005 Tanaka Akira <akr@m17n.org>
:http_basic_authentication.
suggested by Kent Sibilev. [ruby-core:4392]
+Fri Feb 11 06:30:07 2005 George Ogata <g_ogata@optushome.com.au>
+
+ * misc/ruby-mode.el: [ruby-core:04415]
+
+Fri Feb 11 04:54:13 2005 Tilman Sauerbeck <tilman@code-monkey.de>
+
+ * lib/rdoc/generators/html_generator.rb: [ruby-core:04412]
+
+ * lib/rdoc/generators/ri_generator.rb: ditto.
+
Thu Feb 10 11:14:17 2005 NAKAMURA Usaku <usa@ruby-lang.org>
* win32/Makefile.sub (COMMON_HEADERS): shouldn't include winsock2.h.
diff --git a/ext/etc/etc.c b/ext/etc/etc.c
index c42f279d58..6f677a6893 100644
--- a/ext/etc/etc.c
+++ b/ext/etc/etc.c
@@ -410,7 +410,11 @@ Init_etc()
rb_global_variable(&sPasswd);
#ifdef HAVE_GETGRENT
- sGroup = rb_struct_define("Group", "name", "passwd", "gid", "mem", NULL);
+ sGroup = rb_struct_define("Group", "name",
+#ifdef HAVE_ST_GR_PASSWD
+ "passwd",
+#endif
+ "gid", "mem", NULL);
rb_global_variable(&sGroup);
#endif
}
diff --git a/lib/fileutils.rb b/lib/fileutils.rb
index 943d4a38ec..287319c4b3 100644
--- a/lib/fileutils.rb
+++ b/lib/fileutils.rb
@@ -364,7 +364,7 @@ module FileUtils
#
# # Examples of copying several files to target directory.
# FileUtils.cp_r %w(mail.rb field.rb debug/), site_ruby + '/tmail'
- # FileUtils.cp_r Dir.glob('*.rb'), '/home/aamine/lib/ruby', :noop, :verbose
+ # FileUtils.cp_r Dir.glob('*.rb'), '/home/aamine/lib/ruby', :noop => true, :verbose => true
#
# # If you want to copy all contents of a directory instead of the
# # directory itself, c.f. src/x -> dest/x, src/y -> dest/y,
diff --git a/lib/rdoc/generators/html_generator.rb b/lib/rdoc/generators/html_generator.rb
index f9c72a4df2..d263a14784 100644
--- a/lib/rdoc/generators/html_generator.rb
+++ b/lib/rdoc/generators/html_generator.rb
@@ -314,7 +314,7 @@ module Generators
def collect_methods
list = @context.method_list
unless @options.show_all
- list = list.find_all {|m| m.visibility == :public || m.force_documentation }
+ list = list.find_all {|m| m.visibility == :public || m.visibility == :protected || m.force_documentation }
end
@methods = list.collect {|m| HtmlMethod.new(m, self, @options) }
end
@@ -681,13 +681,13 @@ module Generators
res = []
atts.each do |att|
next unless att.section == section
- if att.visibility == :public || @options.show_all
+ if att.visibility == :public || att.visibility == :protected || @options.show_all
entry = {
"name" => CGI.escapeHTML(att.name),
"rw" => att.rw,
"a_desc" => markup(att.comment, true)
}
- unless att.visibility == :public
+ unless att.visibility == :public || att.visibility == :protected
entry["rw"] << "-"
end
res << entry
diff --git a/lib/rdoc/generators/ri_generator.rb b/lib/rdoc/generators/ri_generator.rb
index 8d94579347..c4b4a7e17c 100644
--- a/lib/rdoc/generators/ri_generator.rb
+++ b/lib/rdoc/generators/ri_generator.rb
@@ -172,7 +172,7 @@ module Generators
list = cls.method_list
unless @options.show_all
list = list.find_all do |m|
- m.visibility == :public || m.force_documentation
+ m.visibility == :public || m.visibility == :protected || m.force_documentation
end
end
diff --git a/misc/ruby-mode.el b/misc/ruby-mode.el
index aaf8913858..9866bb3fbf 100644
--- a/misc/ruby-mode.el
+++ b/misc/ruby-mode.el
@@ -302,7 +302,8 @@ The variable ruby-indent-level controls the amount of indentation.
(defun ruby-expr-beg (&optional option)
(save-excursion
(store-match-data nil)
- (let ((space (skip-chars-backward " \t")))
+ (let ((start (point))
+ (space (skip-chars-backward " \t")))
(cond
((bolp) t)
((progn
@@ -311,7 +312,8 @@ The variable ruby-indent-level controls the amount of indentation.
(or (eq (char-syntax (char-before (point))) ?w)
(ruby-special-char-p))))
nil)
- ((or (looking-at ruby-operator-re)
+ ((or (goto-char start)
+ (looking-at ruby-operator-re)
(looking-at "[\\[({,;]")
(and (or (not (eq option 'heredoc))
(< space 0))
diff --git a/string.c b/string.c
index 0f932a6b5e..42fb4a0af9 100644
--- a/string.c
+++ b/string.c
@@ -4531,14 +4531,15 @@ rb_str_justify(argc, argv, str, jflag)
/*
* call-seq:
- * str.ljust(integer) => new_str
+ * str.ljust(integer, padstr=' ') => new_str
*
* If <i>integer</i> is greater than the length of <i>str</i>, returns a new
* <code>String</code> of length <i>integer</i> with <i>str</i> left justified
- * and space padded; otherwise, returns <i>str</i>.
+ * and padded with <i>padstr</i>; otherwise, returns <i>str</i>.
*
- * "hello".ljust(4) #=> "hello"
- * "hello".ljust(20) #=> "hello "
+ * "hello".ljust(4) #=> "hello"
+ * "hello".ljust(20) #=> "hello "
+ * "hello".ljust(20, '1234') #=> "hello123412341234123"
*/
static VALUE
@@ -4553,14 +4554,15 @@ rb_str_ljust(argc, argv, str)
/*
* call-seq:
- * str.rjust(integer) => new_str
+ * str.rjust(integer, padstr=' ') => new_str
*
* If <i>integer</i> is greater than the length of <i>str</i>, returns a new
* <code>String</code> of length <i>integer</i> with <i>str</i> right justified
- * and space padded; otherwise, returns <i>str</i>.
+ * and padded with <i>padstr</i>; otherwise, returns <i>str</i>.
*
- * "hello".rjust(4) #=> "hello"
- * "hello".rjust(20) #=> " hello"
+ * "hello".rjust(4) #=> "hello"
+ * "hello".rjust(20) #=> " hello"
+ * "hello".rjust(20, '1234') #=> "123412341234123hello"
*/
static VALUE
@@ -4575,14 +4577,15 @@ rb_str_rjust(argc, argv, str)
/*
* call-seq:
- * str.center(integer) => new_str
+ * str.center(integer, padstr) => new_str
*
* If <i>integer</i> is greater than the length of <i>str</i>, returns a new
- * <code>String</code> of length <i>integer</i> with <i>str</i> centered
- * between spaces; otherwise, returns <i>str</i>.
+ * <code>String</code> of length <i>integer</i> with <i>str</i> centered and
+ * padded with <i>padstr</i>; otherwise, returns <i>str</i>.
*
- * "hello".center(4) #=> "hello"
- * "hello".center(20) #=> " hello "
+ * "hello".center(4) #=> "hello"
+ * "hello".center(20) #=> " hello "
+ * "hello".center(20, '123') #=> "1231231hello12312312"
*/
static VALUE