* man/ruby.1: Ruby man page from Arthur Gunn in [ruby-core:33412]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29946 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
7050069d80
commit
d412050e72
@ -1,3 +1,7 @@
|
|||||||
|
Sat Nov 27 12:07:05 2010 Yukihiro Matsumoto <matz@ruby-lang.org>
|
||||||
|
|
||||||
|
* man/ruby.1: Ruby man page from Arthur Gunn in [ruby-core:33412]
|
||||||
|
|
||||||
Sat Nov 27 11:29:24 2010 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
Sat Nov 27 11:29:24 2010 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||||
|
|
||||||
* lib/optparse.rb (OptionParser#candidate): get rid of 1.9 syntax
|
* lib/optparse.rb (OptionParser#candidate): get rid of 1.9 syntax
|
||||||
|
26
man/ruby.1
26
man/ruby.1
@ -37,7 +37,7 @@ straight-forward, and extensible.
|
|||||||
.Pp
|
.Pp
|
||||||
If you want a language for easy object-oriented programming, or you
|
If you want a language for easy object-oriented programming, or you
|
||||||
don't like the Perl ugliness, or you do like the concept of LISP, but
|
don't like the Perl ugliness, or you do like the concept of LISP, but
|
||||||
don't like too much parentheses, Ruby may be the language of your
|
don't like too many parentheses, Ruby might be your language of
|
||||||
choice.
|
choice.
|
||||||
.Sh FEATURES
|
.Sh FEATURES
|
||||||
Ruby's features are as follows:
|
Ruby's features are as follows:
|
||||||
@ -53,7 +53,7 @@ time check.
|
|||||||
.Pp
|
.Pp
|
||||||
.It Sy "No declaration needed"
|
.It Sy "No declaration needed"
|
||||||
You can use variables in your Ruby programs without any declarations.
|
You can use variables in your Ruby programs without any declarations.
|
||||||
Variable names denote their scope, local, global, instance, etc.
|
Variable names denote their scope - global, class, instance, or local.
|
||||||
.Pp
|
.Pp
|
||||||
.It Sy "Simple syntax"
|
.It Sy "Simple syntax"
|
||||||
Ruby has a simple syntax influenced slightly from Eiffel.
|
Ruby has a simple syntax influenced slightly from Eiffel.
|
||||||
@ -64,11 +64,11 @@ from anywhere are automatically collected by the garbage collector
|
|||||||
built into the interpreter.
|
built into the interpreter.
|
||||||
.Pp
|
.Pp
|
||||||
.It Sy "Everything is an object"
|
.It Sy "Everything is an object"
|
||||||
Ruby is the purely object-oriented language, and was so since its
|
Ruby is a purely object-oriented language, and was so since its
|
||||||
creation. Even such basic data as integers are seen as objects.
|
creation. Even such basic data as integers are seen as objects.
|
||||||
.Pp
|
.Pp
|
||||||
.It Sy "Class, inheritance, and methods"
|
.It Sy "Class, inheritance, and methods"
|
||||||
Of course, as an object-oriented language, Ruby has such basic
|
Being an object-oriented language, Ruby naturally has basic
|
||||||
features like classes, inheritance, and methods.
|
features like classes, inheritance, and methods.
|
||||||
.Pp
|
.Pp
|
||||||
.It Sy "Singleton methods"
|
.It Sy "Singleton methods"
|
||||||
@ -81,7 +81,7 @@ to.
|
|||||||
.It Sy "Mix-in by modules"
|
.It Sy "Mix-in by modules"
|
||||||
Ruby intentionally does not have the multiple inheritance as it is a
|
Ruby intentionally does not have the multiple inheritance as it is a
|
||||||
source of confusion. Instead, Ruby has the ability to share
|
source of confusion. Instead, Ruby has the ability to share
|
||||||
implementations across the inheritance tree. This is often called
|
implementations across the inheritance tree. This is often called a
|
||||||
.Sq Mix-in .
|
.Sq Mix-in .
|
||||||
.Pp
|
.Pp
|
||||||
.It Sy "Iterators"
|
.It Sy "Iterators"
|
||||||
@ -90,7 +90,7 @@ Ruby has iterators for loop abstraction.
|
|||||||
.It Sy "Closures"
|
.It Sy "Closures"
|
||||||
In Ruby, you can objectify the procedure.
|
In Ruby, you can objectify the procedure.
|
||||||
.Pp
|
.Pp
|
||||||
.It Sy "Text processing and regular expression"
|
.It Sy "Text processing and regular expressions"
|
||||||
Ruby has a bunch of text processing features like in Perl.
|
Ruby has a bunch of text processing features like in Perl.
|
||||||
.Pp
|
.Pp
|
||||||
.It Sy "M17N, character set independent"
|
.It Sy "M17N, character set independent"
|
||||||
@ -102,8 +102,8 @@ different character encodings, without dependence on Unicode.
|
|||||||
With built-in bignums, you can for example calculate factorial(400).
|
With built-in bignums, you can for example calculate factorial(400).
|
||||||
.Pp
|
.Pp
|
||||||
.It Sy "Reflection and domain specific languages"
|
.It Sy "Reflection and domain specific languages"
|
||||||
Class is also an instance of Class class. Definition of classes and methods
|
Class is also an instance of the Class class. Definition of classes and methods
|
||||||
is just an expression as 1+1 is. So your programs can even write and modify programs.
|
is an expression just as 1+1 is. So your programs can even write and modify programs.
|
||||||
Thus you can write your application in your own programming language on top of Ruby.
|
Thus you can write your application in your own programming language on top of Ruby.
|
||||||
.Pp
|
.Pp
|
||||||
.It Sy "Exception handling"
|
.It Sy "Exception handling"
|
||||||
@ -209,7 +209,7 @@ on machines that don't support it, in the following manner:
|
|||||||
Turns on taint checks at the specified level (default 1).
|
Turns on taint checks at the specified level (default 1).
|
||||||
.Pp
|
.Pp
|
||||||
.It Fl U
|
.It Fl U
|
||||||
Sets the defalut value for internal encodings
|
Sets the default value for internal encodings
|
||||||
.Pf ( Li "Encoding.default_internal" ) to UTF-8.
|
.Pf ( Li "Encoding.default_internal" ) to UTF-8.
|
||||||
.Pp
|
.Pp
|
||||||
.It Fl W Ns Op Ar level=2
|
.It Fl W Ns Op Ar level=2
|
||||||
@ -259,7 +259,7 @@ will be set to true.
|
|||||||
.Pp
|
.Pp
|
||||||
.It Fl e Ar command
|
.It Fl e Ar command
|
||||||
Specifies script from command-line while telling Ruby not to search
|
Specifies script from command-line while telling Ruby not to search
|
||||||
the rest of arguments for a script file name.
|
the rest of the arguments for a script file name.
|
||||||
.Pp
|
.Pp
|
||||||
.It Fl h
|
.It Fl h
|
||||||
.It Fl -help
|
.It Fl -help
|
||||||
@ -367,7 +367,7 @@ must be specified with either
|
|||||||
.Li EOF ,
|
.Li EOF ,
|
||||||
.Li "^D" ( Li "control-D" ) ,
|
.Li "^D" ( Li "control-D" ) ,
|
||||||
.Li "^Z" ( Li "control-Z" ) ,
|
.Li "^Z" ( Li "control-Z" ) ,
|
||||||
or reserved word
|
or the reserved word
|
||||||
.Li __END__ .
|
.Li __END__ .
|
||||||
If the directory name is specified, Ruby will switch to that directory
|
If the directory name is specified, Ruby will switch to that directory
|
||||||
before executing script.
|
before executing script.
|
||||||
@ -474,7 +474,7 @@ environment variable on calling Kernel#system.
|
|||||||
This variable is obsolete.
|
This variable is obsolete.
|
||||||
.El
|
.El
|
||||||
.Pp
|
.Pp
|
||||||
And Ruby depends on some RubyGems related environment variables unless disabled RubyGems.
|
And Ruby depends on some RubyGems related environment variables unless RubyGems is disabled.
|
||||||
See the help of
|
See the help of
|
||||||
.Xr gem 1
|
.Xr gem 1
|
||||||
as bellow.
|
as bellow.
|
||||||
@ -497,7 +497,7 @@ Ruby Application Archive.
|
|||||||
.Li Security vulnerabilities should be reported via an email to
|
.Li Security vulnerabilities should be reported via an email to
|
||||||
.Aq security@ruby-lang.org Ns
|
.Aq security@ruby-lang.org Ns
|
||||||
.Li .
|
.Li .
|
||||||
Reported problems will be published after fixed.
|
Reported problems will be published after they've been fixed.
|
||||||
.Pp
|
.Pp
|
||||||
.Li And you can report other bugs and feature requests via the
|
.Li And you can report other bugs and feature requests via the
|
||||||
Ruby Issue Tracking System (http://redmine.ruby-lang.org).
|
Ruby Issue Tracking System (http://redmine.ruby-lang.org).
|
||||||
|
Loading…
x
Reference in New Issue
Block a user