Skip to content

Commit 11069b7

Browse files
authored
Merge pull request #2135 from znz/Fixnum-to-Integer
`class Fixnum` to `class Integer` in documentation/ruby-from-other-languages
2 parents eeb48e6 + ff3217e commit 11069b7

File tree

16 files changed

+79
-79
lines changed
  • bg/documentation/ruby-from-other-languages
  • de/documentation/ruby-from-other-languages
  • en/documentation/ruby-from-other-languages
  • es/documentation/ruby-from-other-languages
  • fr/documentation/ruby-from-other-languages
  • id/documentation/ruby-from-other-languages
  • it/documentation/ruby-from-other-languages
  • ja/documentation/ruby-from-other-languages
  • ko/documentation/ruby-from-other-languages
  • pl/documentation/ruby-from-other-languages
  • pt/documentation/ruby-from-other-languages
  • ru/documentation/ruby-from-other-languages
  • tr/documentation/ruby-from-other-languages
  • vi/documentation/ruby-from-other-languages
  • zh_cn/documentation/ruby-from-other-languages
  • zh_tw/documentation/ruby-from-other-languages

16 files changed

+79
-79
lines changed

bg/documentation/ruby-from-other-languages/index.md

+5-5
Original file line numberDiff line numberDiff line change
@@ -259,12 +259,12 @@ t1 == t2
259259
### Отворени класове
260260

261261
Класовете в Ruby могат винаги да бъдат отворени, за да се допълват и променят.
262-
Всеки вграден клас от стандартната библиотека, като `Fixnum` или дори `Object`,
262+
Всеки вграден клас от стандартната библиотека, като `Integer` или дори `Object`,
263263
родителят на всички обекти, може да бъде променен. Ruby on Rails дефинира
264-
множество методи за употребата на дати и времена във `Fixnum`. Пример:
264+
множество методи за употребата на дати и времена във `Integer`. Пример:
265265

266266
{% highlight ruby %}
267-
class Fixnum
267+
class Integer
268268
def hours
269269
self * 3600 # number of seconds in an hour
270270
end
@@ -373,10 +373,10 @@ method(:puts).call "puts is an object!"
373373
### Операторите са синтактична захар
374374

375375
Повечето оператори са "синтактична захар" за извиквания на методи. Може
376-
например да се предифинира `Fixnum#+`:
376+
например да се предифинира `Integer#+`:
377377

378378
{% highlight ruby %}
379-
class Fixnum
379+
class Integer
380380
# You can, but please don't do this
381381
def +(other)
382382
self - other

de/documentation/ruby-from-other-languages/index.md

+5-5
Original file line numberDiff line numberDiff line change
@@ -292,12 +292,12 @@ t1 == t2
292292
### Offene Klassen
293293

294294
Ruby-Klassen sind offen. Du kannst sie jeder Zeit verändern und ihnen
295-
Methoden hinzufügen. Sogar eingebaute Klassen wie `Fixnum` oder `Object`
296-
(die Mutter aller Objekte) sind erweiterbar. ActiveSupport fügt `Fixnum`
295+
Methoden hinzufügen. Sogar eingebaute Klassen wie `Integer` oder `Object`
296+
(die Mutter aller Objekte) sind erweiterbar. ActiveSupport fügt `Integer`
297297
viele Methoden zur Erzeugung von Zeitangaben hinzu:
298298

299299
{% highlight ruby %}
300-
class Fixnum
300+
class Integer
301301
def hours
302302
self * 3600 # Anzahl der Sekunden in einer Stunde
303303
end
@@ -418,10 +418,10 @@ method(:puts).call "puts ist ein Objekt!"
418418

419419
Die meisten Operatoren in Ruby sind nur Methodenaufrufe mit einer
420420
speziellen Syntax (und ein paar Vorrangregeln). Du kannst zum Beispiel
421-
die Methode `+` für `Fixnum` überschreiben:
421+
die Methode `+` für `Integer` überschreiben:
422422

423423
{% highlight ruby %}
424-
class Fixnum
424+
class Integer
425425
# Du kannst, aber bitte tu es nicht.
426426
def +(other)
427427
self - other

en/documentation/ruby-from-other-languages/index.md

