From 3d73e1ba0fd80d4a6468c9a5983149ef61fe1cb5 Mon Sep 17 00:00:00 2001 From: Jeroen Versteeg Date: Wed, 24 Dec 2025 16:55:41 +0100 Subject: [PATCH] Fix code formatting in "to Ruby from PHP" Mark abs(-1) and -1.abs as code sections. --- .../ruby-from-other-languages/to-ruby-from-php/index.md | 2 +- .../ruby-from-other-languages/to-ruby-from-php/index.md | 2 +- .../ruby-from-other-languages/to-ruby-from-php/index.md | 2 +- .../ruby-from-other-languages/to-ruby-from-php/index.md | 2 +- .../ruby-from-other-languages/to-ruby-from-php/index.md | 4 ++-- .../ruby-from-other-languages/to-ruby-from-php/index.md | 2 +- .../ruby-from-other-languages/to-ruby-from-php/index.md | 2 +- .../ruby-from-other-languages/to-ruby-from-php/index.md | 2 +- .../ruby-from-other-languages/to-ruby-from-php/index.md | 2 +- .../ruby-from-other-languages/to-ruby-from-php/index.md | 2 +- .../ruby-from-other-languages/to-ruby-from-php/index.md | 2 +- 11 files changed, 12 insertions(+), 12 deletions(-) diff --git a/bg/documentation/ruby-from-other-languages/to-ruby-from-php/index.md b/bg/documentation/ruby-from-other-languages/to-ruby-from-php/index.md index 925e61c724..948be1edc1 100644 --- a/bg/documentation/ruby-from-other-languages/to-ruby-from-php/index.md +++ b/bg/documentation/ruby-from-other-languages/to-ruby-from-php/index.md @@ -37,7 +37,7 @@ PHP е широко разпространен език за писане на `to_i` и т.н. за превръщане на низове, числа, вместо да разчитате интерпретатора да свърши това * Низовете, числата, масивите и хешовете са обекти. За това вместо - abs(-1) ползваме -1.abs + `abs(-1)` ползваме `-1.abs` * Не е задължителна употребата на скоби в извикването на методи * Стандартната библиотека и разширенията са организирани в модули и класове diff --git a/de/documentation/ruby-from-other-languages/to-ruby-from-php/index.md b/de/documentation/ruby-from-other-languages/to-ruby-from-php/index.md index 1d2c48e964..feaab29107 100644 --- a/de/documentation/ruby-from-other-languages/to-ruby-from-php/index.md +++ b/de/documentation/ruby-from-other-languages/to-ruby-from-php/index.md @@ -38,7 +38,7 @@ Im Gegensatz zu PHP hat Ruby… * Es gibt auch strenge Typisierung: man muss explizit Funktionen zur Typkonvertierung aufrufen. Z.B. `to_s` oder `to_i` * strings, numbers, arrays, hashes, etc. sind Objekte. Also statt - abs(-1) schreibt man in Ruby -1.abs + `abs(-1)` schreibt man in Ruby `-1.abs` * Parameter bei Methodenaufrufen brauchen nicht in runde Klammern gesetzt werden – außer, falls notwendig, um Mehrdeutigkeit zu vermeiden. diff --git a/en/documentation/ruby-from-other-languages/to-ruby-from-php/index.md b/en/documentation/ruby-from-other-languages/to-ruby-from-php/index.md index 8ce6ad36d0..aacf344d62 100644 --- a/en/documentation/ruby-from-other-languages/to-ruby-from-php/index.md +++ b/en/documentation/ruby-from-other-languages/to-ruby-from-php/index.md @@ -36,7 +36,7 @@ Unlike in PHP, in Ruby… convert between strings, integers and so on, instead of relying on the language to do it. * Strings, numbers, arrays, hashes, etc. are objects. Instead of calling - abs(-1) it’s -1.abs. + `abs(-1)` it’s `-1.abs`. * Parentheses are optional in method calls, except to clarify which parameters go to which method calls. * The standard library and extensions are organized in modules and classes. diff --git a/it/documentation/ruby-from-other-languages/to-ruby-from-php/index.md b/it/documentation/ruby-from-other-languages/to-ruby-from-php/index.md index e9b175df53..7254e1e1da 100644 --- a/it/documentation/ruby-from-other-languages/to-ruby-from-php/index.md +++ b/it/documentation/ruby-from-other-languages/to-ruby-from-php/index.md @@ -37,7 +37,7 @@ A differenza di PHP, in Ruby… effettuare delle conversioni tra stringhe, numeri interi, e così via, invece di lasciare al linguaggio tale compito. * Stringhe, numeri, array, hash ecc. sono degli oggetti. Invece di - chiamare abs(-1) si chiama -1.abs. + chiamare `abs(-1)` si chiama `-1.abs`. * Le parentesi sono opzionali nelle chiamate ai metodi, eccetto per chiarificare quali parametri si riferiscono a quali metodi. * La libreria standard e le estensioni sono organizzate in moduli e classi. diff --git a/ko/documentation/ruby-from-other-languages/to-ruby-from-php/index.md b/ko/documentation/ruby-from-other-languages/to-ruby-from-php/index.md index bb27cc9ecf..3362ccb43d 100644 --- a/ko/documentation/ruby-from-other-languages/to-ruby-from-php/index.md +++ b/ko/documentation/ruby-from-other-languages/to-ruby-from-php/index.md @@ -33,8 +33,8 @@ PHP와는 다르게, Ruby에서는... * 강 타입을 사용합니다. 문자열, 정수 등을 변환하려면 언어에 의존하는 대신 `to_s`, `to_i` 등을 호출해야 합니다. -* 문자열, 숫자, 배열, 해시 등은 객체입니다. abs(-1)을 호출하는 대신 - -1.abs입니다. +* 문자열, 숫자, 배열, 해시 등은 객체입니다. `abs(-1)`을 호출하는 대신 + `-1.abs`입니다. * 메서드 호출에서 괄호는 생략 가능합니다. 단, 어떤 매개변수가 어떤 메서드 호출로 이동하는지 명확히 하는 경우는 예외입니다. * 표준 라이브러리 및 확장은 모듈 및 클래스로 구성됩니다. diff --git a/pl/documentation/ruby-from-other-languages/to-ruby-from-php/index.md b/pl/documentation/ruby-from-other-languages/to-ruby-from-php/index.md index d6fa9dafbd..e28b8efff7 100644 --- a/pl/documentation/ruby-from-other-languages/to-ruby-from-php/index.md +++ b/pl/documentation/ruby-from-other-languages/to-ruby-from-php/index.md @@ -39,7 +39,7 @@ W przeciwieństwie do PHP, w Rubim… przeprowadzić konwersje pomiędzy łańcuchami znaków, liczbami całkowitymi i podobnymi, zamiast polegać, że język zrobi to za ciebie. * Stringi, liczby, tablice, hasze itp. są obiektami. Zamiast wywoływać - abs(-1) piszesz -1.abs. + `abs(-1)` piszesz `-1.abs`. * Nawiasy są opcjonalne w wywołaniach metod, chyba że musisz wyjaśnić w ten sposób, które parametry odnoszą się do odpowiednich wywołań metod. * Zamiast konwencji nazw (np. podkreśleń), biblioteka standardowa diff --git a/pt/documentation/ruby-from-other-languages/to-ruby-from-php/index.md b/pt/documentation/ruby-from-other-languages/to-ruby-from-php/index.md index 2fbfb06d30..68893c50bf 100644 --- a/pt/documentation/ruby-from-other-languages/to-ruby-from-php/index.md +++ b/pt/documentation/ruby-from-other-languages/to-ruby-from-php/index.md @@ -38,7 +38,7 @@ Diferente do PHP, em Ruby … etc. para converter entre strings, inteiros e demais tipos, em vez de confiar na linguagem para o fazer. * Strings, números, arrays, hashes, etc. são objectos. Em vez de - invocarmos abs(-1) é -1.abs + invocarmos `abs(-1)` é `-1.abs` * Os parêntesis são opcionais nas invocações dos métodos, excepto para clarificar que parâmetros são passados para que método. * Em vez de convenções de nomes, tal como o uso de underscore (`_`), a diff --git a/tr/documentation/ruby-from-other-languages/to-ruby-from-php/index.md b/tr/documentation/ruby-from-other-languages/to-ruby-from-php/index.md index 2535ce0838..c4591a8e0a 100644 --- a/tr/documentation/ruby-from-other-languages/to-ruby-from-php/index.md +++ b/tr/documentation/ruby-from-other-languages/to-ruby-from-php/index.md @@ -39,7 +39,7 @@ PHP’nin aksine, Rubyde… arasında çeviri yapabilmek için bunu yapması için dile güvenmek yerine `to_s`, `to_i` vs. metodları kullanmalısınız. * Karakter dizileri, sayılar, dizeler, hash veri tipleri, vs. nesnedir. - abs(-1) yerine -1.abs olarak kullanılır. + `abs(-1)` yerine `-1.abs` olarak kullanılır. * Parantezler metod çağrılarında isteğe bağlıdır, hangi parametrelerin hangi metod çağrılarına gideceğini netleştirmek için kullanılanlar hariç. diff --git a/uk/documentation/ruby-from-other-languages/to-ruby-from-php/index.md b/uk/documentation/ruby-from-other-languages/to-ruby-from-php/index.md index 836e33bfb3..260f2bf33f 100644 --- a/uk/documentation/ruby-from-other-languages/to-ruby-from-php/index.md +++ b/uk/documentation/ruby-from-other-languages/to-ruby-from-php/index.md @@ -35,7 +35,7 @@ PHP широко використовується для вебзастосун * Строга типізація. Вам потрібно викликати `to_s`, `to_i` тощо, щоб перетворювати рядки, числа і т. ін., замість того щоб покладатися на автоматичні перетворення мови. -* Рядки, числа, масиви, hash тощо — об’єкти. Замість abs(-1) — `-1.abs`. +* Рядки, числа, масиви, hash тощо — об’єкти. Замість `abs(-1)` — `-1.abs`. * Дужки у викликах методів необов’язкові, окрім випадків, коли потрібно уточнити, які параметри належать якому виклику. * Стандартна бібліотека та розширення організовані в модулях і класах. diff --git a/vi/documentation/ruby-from-other-languages/to-ruby-from-php/index.md b/vi/documentation/ruby-from-other-languages/to-ruby-from-php/index.md index 8c412aec3b..0eb5bee5c1 100644 --- a/vi/documentation/ruby-from-other-languages/to-ruby-from-php/index.md +++ b/vi/documentation/ruby-from-other-languages/to-ruby-from-php/index.md @@ -35,7 +35,7 @@ Không giống như PHP, trong Ruby… * Cách gõ ngắn gọn. Bạn có thể gọi `to_s`, `to_i` v.v. để chuyển đổi sang kiểu chuỗi, số vân vân, thay vì dựa vào ngôn ngữ. * Strings, numbers, arrays, hashes, v.v đều là các đối tượng. Thay vì - gọi abs(-1) chỉ cần gọi -1.abs. + gọi `abs(-1)` chỉ cần gọi `-1.abs`. * Các dấu ngoặc được tùy chọn khi gọi phương thức, ngoại trừ một số tham số cần được làm rõ khi gọi phương thức. * Thay cho các quy ước đặt tên, như gạch chân, các phần mở rộng của diff --git a/zh_tw/documentation/ruby-from-other-languages/to-ruby-from-php/index.md b/zh_tw/documentation/ruby-from-other-languages/to-ruby-from-php/index.md index 8331a74d71..fc5e141487 100644 --- a/zh_tw/documentation/ruby-from-other-languages/to-ruby-from-php/index.md +++ b/zh_tw/documentation/ruby-from-other-languages/to-ruby-from-php/index.md @@ -28,7 +28,7 @@ Ruby與PHP一樣的地方... Ruby與PHP不同的地方... * Ruby有強型別,你必須要使用 `to_s`, `to_i` 等方法來轉換型別。 -* 字串、數值、陣列、雜湊...等等。他們全都是物件。所以該用-1.abs而不是abs(-1)。 +* 字串、數值、陣列、雜湊...等等。他們全都是物件。所以該用`-1.abs`而不是`abs(-1)`。 * 呼叫方法時,可以省略括號。 * 標準函式庫和擴充套件都被包裝成模組和類別了。 * 反射(reflection)是 Ruby 物件與生俱來的能力,你不需要像在PHP 5中一樣使用 `Reflection` 類別。