Skip to content

Commit beb5721

Browse files
committed
Fix typographic quotation marks
1 parent 5287fbe commit beb5721

File tree

5 files changed

+25
-25
lines changed

5 files changed

+25
-25
lines changed

en/documentation/faq/1/index.md

+6-6
Original file line numberDiff line numberDiff line change
@@ -204,12 +204,12 @@ In mutt, you can get threading to work using the following variable setting.
204204

205205
### Which is correct, “Ruby” or “ruby”?
206206

207-
Officially, the language is called ``Ruby''. On most systems, it is invoked
208-
using the command ``ruby''. It's OK to use ruby instead of Ruby.
207+
Officially, the language is called Ruby. On most systems, it is invoked
208+
using the command `ruby`. It's OK to use ruby instead of Ruby.
209209

210210
Please don't use RUBY as the language name.
211211

212-
Originally, or historically, it was called ``ruby''.
212+
Originally, or historically, it was called ruby.
213213

214214
### Are there any Ruby books?
215215

@@ -219,14 +219,14 @@ October 2000.
219219

220220
A Japanese language Ruby reference book by matz, et al and published by ASCII
221221
is available in Japan (ISBN 4-7561-3254-5). An English translation,
222-
`` The Ruby Programming Language,'' is in the works from Addison-Wesley
222+
The Ruby Programming Language”, is in the works from Addison-Wesley
223223
(ISBN 020171096X).
224224

225-
A Japanese language ``Ruby Pocket Reference'' is published by O'Reilly Japan
225+
A Japanese language Ruby Pocket Reference is published by O'Reilly Japan
226226
(ISBN 4-87311-023-8). Let O'Reilly in the US know if you'd like to see a
227227
translation.
228228

229-
In addition, `` Mastering Regular Expressions,'' by Jeffrey Friedl, (the Hip
229+
In addition, Mastering Regular Expressions”, by Jeffrey Friedl, (the Hip
230230
Owl Book): ISBN 1-56592-257-3 from O'Reilly & Associates, is a reference work
231231
that covers the art and implementation of regular expressions in various
232232
programming languages. Most of it is highly relevant to Ruby regular

en/documentation/faq/2/index.md

+6-6
Original file line numberDiff line numberDiff line change
@@ -41,24 +41,24 @@ Python and Ruby are both object oriented languages that provide a smooth
4141
transition from procedural to OO programming styles. Smalltalk, by contrast,
4242
is object only - you can't do anything until you understand objects,
4343
inheritance and the sizable Smalltalk class hierarchy. By providing procedural
44-
training wheels, Python and Ruby ``fix'' one of the features that may have
44+
training wheels, Python and Ruby fix one of the features that may have
4545
kept Smalltalk out of the mainstream. The two languages differ by approaching
4646
this solution from opposite directions.
4747

4848
Python is a hybrid language. It has functions for procedural programming and
4949
objects for OO programming. Python bridges the two worlds by allowing
50-
functions and methods to interconvert using the explicit ``self'' parameter
50+
functions and methods to interconvert using the explicit `self` parameter
5151
of every method def. When a function is inserted into an object, the first
5252
argument automagically becomes a reference to the receiver.
5353

5454
Ruby is a pure OO language that can masquerade as a procedural one. It has no
55-
functions, only method calls. In a Ruby method the receiver, also called self,
56-
is a hidden argument like ``this'' in C++. A ``def'' statement outside of a
55+
functions, only method calls. In a Ruby method the receiver, also called `self`,
56+
is a hidden argument like `this` in C++. A `def` statement outside of a
5757
class definition, which is a function in Python, is actually a method call in
5858
Ruby. These ersatz functions become private methods of class Object, the root
5959
of the Ruby class hierarchy. Procedural programming is neatly solved from the
6060
other direction - everything is an object. If the user doesn't grok objects
61-
yet, they can just pretend that ``def'' is a function definition and still
61+
yet, they can just pretend that `def` is a function definition and still
6262
get useful work done.
6363

6464
Ruby's OO purity provides a number features that Python lacks or is still
@@ -77,7 +77,7 @@ Python is sprouting (lambdas and list comprehensions).
7777
Ruby's syntax and design philosophy are heavily influenced by Perl. It has a
7878
lot of syntactic variability. Statement modifiers (if, unless, while, until,
7979
etc.) may appear at the end of any statement. Some key words are optional
80-
(the ``then'' in an ``if'' statement for example). Parentheses may sometimes
80+
(the `then` in an `if` statement for example). Parentheses may sometimes
8181
be elided in method calls. The receiver of a method may usually be elided.
8282
Many, many things are lifted directly from Perl.
8383
Built in regular expressions, $_ and friends, here documents,

en/documentation/faq/4/index.md

+10-10
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ Produces:
7777
(Note that the class definition is executable code: the trace message it
7878
contains is written as the class is defined).
7979

80-
A block (``{'' ... ``}'' or do ... end) almost introduces a new scope ;-)
80+
A block (`{ ... }` or `do ... end`) almost introduces a new scope ;-)
8181
Locals created within a block are not accessible outside the block. However,
8282
if a local within the block has the same name as an existing local variable
8383
in the caller's scope, then no new local is created, and you can subsequently
@@ -126,10 +126,10 @@ is a method and the associated block introduces a new scope.
126126

