[#4479] Requesting addition to IRB (configurable standard output) — Sascha Ebach <se@...>

Hello,

13 messages 2005/02/24
[#4482] Re: Requesting addition to IRB (configurable standard output) — Sam Roberts <sroberts@...> 2005/02/25

Quoting se@digitale-wertschoepfung.de, on Fri, Feb 25, 2005 at 01:22:34AM +0900:

[#4483] Re: Requesting addition to IRB (configurable standard output) — Eric Hodel <drbrain@...7.net> 2005/02/25

On 24 Feb 2005, at 19:51, Sam Roberts wrote:

[#4488] Re: Requesting addition to IRB (configurable standard output) — Sam Roberts <sroberts@...> 2005/02/26

Quoting drbrain@segment7.net, on Sat, Feb 26, 2005 at 02:43:31AM +0900:

[#4489] Re: Requesting addition to IRB (configurable standard output) — Eric Hodel <drbrain@...7.net> 2005/02/26

On 25 Feb 2005, at 16:03, Sam Roberts wrote:

[PATCH] Doc patch.

From: George Ogata <g_ogata@...>
Date: 2005-02-10 21:07:26 UTC
List: ruby-core #4414
FileUtils and String.



diff -Naur ruby/lib/fileutils.rb ruby.mod/lib/fileutils.rb
--- ruby/lib/fileutils.rb	2005-01-01 19:59:48.000000000 +1100
+++ ruby.mod/lib/fileutils.rb	2005-02-11 07:33:02.000000000 +1100
@@ -370,7 +370,7 @@
   # 
   #   # 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 -Naur ruby/string.c ruby.mod/string.c
--- ruby/string.c	2004-12-29 00:31:55.000000000 +1100
+++ ruby.mod/string.c	2005-02-11 07:33:02.000000000 +1100
@@ -4560,14 +4560,15 @@
 
 /*
  *  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
@@ -4582,14 +4583,15 @@
 
 /*
  *  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
@@ -4604,14 +4606,15 @@
 
 /*
  *  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


In This Thread

Prev Next