[ruby-dev:7696] Re: [ruby-list:16118] Ruby 1.4.0
From:
Tadayoshi Funaba <tadf@...>
Date:
1999-08-16 14:13:16 UTC
List:
ruby-dev #7696
ふなばです。
マニュアルの綴り違いなどの修正を試みてみました (ざっとみただけですが)。
よくわからないところもあるんですが (-r など)、確認お願いします。あと、
オプションの記述がアルファベット順のようで、そうでない (-Kc)、というの
も直していいのかもしれないです。また、-T、--copyright の記述がないよう
ですね。
README.EXT では、klass になっているところと class のところがあるので
すが、これは統一してもいいかも。
ruby.c:usage() も正しいと思われるように直してみました。ruby.1 では、
-0[octal]、ruby.c では、-0[digit] となるなど、表現を統一してもよいかも。
--- ruby.1.orig Fri Aug 13 14:45:14 1999
+++ ruby.1 Mon Aug 16 22:15:38 1999
@@ -48,7 +48,7 @@
] [ \c
.BI -x "[dir]"\c
] [ \c
-.BI -X "[dir]"\c
+.BI -X "dir"\c
] [ \c
.BI -y \c
]
@@ -106,9 +106,9 @@
to.
.TP
.B "\(bu Mix-in by modules"
-Ruby intentioanlly does not have the multiple inheritance as it is a
-souce of confusion. Instead, Ruby has the ability to share
-implementations acrss the inheritance tree. This is oftern called
+Ruby intentionally does not have the multiple inheritance as it is a
+source of confusion. Instead, Ruby has the ability to share
+implementations across the inheritance tree. This is often called
`Mix-in'.
.TP
.B "\(bu Iterators"
@@ -137,8 +137,8 @@
Ruby interpreter accepts following command-line options (switches).
They are quite similar to those of Perl.
.TP
-.B -0digit
-pecifies the input record separator ($/) as an octal number. If no
+.B -0[digit]
+specifies the input record separator ($/) as an octal number. If no
digit is given, the null character is taken as the separator. Other
switches may follow the digits. -00 turns Ruby into paragraph mode. -
0777 makes Ruby read whole file at once as a single string since there
@@ -196,7 +196,7 @@
.TP
.B -l
enables automatic line-ending processing, which means to firstly set
-$\ to the value of $/, and secondly chops every line read using chop!.
+$\e to the value of $/, and secondly chops every line read using chop!.
.TP
.B -n
causes Ruby to assume the following loop around your script,
@@ -220,7 +220,7 @@
.fi
.TP
.B -r filename
-causes Ruby to load the file using [4]require. It is useful
+causes Ruby to load the file using require. It is useful
with switches -n or -p.
.TP
.B -s
@@ -243,7 +243,7 @@
.nf
.ne 2
\& #! /usr/local/bin/ruby
-\& # This line makes the next one a comment in ruby \\
+\& # This line makes the next one a comment in ruby \e
\& exec /usr/local/bin/ruby -S $0 $*
.fi
On some systems $0 does not always contain the full pathname, so you
--- README.EXT.orig Fri Aug 13 14:45:01 1999
+++ README.EXT Mon Aug 16 20:52:41 1999
@@ -1,6 +1,6 @@
.\" README.EXT - -*- Text -*- created at: Mon Aug 7 16:45:54 JST 1995
-This document explains how to make extention libraries for Ruby.
+This document explains how to make extension libraries for Ruby.
1. Basic knowledge
@@ -16,7 +16,7 @@
(1) Identify VALUE's data type
(2) Convert VALUE into C data
-Converting to wrong data type may cause serious promblems.
+Converting to wrong data type may cause serious problems.
1.1 Data-types
@@ -24,7 +24,7 @@
Ruby interpreter has data-types as below:
T_NIL nil
- T_OBJECT ordinaly object
+ T_OBJECT ordinary object
T_CLASS class
T_MODULE module
T_FLOAT floating point number
@@ -32,7 +32,7 @@
T_REGEXP regular expression
T_ARRAY array
T_FIXNUM Fixnum(31bit integer)
- T_HASH assosiative array
+ T_HASH associative array
T_STRUCT (Ruby) structure
T_BIGNUM multi precision integer
T_TRUE true
@@ -88,7 +88,7 @@
respectively. They are singletons for the data type.
The T_FIXNUM data is the 31bit length fixed integer (63bit length on
-some machines), which can be conver to the C integer by using
+some machines), which can be convert to the C integer by using
FIX2INT() macro. There also be NUM2INT() which converts any Ruby
numbers into C integer. The NUM2INT() macro includes type check, so
the exception will be raised if conversion failed.
@@ -127,7 +127,7 @@
To convert C numbers to Ruby value, use these macros.
- INT2FIX() for intergers within 31bits.
+ INT2FIX() for integers within 31bits.
INT2NUM() for arbitrary sized integer.
INT2NUM() converts integers into Bignums, if it is out of FIXNUM
@@ -139,7 +139,7 @@
structure. To manipulate objects, use functions supplied by Ruby
interpreter. Useful functions are listed below (not all):
- String funtions
+ String functions
rb_str_new(char *ptr, int len)
@@ -200,7 +200,7 @@
VALUE rb_define_class(char *name, VALUE super)
VALUE rb_define_module(char *name)
-These functions return the newly created class ot module. You may
+These functions return the newly created class or module. You may
want to save this reference into the variable to use later.
2.1.2 Method/singleton method definition
@@ -330,7 +330,7 @@
See 2.1.3 for defining new constant.
-3. Informatin sharing between Ruby and C
+3. Information sharing between Ruby and C
3.1 Ruby constant that C can be accessed from C
@@ -353,7 +353,7 @@
void rb_define_variable(char *name, VALUE *var)
This function defines the variable which is shared by the both world.
-The value of the global variable pointerd by `var', can be accessed
+The value of the global variable pointed by `var', can be accessed
through Ruby's global variable named `name'.
You can define read-only (from Ruby, of course) variable by the
@@ -404,7 +404,7 @@
(sval = ALLOC(type), Data_Wrap_Struct(class, mark, free, sval))
-Arguments, class, mark, free, works like thier counterpart of
+Arguments, class, mark, free, works like their counterpart of
Data_Wrap_Struct(). The pointer to allocated structure will be
assigned to sval, which should be the pointer to the type specified.
@@ -445,12 +445,12 @@
You need to write C code for your extension library. If your library
has only one source file, choosing ``LIBRARY.c'' as a file name is
-preferred. On the other hand, in case your library has prural source
-files, avoid chooing ``LIBRARY.c'' for a file name. It may conflict
+preferred. On the other hand, in case your library has plural source
+files, avoid choosing ``LIBRARY.c'' for a file name. It may conflict
with intermediate file ``LIBRARY.o'' on some platforms.
Ruby will execute the initializing function named ``Init_LIBRARY'' in
-the library. For exapmle, ``Init_dbm()'' will be executed when loading
+the library. For example, ``Init_dbm()'' will be executed when loading
the library.
Here's the example of an initializing function.
@@ -517,7 +517,7 @@
The first argument of the C function is the self, the rest are the
arguments to the method.
-Second, the methods with arbtrary number of arguments receives
+Second, the methods with arbitrary number of arguments receives
arguments like this:
--
@@ -540,10 +540,10 @@
argument is the receiver of the method.
You can use the function rb_scan_args() to check and retrieve the
-arguments. For exapmle "11" means, the method requires at least one
+arguments. For example "11" means, the method requires at least one
argument, and at most receives two arguments.
-The methods with arbtrary number of arguments can receives arguments
+The methods with arbitrary number of arguments can receives arguments
by Ruby's array, like this:
--
@@ -576,7 +576,7 @@
require 'mkmf'
-at the top of the file. You can use the funcitons below to check the
+at the top of the file. You can use the functions below to check the
condition.
have_library(lib, func): check whether library containing function exists.
@@ -754,7 +754,7 @@
VALUE rb_define_module_under(VALUE module, char *name, VALUE super)
-Defines new Ruby module, under the modules's namespace.
+Defines new Ruby module, under the module's namespace.
void rb_include_module(VALUE class, VALUE module)
@@ -817,7 +817,7 @@
void rb_define_global_const(char *name, VALUE val)
-Defines global contant. This is just work as
+Defines global constant. This is just work as
rb_define_const(cKernal, name, val)
@@ -843,8 +843,8 @@
rb_scan_args(int argc, VALUE *argv, char *fmt, ...)
Retrieve argument from argc, argv. The fmt is the format string for
-the arguments, such as "12" for 1 non-optinal argument, 2 optinal
-aruguments. If `*' appears at the end of fmt, it means the rest of
+the arguments, such as "12" for 1 non-optional argument, 2 optional
+arguments. If `*' appears at the end of fmt, it means the rest of
the arguments are assigned to corresponding variable, packed in
array.
@@ -934,7 +934,7 @@
void rb_bug(char *fmt, ...)
-Termintates the interpreter immediately. This function should be
+Terminates the interpreter immediately. This function should be
called under the situation caused by the bug in the interpreter. No
exception handling nor ensure execution will be done.
--- ruby.c.orig Fri Aug 13 14:45:14 1999
+++ ruby.c Mon Aug 16 22:25:26 1999
@@ -98,7 +98,7 @@
"-v enables verbose mode",
"-w turn warnings on for compilation of your script",
"-x[directory] strip off text before #!ruby line and perhaps cd to directory",
-"-X[directory] cd to directory, before executing your script",
+"-Xdirectory cd to directory, before executing your script",
"--copyright print the copyright",
"--version print the version",
"\n",
ふなば ただよし