127127
Actually, the question may be better asked as: "at what point does Ruby work
128128
out that something is a variable?" The problem arises because the simple
129-
expression ``a'' could be either a variable or a call to a method with no
129+
expression “a” could be either a variable or a call to a method with no
130130
parameters. To decide which is the case, Ruby looks for assignment statements.
131-
If at some point in the source prior to the use of ``a'' it sees it being
132-
assigned to, it decides to parse ``a'' as a variable, otherwise it treats it
131+
If at some point in the source prior to the use of “a” it sees it being
132+
assigned to, it decides to parse “a” as a variable, otherwise it treats it
133133
as a method. As a somewhat pathological case of this, consider this code
134134
fragment, submitted by Clemens Hintze:
135135

@@ -153,10 +153,10 @@ Produces:
153153
Function 'a' called
154154
a=99
155155

156-
During the parse, Ruby sees the use of ``a'' in the first print statement and,
157-
as it hasn't yet seen any assignment to ``a'', assumes that it is a method
156+
During the parse, Ruby sees the use of “a” in the first print statement and,
157+
as it hasn't yet seen any assignment to “a”, assumes that it is a method
158158
call. By the time it gets to the second print statement, though, it has seen
159-
an assignment, and so treats ``a'' as a variable.
159+
an assignment, and so treats “a” as a variable.
160160

161161
Note that the assignment does not have to be executed---Ruby just has to have
162162
seen it. This program does not raise an error.
@@ -331,11 +331,11 @@ calls yield), or by using the Proc.call method.
331331
a # -> "abcd"
332332
A # -> "abcd"
333333

334-
Variables hold references to objects. The assignment A = a = b = "abc" put a
335-
reference to the string ``abc'' into A, a, and b.
334+
Variables hold references to objects. The assignment A = a = b = "abc" puts a
335+
reference to the string abc into A, a, and b.
336336

337337
When you called b.concat("d"), you invoked the concat method on that object,
338-
changing it from ``abc'' to ``abcd''. Because a and A also reference that
338+
changing it from abc to abcd. Because a and A also reference that
339339
same object, their apparent value changes too.
340340

341341
This is less of a problem in practice than it might appear.

en/documentation/faq/6/index.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ header: |
3939

4040
A colon followed by a name generates an integer(Fixnum) called a symbol
4141
which corresponds one to one with the identifier. "var".intern gives the
42-
same integer as :var, but the ``:'' form will create a local symbol if it
42+
same integer as :var, but the “:” form will create a local symbol if it
4343
doesn't already exist.
4444

4545
The routines "catch", "throw", "autoload", and so on, require a string or a

en/documentation/faq/9/index.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -305,9 +305,9 @@ z
305305

306306
9.16 What does "abcd"[0] return?
307307

308-
It returns the character code for ``a'', 97(Fixnum). You can express a
308+
It returns the character code for “a”, 97 (Fixnum). You can express a
309309
character code as an integer constant by prefixing the character with a
310-
question mark, so ?a is also 97(Fixnum).
310+
question mark, so `?a` is also 97 (Fixnum).
311311

312312
9.17 How can I expand tabs to spaces?
313313

0 commit comments

Comments
 (0)