From 22b831e358d4f68093b78225e6d046745a0c8e0a Mon Sep 17 00:00:00 2001 From: matz Date: Sat, 12 Feb 2005 10:57:22 +0000 Subject: * ext/etc/etc.c (Init_etc): sGroup needs HAVE_ST_GR_PASSWD check. [ruby-dev:25675] * misc/ruby-mode.el: [ruby-core:04415] * lib/rdoc/generators/html_generator.rb: [ruby-core:04412] * lib/rdoc/generators/ri_generator.rb: ditto. git-svn-id: http://svn.ruby-lang.org/repos/ruby/branches/ruby_1_8@7953 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ChangeLog | 15 +++++++++++++++ ext/etc/etc.c | 6 +++++- lib/fileutils.rb | 2 +- lib/rdoc/generators/html_generator.rb | 6 +++--- lib/rdoc/generators/ri_generator.rb | 2 +- misc/ruby-mode.el | 6 ++++-- string.c | 29 ++++++++++++++++------------- 7 files changed, 45 insertions(+), 21 deletions(-) diff --git a/ChangeLog b/ChangeLog index 689376caa..402f8e712 100644 --- a/ChangeLog +++ b/ChangeLog @@ -12,6 +12,11 @@ Sat Feb 12 13:54:03 2005 Tanaka Akira * lib/open-uri.rb: support https if the platform provides CA certificates. +Sat Feb 12 06:18:28 2005 URABE Shyouhei + + * 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 * ext/openss/ossl_x509store.c (ossl_x509store_set_default_paths): @@ -23,6 +28,16 @@ Fri Feb 11 11:33:53 2005 Tanaka Akira :http_basic_authentication. suggested by Kent Sibilev. [ruby-core:4392] +Fri Feb 11 06:30:07 2005 George Ogata + + * misc/ruby-mode.el: [ruby-core:04415] + +Fri Feb 11 04:54:13 2005 Tilman Sauerbeck + + * 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 * win32/Makefile.sub (COMMON_HEADERS): shouldn't include winsock2.h. diff --git a/ext/etc/etc.c b/ext/etc/etc.c index c42f279d5..6f677a689 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 943d4a38e..287319c4b 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 f9c72a4df..d263a1478 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 8d9457934..c4b4a7e17 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 aaf891385..9866bb3fb 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 0f932a6b5..42fb4a0af 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 integer is greater than the length of str, returns a new * String of length integer with str left justified - * and space padded; otherwise, returns str. + * and padded with padstr; otherwise, returns str. * - * "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 integer is greater than the length of str, returns a new * String of length integer with str right justified - * and space padded; otherwise, returns str. + * and padded with padstr; otherwise, returns str. * - * "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 integer is greater than the length of str, returns a new - * String of length integer with str centered - * between spaces; otherwise, returns str. + * String of length integer with str centered and + * padded with padstr; otherwise, returns str. * - * "hello".center(4) #=> "hello" - * "hello".center(20) #=> " hello " + * "hello".center(4) #=> "hello" + * "hello".center(20) #=> " hello " + * "hello".center(20, '123') #=> "1231231hello12312312" */ static VALUE -- cgit