Skip to content

Commit 27daea3

Browse files
committed
Restore links in FAQ
* restore internal links * make external links clickable
1 parent 07cc74f commit 27daea3

File tree

9 files changed

+87
-60
lines changed

9 files changed

+87
-60
lines changed

en/documentation/faq/1/index.md

Lines changed: 37 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -175,19 +175,23 @@ June 4, 1999. (The birthday of Ruby is corrected in [ruby-list:15977]).
175175
176176
### Where is the Ruby Home Page?
177177

178-
The official Ruby Home Page is http://www.ruby-lang.org (in English) and
179-
http://www.ruby-lang.org/ja/ (in Japanese).
178+
The official Ruby Home Page is [http://www.ruby-lang.org](http://www.ruby-lang.org)
179+
(in English) and [http://www.ruby-lang.org/ja/](http://www.ruby-lang.org/ja/)
180+
(in Japanese).
180181

181-
You can also find Ruby information at http://www.rubycentral.com.
182-
In particular, there is a complete online reference to Ruby's built-in classes
183-
and methods.
182+
You can also find Ruby information at
183+
[http://www.rubycentral.com](http://www.rubycentral.com).
184+
In particular, there is a complete
185+
[online reference](http://www.rubycentral.com/book/builtins.html)
186+
to Ruby's built-in classes and methods.
184187

185188
### Is there a Ruby newsgroup?
186189

187190
comp.lang.ruby was established in May, 2000 (thanks to the efforts of
188-
Conrad Schneiker).
191+
[Conrad Schneiker](mailto:schneiker@jump.net)).
189192

190193
### Is there a Ruby mailing list?
194+
{: #mailing-lists}
191195

192196
There are five mailing lists now talking about Ruby. The first is in English,
193197
the last four in Japanese:
@@ -200,10 +204,10 @@ ruby-ext: List for people writing extensions for or with Ruby.
200204
ruby-math: Ruby in mathematics.
201205
~~~
202206

203-
See joining the mailing list.
207+
See [joining the mailing list](http://www.ruby-lang.org/en/ml.html).
204208

205209
You can search the mailing list archives using
206-
http://blade.nagaokaut.ac.jp/ruby/ruby-talk/index.shtml.
210+
[http://blade.nagaokaut.ac.jp/ruby/ruby-talk/index.shtml](http://blade.nagaokaut.ac.jp/ruby/ruby-talk/index.shtml).
207211
(This is the url for the ruby-talk list: munge as required for the others).
208212

209213
### How can I thread the mailing list in mutt?
@@ -250,20 +254,25 @@ expressions.
250254

251255
### Which editors provide support for Ruby?
252256

253-
* Emacs or XEmacs: `ruby-mode.el` is supplied in the Ruby distribution.
254-
With some versions of XEmacs, you may need to add `(load "font-lock")`
255-
to your `.emacs` file to allow `ruby-mode.el` to detect the syntax
256-
highlighting package you're using.
257-
* Vim: Vim 5.7 and later have Ruby syntax files as standard in the runtime
258-
package. For prior versions, a syntax file for Ruby is available at
259-
http://www.xs4all.nl/~hipster/lib/ruby/ruby.vim.
260-
* Jedit: A portable editor written in Java, comes with support for Ruby.
261-
* Jed: An s-lang file supporting Ruby is available at
262-
http://www.kondara.org/~g/slang/ruby.sl.
263-
* Nedit (http://www.nedit.org): Eric Santonacci has written Ruby support for
264-
Nedit, available from ftp://ftp.talc.fr/pub/ruby/ruby.nedit-0.1.tar.gz.
257+
* [Emacs](http://www.gnu.org/software/emacs/emacs.html)
258+
or [XEmacs](http://www.xemacs.org/): `ruby-mode.el` is supplied in the Ruby
259+
distribution. With some versions of XEmacs, you may need to add
260+
`(load "font-lock")` to your `.emacs` file to allow `ruby-mode.el` to detect
261+
the syntax highlighting package you're using.
262+
* [Vim](http://www.vim.org/): Vim 5.7 and later have Ruby syntax files as
263+
standard in the runtime package. For prior versions, a syntax file for Ruby
264+
is available at
265+
[http://www.xs4all.nl/~hipster/lib/ruby/ruby.vim](http://www.xs4all.nl/~hipster/lib/ruby/ruby.vim).
266+
* [Jedit](http://jedit.sourceforge.net/): A portable editor written in Java,
267+
comes with support for Ruby.
268+
* [Jed](http://space.mit.edu/~davis/jed.html): An s-lang file supporting Ruby
269+
is available at
270+
[http://www.kondara.org/~g/slang/ruby.sl](http://www.kondara.org/~g/slang/ruby.sl).
271+
* [Nedit](http://www.nedit.org): Eric Santonacci has written Ruby support for
272+
Nedit, available from
273+
[ftp://ftp.talc.fr/pub/ruby/ruby.nedit-0.1.tar.gz](ftp://ftp.talc.fr/pub/ruby/ruby.nedit-0.1.tar.gz).
265274
* Barry Shultz has written a Ruby definition file for TextPad, available at
266-
http://www.textpad.com/add-ons/ntsyn.html.
275+
[http://www.textpad.com/add-ons/ntsyn.html](http://www.textpad.com/add-ons/ntsyn.html).
267276

268277
### How can I annotate Ruby code with its results?
269278

@@ -278,8 +287,8 @@ str[0,1] + str[2,1] + str[-2,2] # => "Blob"
278287
~~~
279288

280289
Gotoken's `xmp` package, available from
281-
http://www.ruby-lang.org/en/raa-list.rhtml?name=xmp is a utility that
282-
annotates Ruby source code this way.
290+
[http://www.ruby-lang.org/en/raa-list.rhtml?name=xmp](http://www.ruby-lang.org/en/raa-list.rhtml?name=xmp)
291+
is a utility that annotates Ruby source code this way.
283292

284293
Emacs and vim users can integrate this with their editing environments, which
285294
is useful if you want to send people e-mail with annotated Ruby code. Having
@@ -310,15 +319,17 @@ The syntax of Ruby has been fairly stable since Ruby 1.0, but new features are
310319
added every now and then. So, the books and the online documentation can get
311320
behind.
312321

313-
If you have a problem, feel free to ask in the mailing list (see ruby-talk
314-
mailing list). Generally you'll get timely answers from matz himself, the
322+
If you have a problem, feel free to ask in the mailing list
323+
(see [ruby-talk mailing list](#mailing-lists)).
324+
Generally you'll get timely answers from matz himself, the
315325
author of the language, from other gurus, and from those who've solved
316326
problems similar to your own.
317327

318328
Please include the output of `ruby -v` along with any problematic
319329
source code.
320330

321-
If you have a problem using `irb`, be aware that it has some limitations.
331+
If you have a problem using [`irb`](../10/#irb),
332+
be aware that it has some limitations.
322333
Try the script using `irb --single-irb`, or directly using the
323334
`ruby` command.
324335

en/documentation/faq/10/index.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,12 +38,13 @@ header: |
3838
## Extension library
3939

4040
### How can I use Ruby interactively?
41+
{: #irb}
4142

4243
You can try using `irb`. The following is paraphrased from Goto Kentaro
4344
(Gotoken), and originally appeared in ruby-talk:444.
4445

4546
~~~
46-
Get the latest tarball of irb from the contrib directory in the Ruby archive.
47+
Get the latest tarball of irb from the contrib directory (ftp://ftp.netlab.co.jp/pub/lang/ruby/contrib/) in the Ruby archive.
4748
Extract the irb directory tree.
4849
Add the location of the irb/ directory to the $RUBYLIB environment variable
4950
Make a symbolic link from $RUBYLIB/irb/irb.rb to a file called irb somewhere in your path.

en/documentation/faq/11/index.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,8 @@ open("example").read.count("\n") # => 3
5353
### What do `begin` and `end` of `MatchingData` return?
5454

5555
They act with `$ `, and return the start index and the end index of the
56-
matched data (`$0`) in the original string. See an example in tab expansion.
56+
matched data (`$0`) in the original string. See an example in
57+
[tab expansion](../9/#tab-expansion).
5758

5859
### How can I sum the elements in an array?
5960

en/documentation/faq/2/index.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,5 +98,5 @@ mined for P3K. I'm not sure how many Python programmers will be attracted to
9898
it though - it hasn't won me over (yet). But it is worthy of serious study and
9999
could be a real threat to Perl.
100100

101-
Posted by John Dell'Aquila in comp.lang.python, 11/17/2000.
102-
Reproduced with permission.
101+
Posted by [John Dell'Aquila](mailto:jbd@alum.mit.edu) in comp.lang.python,
102+
11/17/2000. Reproduced with permission.

en/documentation/faq/3/index.md

Lines changed: 28 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -52,19 +52,20 @@ See http://developer.apple.com/technotes/tn2002/tn2053.html.
5252
H Morita notes:
5353

5454
> There's a MacOS (not X) port of Ruby, by Hisakuni FUJIMOTO at
55-
> http://www.imasy.or.jp/~hisa/ruby/macruby.html. However it's based on
56-
> Ruby 1.1b7, and hasn't been updated since December 1999. It's highly
57-
> experimental. It may crash and sometimes freeze the OS, even with the
58-
> sample scripts included in the Ruby distribution. (Sounds like fun ;-).
55+
> [http://www.imasy.or.jp/~hisa/ruby/macruby.html](http://www.imasy.or.jp/~hisa/ruby/macruby.html).
56+
> However it's based on Ruby 1.1b7, and hasn't been updated since
57+
> December 1999. It's highly experimental. It may crash and sometimes freeze
58+
> the OS, even with the sample scripts included in the Ruby distribution.
59+
> (Sounds like fun ;-).
5960
6061
Rob tells us that there's Ruby 1.6.4 for OS/2 at
61-
http://www.aminet.org/systems/os2/dev/misc/.
62+
[http://www.aminet.org/systems/os2/dev/misc/](http://www.aminet.org/systems/os2/dev/misc/).
6263
However, that link seems broken: can anyone give us something that works?
6364

6465
### Where can I get Ruby sources?
6566

6667
The latest version of Ruby can be downloaded from:
67-
http://www.ruby-lang.org/en/download.html
68+
[http://www.ruby-lang.org/en/download.html](http://www.ruby-lang.org/en/download.html)
6869
Mirror sites are also listed on this page.
6970

7071
Also on this page is a link to a nightly snapshot of the development tree.
@@ -81,7 +82,8 @@ CVS password: guest
8182
~~~
8283

8384
If you do not have CVS you can get a nightly snapshot of the development
84-
source from ftp://ftp.netlab.co.jp/pub/lang/ruby/snapshot.tar.gz.
85+
source from
86+
[ftp://ftp.netlab.co.jp/pub/lang/ruby/snapshot.tar.gz](ftp://ftp.netlab.co.jp/pub/lang/ruby/snapshot.tar.gz).
8587

8688
### How do I compile Ruby?
8789

@@ -151,22 +153,25 @@ He recommends installing the GNU equivalent.
151153
### Are precompiled binaries available?
152154

153155
A single download that contains everything you need to run Ruby under various
154-
Windows operating systems. is available from RubyCentral's One-click Windows
155-
installer. This installation uses cygwin, and includes Tk support.
156+
Windows operating systems. is available from
157+
[RubyCentral's One-click Windows installer](http://www.rubycentral.com/downloads/ruby-install.html).
158+
This installation uses cygwin, and includes Tk support.
156159

157160
If you want other installation options, precompiled binaries for Windows are
158-
also available from http://www.os.rim.or.jp/~eban/. If you download the
159-
ruby-1.x.y-yyyymmdd-i386-cygwin.tar.gz package (which is a good choice),
160-
you'll also need to download the cygwin DLL, available from the same page.
161+
also available from
162+
[http://www.os.rim.or.jp/~eban/](http://www.os.rim.or.jp/~eban/).
163+
If you download the `ruby-1.x.y-yyyymmdd-i386-cygwin.tar.gz` package
164+
(which is a good choice), you'll also need to download the cygwin DLL,
165+
available from the same page.
161166

162-
Reuben Thomas writes:
167+
[Reuben Thomas](mailto:Reuben.Thomas@cl.cam.ac.uk) writes:
163168

164169
> You could mention that there's a port to Acorn RISC OS, currently of v1.4.3.
165170
> I made the port, and have no plans to maintain it, but I did send the
166171
> patches to matz, so newer versions may well compile too.
167172
168173
> I do provide a binary distribution of 1.4.3 for the Acorn at
169-
> http://www.cl.cam.ac.uk/users/rrt1001/ruby.zip.
174+
> [http://www.cl.cam.ac.uk/users/rrt1001/ruby.zip](http://www.cl.cam.ac.uk/users/rrt1001/ruby.zip).
170175
171176
### What's all this “cygwin”, “mingw”, and “djgpp” stuff?
172177

@@ -179,14 +184,15 @@ You may come across different versions of the Ruby executable that use
179184
different wrapper mapping layers.
180185

181186
The rbdj version is a stand-alone version of the Windows binary of Ruby.
182-
It uses the DJ Delorie tools (http://www.delorie.com).
187+
It uses the DJ Delorie tools
188+
([http://www.delorie.com](http://www.delorie.com)).
183189

184190
The rbcw version is a Windows binary of Ruby that requires the cygwin library,
185-
available at http://www.cygwin.com or from the Ruby download pages. Cygwin is
186-
a both an emulation layer and a set of utilities initially produced by Cygnus
187-
Solutions (now part of Redhat). The Cygwin version of Ruby probably has the
188-
fullest set of features under Windows, so most programmers will want to use
189-
it.
191+
available at [http://www.cygwin.com](http://www.cygwin.com) or from the
192+
Ruby download pages. Cygwin is a both an emulation layer and a set of
193+
utilities initially produced by Cygnus Solutions (now part of Redhat).
194+
The Cygwin version of Ruby probably has the fullest set of features under
195+
Windows, so most programmers will want to use it.
190196

191197
To use the rbcw version, you will need to install the cygwin .dll separately.
192198
Once you have installed cygwin on your computer, copy `cygwin1.dll` (which
@@ -198,8 +204,8 @@ Thanks to Anders Schneiderman for the basis of this description
198204
### Why doesn't Tk graphics work under Windows?
199205

200206
Is Tk installed correctly on your Windows box? Go to
201-
http://dev.scriptics.com/software/tcltk/ to find a precompiled binary
202-
Tcl/Tk distribution for your box.
207+
[http://dev.scriptics.com/software/tcltk/](http://dev.scriptics.com/software/tcltk/)
208+
to find a precompiled binary Tcl/Tk distribution for your box.
203209

204210
Are the environment variables `TCL_LIBRARY` and `TK_LIBRARY` pointing to the
205211
directories containing tcl and tk?

en/documentation/faq/4/index.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ header: |
3838
## Variables, constants, and arguments
3939

4040
### Does assignment generate a new copy of an object?
41+
{: #assignment}
4142

4243
All variables and constants reference (point at) some object. (The exception
4344
is uninitialized local variables, which reference nothing. These raise a
@@ -51,7 +52,8 @@ There's a slightly deeper explanation in certain special cases. Instances of
5152
variables or constants--there is no reference involved. A variable holding the
5253
number `42` or the constant `true`, actually holds the value, and not a
5354
reference to it. Assignment therefore physically produces a copy of objects
54-
of these types. We discuss this more in Immediate and Reference Objects.
55+
of these types. We discuss this more in
56+
[Immediate and Reference Objects](../9/#immediate).
5557

5658
### What is the scope of a local variable?
5759

@@ -202,7 +204,7 @@ the `::` operator--`ModuleName::CONST1` or `ClassName::CONST2`.
202204
### How are arguments passed?
203205

204206
The actual argument is assigned to the formal argument when the method is
205-
invoked. (See assignment for more on the semantics of assignment.)
207+
invoked. (See [assignment](#assignment) for more on the semantics of assignment.)
206208

207209
~~~
208210
def addOne(n)

en/documentation/faq/7/index.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -317,6 +317,7 @@ to give it an alternative name. Finally, you can call the original method as
317317
a singleton method of `Kernel`.
318318

319319
### What is a destructive method?
320+
{: #destructive-method}
320321

321322
A destructive method is one which alters the state of an object. `String`,
322323
`Array`, and `Hash`, and others have such methods. Often there are two

en/documentation/faq/8/index.md

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,7 @@ an instance of `Class` class. (phew!)
107107
There is no way to access class instance variables from instance methods.
108108

109109
### What is a singleton method?
110+
{: #singleton-method}
110111

111112
A singleton method is an instance method associated with one specific object.
112113

@@ -136,8 +137,10 @@ Singleton methods are useful when you want to add a method to an object and
136137
creating a new subclass is not appropriate.
137138

138139
### Does Ruby have class methods?
140+
{: #class-method}
139141

140-
A singleton method of a class object is called a class method.
142+
A [singleton method](#singleton-method) of a class object is called a
143+
class method.
141144
(Actually, the class method is defined in the metaclass, but that is pretty
142145
much transparent). Another way of looking at it is to say that a class method
143146
is a method whose receiver is a class.
@@ -203,8 +206,8 @@ We've customized `foo` without changing the characteristics of `Foo`.
203206
### What is a module function?
204207

205208
A module function is a private, singleton method defined in a module.
206-
In effect, it is similar to a class method, in that it can be called using
207-
the `Module.method` notation:
209+
In effect, it is similar to a [class method](#class-method),
210+
in that it can be called using the `Module.method` notation:
208211

209212
~~~
210213
Math.sqrt(2) # => 1.414213562

en/documentation/faq/9/index.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ different sequences of random numbers. To get the old, predictable, behavior
6060
(perhaps for testing), call `srand` with a constant seed.
6161

6262
### What is the difference between an immediate value and a reference?
63+
{: #immediate}
6364

6465
`Fixnum`, `true`, `nil`, and `false` are implemented as immediate values.
6566
With immediate values, variables hold the objects themselves, rather than
@@ -319,6 +320,7 @@ character code as an integer constant by prefixing the character with a
319320
question mark, so `?a` is also 97 (`Fixnum`).
320321

321322
### How can I expand tabs to spaces?
323+
{: #tab-expansion}
322324

323325
If `a` holds the string to be expanded, you could use one of:
324326

@@ -355,9 +357,9 @@ In `sub`, a copy of the receiver is generated, substituted and returned.
355357
In `sub!`, the receiver is altered and returned if any match was found.
356358
Otherwise, `nil` is returned.
357359

358-
Methods like `sub!` are called destructive methods which alter the attribute
359-
of the receiver. If there are two similar methods and one is destructive,
360-
the destructive one has a suffix `!`.
360+
Methods like `sub!` are called [destructive methods](../7/#destructive-method)
361+
which alter the attribute of the receiver. If there are two similar methods
362+
and one is destructive, the destructive one has a suffix `!`.
361363

362364
~~~
363365
def foo(str)

0 commit comments

Comments
 (0)