+5-5
Original file line numberDiff line numberDiff line change
@@ -270,12 +270,12 @@ t1 == t2
270270
### Classes are open
271271

272272
Ruby classes are open. You can open them up, add to them, and change them at
273-
any time. Even core classes, like `Fixnum` or even `Object`, the parent of all
273+
any time. Even core classes, like `Integer` or even `Object`, the parent of all
274274
objects. Ruby on Rails defines a bunch of methods for dealing with time on
275-
`Fixnum`. Watch:
275+
`Integer`. Watch:
276276

277277
{% highlight ruby %}
278-
class Fixnum
278+
class Integer
279279
def hours
280280
self * 3600 # number of seconds in an hour
281281
end
@@ -390,11 +390,11 @@ method(:puts).call "puts is an object!"
390390
### Operators are syntactic sugar
391391

392392
Most operators in Ruby are just syntactic sugar (with some precedence
393-
rules) for method calls. You can, for example, override Fixnum’s `+`
393+
rules) for method calls. You can, for example, override Integer’s `+`
394394
method:
395395

396396
{% highlight ruby %}
397-
class Fixnum
397+
class Integer
398398
# You can, but please don't do this
399399
def +(other)
400400
self - other

es/documentation/ruby-from-other-languages/index.md

+5-5
Original file line numberDiff line numberDiff line change
@@ -286,12 +286,12 @@ t1 == t2
286286

287287
Las clases de Ruby están abiertas. Puedes abrirlas, agregarles
288288
funcionalidad y modificarlas en cualquier momento. Incluso las clases
289-
principales, como `Fixnum` o incluso `Object`, el padre de todos los
289+
principales, como `Integer` o incluso `Object`, el padre de todos los
290290
objetos. Ruby on Rails define un montón de métodos para manejar el
291-
tiempo y los horarios en `Fixnum`. Mira:
291+
tiempo y los horarios en `Integer`. Mira:
292292

293293
{% highlight ruby %}
294-
class Fixnum
294+
class Integer
295295
def hours
296296
self * 3600 # cantidad de segundos en una hora
297297
end
@@ -410,10 +410,10 @@ method(:puts).call "¡puts es un objeto!"
410410

411411
La mayoría de los operadores en Ruby son simples simplificaciones
412412
sintácticas (con algunas reglas de precedencia) para llamar a ciertos
413-
métodos. Puedes, por ejemplo, redefinir el método `Fixnum#+`\:
413+
métodos. Puedes, por ejemplo, redefinir el método `Integer#+`\:
414414

415415
{% highlight ruby %}
416-
class Fixnum
416+
class Integer
417417
# Puedes, pero por favor no lo hagas
418418
def +(otro)
419419
self - otro

fr/documentation/ruby-from-other-languages/index.md

+5-5
Original file line numberDiff line numberDiff line change
@@ -285,12 +285,12 @@ t1 == t2
285285

286286
Ouvertes à la modification, à tout moment. Vous pouvez y faire des
287287
ajouts, les modifier durant l’exécution. Y compris les classes
288-
standards, telles que `Fixnum`, voire `Object`, la classe parente de
288+
standards, telles que `Integer`, voire `Object`, la classe parente de
289289
toute autre. Par exemple, l’application Ruby on Rails défini nombre de
290-
méthodes pour traiter le temps, au sein de `Fixnum`. Voyez ceci :
290+
méthodes pour traiter le temps, au sein de `Integer`. Voyez ceci :
291291

292292
{% highlight ruby %}
293-
class Fixnum
293+
class Integer
294294
def hours
295295
self * 3600 # nombre de secondes dans une heure
296296
end
@@ -412,10 +412,10 @@ method(:puts).call "puts est un objet !"
412412

413413
La plupart des opérateurs ne sont là que pour faciliter la vie du
414414
programmeur (et gèrent aussi les règles de priorité mathématique). Vous
415-
pouvez, par exemple, redéfinir la méthode `+` de la classe `Fixnum`\:
415+
pouvez, par exemple, redéfinir la méthode `+` de la classe `Integer`\:
416416

417417
{% highlight ruby %}
418-
class Fixnum
418+
class Integer
419419
# Possible, mais pas recommandé...
420420
def +(other)
421421
self - other

id/documentation/ruby-from-other-languages/index.md

