@@ -66,7 +66,7 @@ Ruby features:
66
66
67
67
### Show me some Ruby code!
68
68
69
- Let's define a class called Person, with a name and an age. We'll test our
69
+ Let's define a class called ` Person ` , with a name and an age. We'll test our
70
70
code by creating a few people and examining them.
71
71
72
72
~~~
@@ -100,8 +100,8 @@ zoe: 7
100
100
~~~
101
101
102
102
The code uses regular expressions to parse successive lines from the input
103
- file, creating a new Person object for each match and pushing it on to the
104
- end of the array people.
103
+ file, creating a new ` Person ` object for each match and pushing it on to the
104
+ end of the array ` people ` .
105
105
106
106
~~~
107
107
people = Array.new
@@ -122,7 +122,7 @@ sorted = people.sort do |a,b| a.age <=> b.age end
122
122
sorted # => [elmo (4), zoe (7), bert (8), ernie (8), cookie (11)]
123
123
~~~
124
124
125
- Another way would be to change the comparison method for class Person:
125
+ Another way would be to change the comparison method for class ` Person ` :
126
126
127
127
~~~
128
128
class Person
@@ -195,8 +195,8 @@ the last four in Japanese:
195
195
~~~
196
196
ruby-talk: English language discussion of Ruby.
197
197
ruby-list: Japanese language discussion of Ruby.
198
- ruby-dev: List for Ruby developers.
199
- ruby-ext: List for people writing extensions for or with Ruby.
198
+ ruby-dev: List for Ruby developers.
199
+ ruby-ext: List for people writing extensions for or with Ruby.
200
200
ruby-math: Ruby in mathematics.
201
201
~~~
202
202
@@ -221,9 +221,9 @@ set reply_regexp="^(\[[a-z0-9:-]+\][[:space:]]*)?(re([\[0-9\]+])*|aw):[[:space:]
221
221
### Which is correct, “Ruby” or “ruby”?
222
222
223
223
Officially, the language is called “Ruby”. On most systems, it is invoked
224
- using the command ` ruby ` . It's OK to use ruby instead of Ruby.
224
+ using the command ` ruby ` . It's OK to use “ ruby” instead of “ Ruby” .
225
225
226
- Please don't use RUBY as the language name.
226
+ Please don't use “ RUBY” as the language name.
227
227
228
228
Originally, or historically, it was called “ruby”.
229
229
@@ -250,17 +250,17 @@ expressions.
250
250
251
251
### Which editors provide support for Ruby?
252
252
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") to your
255
- .emacs file to allow ruby-mode.el to detect the syntax highlighting package
256
- you're using.
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
257
* Vim: Vim 5.7 and later have Ruby syntax files as standard in the runtime
258
258
package. For prior versions, a syntax file for Ruby is available at
259
259
http://www.xs4all.nl/~hipster/lib/ruby/ruby.vim .
260
260
* Jedit: A portable editor written in Java, comes with support for Ruby.
261
261
* Jed: An s-lang file supporting Ruby is available at
262
262
http://www.kondara.org/~g/slang/ruby.sl .
263
- * Nedit ( http://www.nedit.org ): Eric Santonacci has written Ruby support for
263
+ * Nedit (http://www.nedit.org ): Eric Santonacci has written Ruby support for
264
264
Nedit, available from ftp://ftp.talc.fr/pub/ruby/ruby.nedit-0.1.tar.gz.
265
265
* Barry Shultz has written a Ruby definition file for TextPad, available at
266
266
http://www.textpad.com/add-ons/ntsyn.html .
@@ -277,13 +277,13 @@ str = "Billy" + " Bob" # => "Billy Bob"
277
277
str[0,1] + str[2,1] + str[-2,2] # => "Blob"
278
278
~~~
279
279
280
- Gotoken's xmp package, available from
280
+ Gotoken's ` xmp ` package, available from
281
281
http://www.ruby-lang.org/en/raa-list.rhtml?name=xmp is a utility that
282
282
annotates Ruby source code this way.
283
283
284
284
Emacs and vim users can integrate this with their editing environments, which
285
285
is useful if you want to send people e-mail with annotated Ruby code. Having
286
- installed xmp, Emacs users can add the following to their .emacs file:
286
+ installed ` xmp ` , Emacs users can add the following to their ` .emacs ` file:
287
287
288
288
~~~
289
289
(defun ruby-xmp-region (reg-start reg-end)
@@ -315,10 +315,12 @@ mailing list). Generally you'll get timely answers from matz himself, the
315
315
author of the language, from other gurus, and from those who've solved
316
316
problems similar to your own.
317
317
318
- Please include the output of ruby -v along with any problematic source code.
318
+ Please include the output of ` ruby -v ` along with any problematic
319
+ source code.
319
320
320
- If you have a problem using irb, be aware that it has some limitations.
321
- Try the script using ` irb --single-irb ` , or directly using the ruby command.
321
+ If you have a problem using ` irb ` , be aware that it has some limitations.
322
+ Try the script using ` irb --single-irb ` , or directly using the
323
+ ` ruby ` command.
322
324
323
325
There might be similar questions in the mailing list, and it is good
324
326
netiquette to read through recent mails (RFC1855:3.1.1, 3.1.2) before asking.
0 commit comments