Skip to content

class Fixnum to class Integer in documentation/ruby-from-other-languages #2135

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Sep 22, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions bg/documentation/ruby-from-other-languages/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -259,12 +259,12 @@ t1 == t2
### Отворени класове

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

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

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

{% highlight ruby %}
class Fixnum
class Integer
# You can, but please don't do this
def +(other)
self - other
Expand Down
10 changes: 5 additions & 5 deletions de/documentation/ruby-from-other-languages/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -292,12 +292,12 @@ t1 == t2
### Offene Klassen

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

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

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

{% highlight ruby %}
class Fixnum
class Integer
# Du kannst, aber bitte tu es nicht.
def +(other)
self - other
Expand Down
10 changes: 5 additions & 5 deletions en/documentation/ruby-from-other-languages/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -270,12 +270,12 @@ t1 == t2
### Classes are open

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

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

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

{% highlight ruby %}
class Fixnum
class Integer
# You can, but please don't do this
def +(other)
self - other
Expand Down
10 changes: 5 additions & 5 deletions es/documentation/ruby-from-other-languages/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -286,12 +286,12 @@ t1 == t2

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

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

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

{% highlight ruby %}
class Fixnum
class Integer
# Puedes, pero por favor no lo hagas
def +(otro)
self - otro
Expand Down
10 changes: 5 additions & 5 deletions fr/documentation/ruby-from-other-languages/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -285,12 +285,12 @@ t1 == t2

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

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

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

{% highlight ruby %}
class Fixnum
class Integer
# Possible, mais pas recommandé...
def +(other)
self - other
Expand Down
10 changes: 5 additions & 5 deletions id/documentation/ruby-from-other-languages/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -293,13 +293,13 @@ t1 == t2

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

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

{% highlight ruby %}
class Fixnum
class Integer
# Sebenarnya Anda bisa melakukan ini,
# tetapi tolong jangan lakukan ini
def +(other)
Expand Down
10 changes: 5 additions & 5 deletions it/documentation/ruby-from-other-languages/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -281,12 +281,12 @@ t1 == t2

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

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

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

{% highlight ruby %}
class Fixnum
class Integer
# Puoi farlo, ma è meglio di no!
def +(other)
self - other
Expand Down
10 changes: 5 additions & 5 deletions ja/documentation/ruby-from-other-languages/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -283,12 +283,12 @@ t1 == t2

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

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

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

{% highlight ruby %}
class Fixnum
class Integer
# できるけれど、しないほうがいいでしょう
def +(other)
self - other
Expand Down
10 changes: 5 additions & 5 deletions ko/documentation/ruby-from-other-languages/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -257,12 +257,12 @@ t1 == t2
### 열린 클래스

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

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

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

{% highlight ruby %}
class Fixnum
class Integer
# 할 수는 있지만, 하지 마세요.
def +(other)
self - other
Expand Down
10 changes: 5 additions & 5 deletions pl/documentation/ruby-from-other-languages/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -266,12 +266,12 @@ t1 == t2

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

{% highlight ruby %}
class Fixnum
class Integer
def hours
self * 3600 # liczba sekund w godzinie
end
Expand Down Expand Up @@ -390,10 +390,10 @@ method(:puts).call "puts to obiekt!"
### Operatory to cukier syntaktyczny

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

{% highlight ruby %}
class Fixnum
class Integer
# Możesz, ale proszę nie rób tego !
def +(other)
self - other
Expand Down
10 changes: 5 additions & 5 deletions pt/documentation/ruby-from-other-languages/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -275,12 +275,12 @@ t1 == t2
### As Classes são abertas

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

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

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

{% highlight ruby %}
class Fixnum
class Integer
# Pode fazer, mas por favor não faça isto
def +(outro)
self - outro
Expand Down
10 changes: 5 additions & 5 deletions ru/documentation/ruby-from-other-languages/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -261,12 +261,12 @@ t1 == t2
### Открытые классы

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

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

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

{% highlight ruby %}
class Fixnum
class Integer
# Так можно, но не значит, что нужно ;)
def +(other)
self - other
Expand Down
10 changes: 5 additions & 5 deletions tr/documentation/ruby-from-other-languages/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -254,12 +254,12 @@ t1 == t2
### Sınıflar Açıktır

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

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

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

{% highlight ruby %}
class Fixnum
class Integer
# Yapabilirsiniz ama lütfen bunu yapmayın
def +(other)
self - other
Expand Down
Loading