+5-5
Original file line numberDiff line numberDiff line change
@@ -293,13 +293,13 @@ t1 == t2
293293

294294
Kelas Ruby bersifat terbuka. Anda bisa membuka `Class`, lalu menambahkan
295295
ke dalam `Class`, dan menggantinya kapan saja. Bahkan kelas yang
296-
termasuk class inti, seperti kelas `Fixnum` atau bahkan kelas `Object`,
296+
termasuk class inti, seperti kelas `Integer` atau bahkan kelas `Object`,
297297
induk dari semua obyek di Ruby. Ruby on Rails mendefinisikan banyak
298-
metode yang berhubungan dengan waktu ke dalam kelas `Fixnum`. Perhatikan
298+
metode yang berhubungan dengan waktu ke dalam kelas `Integer`. Perhatikan
299299
kode berikut:
300300

301301
{% highlight ruby %}
302-
class Fixnum
302+
class Integer
303303
def hours
304304
self * 3600 # total detik dalam satu jam adalah 3600
305305
end
@@ -431,10 +431,10 @@ Kebanyakan operator di Ruby hanyalah *syntactic sugar*. Maksudnya
431431
operator-operator itu, mereka sebenarnya hanyalah pemanggilan metode
432432
saja, tentunya dengan peraturan tertentu supaya jenjang *precedence*
433433
tetap dituruti. Contohnya, Anda bisa meng-*override* metode + milik
434-
kelas Fixnum:
434+
kelas Integer:
435435

436436
{% highlight ruby %}
437-
class Fixnum
437+
class Integer
438438
# Sebenarnya Anda bisa melakukan ini,
439439
# tetapi tolong jangan lakukan ini
440440
def +(other)

it/documentation/ruby-from-other-languages/index.md

+5-5
Original file line numberDiff line numberDiff line change
@@ -281,12 +281,12 @@ t1 == t2
281281

282282
In Ruby, tutte le classi sono “aperte”. Questo vuol dire che puoi aggiungere
283283
metodi e variabili e cambiarle in qualsiasi momento, e questo vale anche per
284-
classi interne, come `Fixnum` o anche `Object`, il “genitore” di tutti gli
284+
classi interne, come `Integer` o anche `Object`, il “genitore” di tutti gli
285285
oggetti. Ruby on Rails, per esempio, definisce una serie di metodi per fare
286-
operazioni temporali con oggetti `Fixnum`\:
286+
operazioni temporali con oggetti `Integer`\:
287287

288288
{% highlight ruby %}
289-
class Fixnum
289+
class Integer
290290
def hours
291291
self * 3600 # numero di secondi in un'ora
292292
end
@@ -410,10 +410,10 @@ method(:puts).call "puts è un oggetto!"
410410

411411
Molti degli operatori sono solamente dello “zucchero sintattico” (con
412412
alcune regole di precendenza però) per delle chiamate a dei metodi. È
413-
possibile, per esempio, ridefinire il metodo ”+” della classe Fixnum:
413+
possibile, per esempio, ridefinire il metodo ”+” della classe Integer:
414414

415415
{% highlight ruby %}
416-
class Fixnum
416+
class Integer
417417
# Puoi farlo, ma è meglio di no!
418418
def +(other)
419419
self - other

ja/documentation/ruby-from-other-languages/index.md

+5-5
Original file line numberDiff line numberDiff line change
@@ -283,12 +283,12 @@ t1 == t2
283283

284284
Rubyのクラスは開いています。
285285
いつでもクラスを開いて、定義を足したり、変更することができます。
286-
`Fixnum`や、すべてのオブジェクトの祖先である`Object`のようなクラスであっても、
286+
`Integer`や、すべてのオブジェクトの祖先である`Object`のようなクラスであっても、
287287
自由に再定義することが可能です。Ruby on Railsは、次のような
288-
`Fixnum`に時間を扱うメソッド群を定義しています。
288+
`Integer`に時間を扱うメソッド群を定義しています。
289289

290290
{% highlight ruby %}
291-
class Fixnum
291+
class Integer
292292
def hours
293293
self * 3600 # 1時間あたりの秒数を返します
294294
end
@@ -406,10 +406,10 @@ method(:puts).call "putsはオブジェクト!"
406406

407407
Rubyにおけるほとんどの演算子は糖衣構文です。
408408
いくつかの優先順位規則にもとづいて、メソッド呼び出しを単に書き換えているだけです。
409-
たとえば、Fixnumクラスの`+`メソッドを次のようにオーバーライドすることもできます。
409+
たとえば、Integerクラスの`+`メソッドを次のようにオーバーライドすることもできます。
410410

411411
{% highlight ruby %}
412-
class Fixnum
412+
class Integer
413413
# できるけれど、しないほうがいいでしょう
414414
def +(other)
415415
self - other

ko/documentation/ruby-from-other-languages/index.md

+5-5
Original file line numberDiff line numberDiff line change
@@ -257,12 +257,12 @@ t1 == t2
257257
### 열린 클래스
258258

259259
루비의 클래스는 열려 있습니다. 언제든 클래스를 열어서, 추가하고, 변경할 수
260-
있습니다. `Fixnum`이나 심지어 모든 객체의 부모인 `Object` 같은 코어 클래스도
261-
예외는 아닙니다. 루비 온 레일즈에서는 시간을 제어하기 위해 `Fixnum`에 많은
260+
있습니다. `Integer` 심지어 모든 객체의 부모인 `Object` 같은 코어 클래스도
261+
예외는 아닙니다. 루비 온 레일즈에서는 시간을 제어하기 위해 `Integer`에 많은
262262
메서드를 추가해서 사용합니다. 밑을 보세요.
263263

264264
{% highlight ruby %}
265-
class Fixnum
265+
class Integer
266266
def hours
267267
self * 3600 # 한 시간을 초로 환산한 수
268268
end
@@ -377,11 +377,11 @@ method(:puts).call "puts is an object!"
377377
### 연산자는 신택스 슈거
378378

379379
루비의 대부분의 연산자는 메서드 호출의 (몇가지 우선순위 규칙을
380-
포함한) 신택스 슈거입니다. 예를 들어, Fixnum의 + 메서드를 오버라이드
380+
포함한) 신택스 슈거입니다. 예를 들어, Integer의 + 메서드를 오버라이드
381381
할 수 있습니다.
382382

383383
{% highlight ruby %}
384-
class Fixnum
384+
class Integer
385385
# 할 수는 있지만, 하지 마세요.
386386
def +(other)
387387
self - other

pl/documentation/ruby-from-other-languages/index.md

+5-5
Original file line numberDiff line numberDiff line change
@@ -266,12 +266,12 @@ t1 == t2
266266

267267
Klasy Rubiego są otwarte. Można je otworzyć, dodać nowe metody czy
268268
zmienić istniejące działanie w dowolnym momencie. Nawet główne klasy
269-
takie jak `Fixnum` czy nawet `Object`, rodzic wszystkich obiektów. Ruby
269+
takie jak `Integer` czy nawet `Object`, rodzic wszystkich obiektów. Ruby
270270
on Rails na przykład definiuje zestaw metod do operowania czasem w
271-
klasie `Fixnum`. Poniżej:
271+
klasie `Integer`. Poniżej:
272272

273273
{% highlight ruby %}
274-
class Fixnum
274+
class Integer
275275
def hours
276276
self * 3600 # liczba sekund w godzinie
277277
end
@@ -390,10 +390,10 @@ method(:puts).call "puts to obiekt!"
390390
### Operatory to cukier syntaktyczny
391391

392392
Większość operatorów w Rubim to po prostu cukier syntaktyczny dla
393-
wywołań metod. Możesz, na przykład, nadpisać metodę + klasy Fixnum:
393+
wywołań metod. Możesz, na przykład, nadpisać metodę + klasy Integer:
394394

395395
{% highlight ruby %}
396-
class Fixnum
396+
class Integer
397397
# Możesz, ale proszę nie rób tego !
398398
def +(other)
399399
self - other

pt/documentation/ruby-from-other-languages/index.md

+5-5
Original file line numberDiff line numberDiff line change
@@ -275,12 +275,12 @@ t1 == t2
275275
### As Classes são abertas
276276

277277
As classes em Ruby são abertas. Poderá abrir, adicionar e alterá-las a
278-
qualquer altura. Mesmo as classes do núcleo como por exemplo `Fixnum` ou
278+
qualquer altura. Mesmo as classes do núcleo como por exemplo `Integer` ou
279279
mesmo a classe `Object`, a classe de topo. O Ruby on Rails define uma
280-
quantidade de métodos para lidar com as horas na classe `Fixnum`. Veja:
280+
quantidade de métodos para lidar com as horas na classe `Integer`. Veja:
281281

282282
{% highlight ruby %}
283-
class Fixnum
283+
class Integer
284284
def horas
285285
self * 3600 # nu'mero de segundos numa hora
286286
end
@@ -405,10 +405,10 @@ method(:puts).call "puts e' um objecto!"
405405

406406
A maioria dos operadores em Ruby são somente açúcar sintático (com
407407
algumas regras de precedência) para chamadas a métodos. Poderá, por
408-
exemplo, redifinir o método + da classe Fixnum:
408+
exemplo, redifinir o método + da classe Integer:
409409

410410
{% highlight ruby %}
411-
class Fixnum
411+
class Integer
412412
# Pode fazer, mas por favor não faça isto
413413
def +(outro)
414414
self - outro

ru/documentation/ruby-from-other-languages/index.md

+5-5
Original file line numberDiff line numberDiff line change
@@ -261,12 +261,12 @@ t1 == t2
261261
### Открытые классы
262262

263263
Классы в Ruby "открыты". То есть, вы можете открыть их и добавить или изменить их
264-
в любое время. Даже базовые классы, такие как `Fixnum` или `Object`, родительский
265-
для всех объектов. Ruby on Rails определяет несколько методов на `Fixnum`, чтобы
264+
в любое время. Даже базовые классы, такие как `Integer` или `Object`, родительский
265+
для всех объектов. Ruby on Rails определяет несколько методов на `Integer`, чтобы
266266
работать со временем. Смотрите:
267267

268268
{% highlight ruby %}
269-
class Fixnum
269+
class Integer
270270
def hours
271271
self * 3600 # число секунд в 1 часе
272272
end
@@ -381,10 +381,10 @@ method(:puts).call "puts is an object!"
381381

382382
Большинство операторов в Ruby - это просто синтаксический сахар (с учетом некоторых
383383
правил) для вызова методов. Например, можно переопределить `+` метод для класса
384-
`Fixnum`:
384+
`Integer`:
385385

386386
{% highlight ruby %}
387-
class Fixnum
387+
class Integer
388388
# Так можно, но не значит, что нужно ;)
389389
def +(other)
390390
self - other

tr/documentation/ruby-from-other-languages/index.md

+5-5
Original file line numberDiff line numberDiff line change
@@ -254,12 +254,12 @@ t1 == t2
254254
### Sınıflar Açıktır
255255

256256
Ruby sınıfları açıktır. İstediğiniz zaman açabilir, ekleme yapabilir,
257-
değiştirebilirsiniz. Core sınıfları bile, mesela `Fixnum` ve hatta tüm
258-
sınıfların anası `Object` sınıfı dahil. Ruby on Rails `Fixnum` sınıfına
257+
değiştirebilirsiniz. Core sınıfları bile, mesela `Integer` ve hatta tüm
258+
sınıfların anası `Object` sınıfı dahil. Ruby on Rails `Integer` sınıfına
259259
zamanla ilgili bir kısım metod eklemiştir. İzleyin:
260260

261261
{% highlight ruby %}
262-
class Fixnum
262+
class Integer
263263
def hours
264264
self * 3600 # bir saat içindeki saniye miktarı
265265
end
@@ -375,10 +375,10 @@ method(:puts).call "puts is an object!"
375375
### Operatörler de Deyimdir
376376

377377
Ruby’deki operatörler birbirlerine belli öncelikleri olan metodlardır.
378-
Bu yüzden isterseniz Fixnum’un + metodunu değiştirebilirsiniz:
378+
Bu yüzden isterseniz Integer’un + metodunu değiştirebilirsiniz:
379379

380380
{% highlight ruby %}
381-
class Fixnum
381+
class Integer
382382
# Yapabilirsiniz ama lütfen bunu yapmayın
383383
def +(other)
384384
self - other

0 commit comments

Comments
 (0)