Skip to content

Default to CRuby for https://try.ruby-lang.org/ #148

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 9 commits into from
Jul 28, 2023
15 changes: 13 additions & 2 deletions app/ruby_engine.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,16 @@ def run(source)
raise NotImplementedError
end

def exception_to_string(err)
# Beautify the backtrace a little bit
backtrace = err.backtrace
backtrace = backtrace.select { |i| i.include? '<anonymous>' }
backtrace = backtrace.map { |i| i.gsub(/.*(<anonymous>)/, '\1') }
backtrace = ["(file)"] if backtrace.empty?
err.set_backtrace(backtrace)
err.full_message
end

def run_with_writer(source, writer, &block)
@writer = writer
@dots = 0
Expand All @@ -29,8 +39,6 @@ def loading(part = nil)
# When you update the engines, ensure that they are tested correctly.
# Update the engine list also in spec/playground_spec.
ENGINES = [
# Opal.new,
OpalWebWorker.new("1.7.1"),
CRubyWASI.new(
"https://cdn.jsdelivr.net/npm/[email protected]/dist/ruby.wasm",
"3.2.0"
Expand All @@ -41,6 +49,9 @@ def loading(part = nil)
# "https://cdn.jsdelivr.net/npm/ruby-head-wasm-wasi@next/dist/ruby.wasm",
# "3.3.0dev"
# ),

# Opal.new,
OpalWebWorker.new("1.7.1"),
].each_with_object({}) do |engine, hash|
hash[engine.engine_id] = engine
end
Expand Down
11 changes: 9 additions & 2 deletions app/ruby_engine/cruby_wasi.rb
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,8 @@ def run(source)
textDecoder = `new TextDecoder("utf-8")`
%x{
wasmFs.fs.writeSync = (fd, buffer, offset, length, position) => {
const text = textDecoder.decode(buffer);
if (fd == 1 || fd == 2) {
const text = textDecoder.decode(buffer);
#{@writer.print_to_output(`text`, "")};
}
return originalWriteSync(fd, buffer, offset, length, position);
Expand All @@ -102,11 +102,18 @@ def run(source)
`vm.setInstance(wasmInstance)`.await
`wasi.setMemory(wasmInstance.exports.memory)`
`vm.initialize()`
set_external_encoding = "Encoding.default_external = Encoding::UTF_8"
`vm.eval(set_external_encoding)`
end

yield `vm.eval(source).toString()`
rescue JS::Error => err
@writer.log_error(err)
raise err
end

def exception_to_string(err)
# "...: undefined method `reverse' for 40:Integer (NoMethodError)\n (Exception)\n"
super(err).sub(/\s+\(Exception\)\s*\z/, '')
end
end
end
14 changes: 4 additions & 10 deletions app/try_ruby.rb
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ class TryRuby
RUBY
INITIAL_TRY_RESULT = 'Welcome ' * 3

DEFAULT_RUBY_ENGINE = "opal-ww-1.7.1"
DEFAULT_RUBY_ENGINE = "cruby-3.2.0"

def self.start
instance
Expand Down Expand Up @@ -397,14 +397,14 @@ def show_result(retval)
# Do not check the answer if there is no regexp matcher
if @current_item && @current_item.answer
# Get last line of output
value_to_check = @output_buffer.length > 0 && !@output_buffer.last.empty? ? @output_buffer.last.chomp : ''
value_to_check = @output_buffer.join.rstrip.lines.last

# Check if output matches the defined answer regexp
# and print status message
print_to_output("\n")
from = count_lines

if !value_to_check.empty? && value_to_check.chomp.match(@current_item.answer)
if value_to_check && !value_to_check.empty? && value_to_check.match(@current_item.answer)
@current_item.ok.each do |line|
print_to_output(line)
end
Expand All @@ -431,13 +431,7 @@ def count_lines

def log_error(err)
unless err.is_a? String
# Beautify the backtrace a little bit
backtrace = err.backtrace
backtrace = backtrace.select { |i| i.include? '<anonymous>' }
backtrace = backtrace.map { |i| i.gsub(/.*(<anonymous>)/, '\1') }
backtrace = ["(file)"] if backtrace.empty?
err.set_backtrace(backtrace)
err = err.full_message
err = @engine.exception_to_string(err)
end

from = count_lines
Expand Down
10 changes: 5 additions & 5 deletions source/try_ruby_en.json

Large diffs are not rendered by default.

10 changes: 5 additions & 5 deletions source/try_ruby_es.json

Large diffs are not rendered by default.

18 changes: 9 additions & 9 deletions source/try_ruby_ja.json

Large diffs are not rendered by default.

10 changes: 5 additions & 5 deletions source/try_ruby_mk.json

Large diffs are not rendered by default.

10 changes: 5 additions & 5 deletions source/try_ruby_nl.json

Large diffs are not rendered by default.

10 changes: 5 additions & 5 deletions source/try_ruby_pt-br.json

Large diffs are not rendered by default.

10 changes: 5 additions & 5 deletions source/try_ruby_ru.json

Large diffs are not rendered by default.

10 changes: 5 additions & 5 deletions source/try_ruby_ua.json

Large diffs are not rendered by default.

10 changes: 5 additions & 5 deletions source/try_ruby_zh.json

Large diffs are not rendered by default.

10 changes: 5 additions & 5 deletions spec/tutorial_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,6 @@

dataset = language_dataset(language)

it "displays a correct title on the first page of the tutorial" do
page.should have_content(dataset["1"]["title"])
the_cookie_of_step.should be == 1
end

steps = {
1 => {pass: true},
12 => {code: "[12, 47, 35, 1]"},
Expand Down Expand Up @@ -80,6 +75,11 @@
end
end
end

it "displays a correct title on the first page of the tutorial" do
page.should have_content(dataset["1"]["title"])
the_cookie_of_step.should be == 1
end
end
end
end
2 changes: 1 addition & 1 deletion translations/en/try_ruby_200.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
lang: EN
title: Ready, Aim
answer: ^\n.ti tae ot (.+)
answer: dnah ym morf nwolf sah tsaot yM
load: prev
ok: Okay, sure. So the whole poem has been turned backwards.
error:
Expand Down
2 changes: 1 addition & 1 deletion translations/en/try_ruby_220.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
lang: EN
title: Ringlets of Chained Methods
answer: ^More still did (.+)
answer: My toast has flown from my hand
load: prev
ok: Good show, my friend!<br/>The join method took that array of lines and put them together into a string.
error:
Expand Down
2 changes: 1 addition & 1 deletion translations/en/try_ruby_280.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
lang: EN
title: Are You Harsh?
answer: "mediocre"
answer: :mediocre
load: books = {"Gravitys Rainbow" => :splendid, "The deep end" => :abysmal, "Living colors" => :mediocre, "Bumblebees" => :mediocre}
ok: Great, wow! You've made a scorecard of your ratings
error:
Expand Down
2 changes: 1 addition & 1 deletion translations/en/try_ruby_380.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ title: The world is our oyster
answer: ^\{\"William
ok: Good. Bit difficult to read.
error:
load: def get_shakey;JSON.parse("{\"William Shakespeare\": {\"1\": {\"title\": \"The Two Gentlemen of Verona\", \"finished\": 1591},\"2\": {\"title\": \"The Taming of the Shrew\", \"finished\": 1591},\"3\": {\"title\": \"Henry VI, Part 2\", \"finished\": 1591},\"4\": {\"title\": \"Henry VI, Part 3\", \"finished\": 1591},\"5\": {\"title\": \"Henry VI, Part 1\", \"finished\": 1592},\"6\": {\"title\": \"Titus Andronicus\", \"finished\": 1592},\"7\": {\"title\": \"Richard III\", \"finished\": 1593},\"8\": {\"title\": \"Edward III\", \"finished\": 1593},\"9\": {\"title\": \"The Comedy of Errors\", \"finished\": 1594},\"10\": {\"title\": \"Love's Labour's Lost\", \"finished\": 1595},\"11\": {\"title\": \"Love's Labour's Won\", \"finished\": 1596},\"12\": {\"title\": \"Richard II\", \"finished\": 1595},\"13\": {\"title\": \"Romeo and Juliet\", \"finished\": 1595},\"14\": {\"title\": \"A Midsummer Night's Dream\", \"finished\": 1595},\"15\": {\"title\": \"King John\", \"finished\": 1596},\"16\": {\"title\": \"The Merchant of Venice\", \"finished\": 1597},\"17\": {\"title\": \"Henry IV, Part 1\", \"finished\": 1597},\"18\": {\"title\": \"The Merry Wives of Windsor\", \"finished\": 1597},\"19\": {\"title\": \"Henry IV, Part 2\", \"finished\": 1598},\"20\": {\"title\": \"Much Ado About Nothing\", \"finished\": 1599},\"21\": {\"title\": \"Henry V\", \"finished\": 1599},\"22\": {\"title\": \"Julius Caesar\", \"finished\": 1599},\"23\": {\"title\": \"As You Like It\", \"finished\": 1600},\"24\": {\"title\": \"Hamlet\", \"finished\": 1601},\"25\": {\"title\": \"Twelfth Night\", \"finished\": 1601},\"26\": {\"title\": \"Troilus and Cressida\", \"finished\": 1602},\"27\": {\"title\": \"Sir Thomas More\", \"finished\": 1604},\"28\": {\"title\": \"Measure for Measure\", \"finished\": 1604},\"29\": {\"title\": \"Othello\", \"finished\": 1604},\"30\": {\"title\": \"All's Well That Ends Well\", \"finished\": 1605},\"31\": {\"title\": \"King Lear\", \"finished\": 1606},\"32\": {\"title\": \"Timon of Athens\", \"finished\": 1606},\"33\": {\"title\": \"Macbeth\", \"finished\": 1606},\"34\": {\"title\": \"Antony and Cleopatra\", \"finished\": 1606},\"35\": {\"title\": \"Pericles, Prince of Tyre\", \"finished\": 1608},\"36\": {\"title\": \"Coriolanus\", \"finished\": 1608},\"37\": {\"title\": \"The Winter's Tale\", \"finished\": 1611},\"38\": {\"title\": \"Cymbeline\", \"finished\": 1610},\"39\": {\"title\": \"The Tempest\", \"finished\": 1611},\"40\": {\"title\": \"Cardenio\", \"finished\": 1613},\"41\": {\"title\": \"Henry VIII\", \"finished\": 1613},\"42\": {\"title\": \"The Two Noble Kinsmen\", \"finished\": 1614}}}");end;
load: def get_shakey; {"William Shakespeare"=>{"1"=>{"title"=>"The Two Gentlemen of Verona", "finished"=>1591},"2"=>{"title"=>"The Taming of the Shrew", "finished"=>1591},"3"=>{"title"=>"Henry VI, Part 2", "finished"=>1591},"4"=>{"title"=>"Henry VI, Part 3", "finished"=>1591},"5"=>{"title"=>"Henry VI, Part 1", "finished"=>1592},"6"=>{"title"=>"Titus Andronicus", "finished"=>1592},"7"=>{"title"=>"Richard III", "finished"=>1593},"8"=>{"title"=>"Edward III", "finished"=>1593},"9"=>{"title"=>"The Comedy of Errors", "finished"=>1594},"10"=>{"title"=>"Love's Labour's Lost", "finished"=>1595},"11"=>{"title"=>"Love's Labour's Won", "finished"=>1596},"12"=>{"title"=>"Richard II", "finished"=>1595},"13"=>{"title"=>"Romeo and Juliet", "finished"=>1595},"14"=>{"title"=>"A Midsummer Night's Dream", "finished"=>1595},"15"=>{"title"=>"King John", "finished"=>1596},"16"=>{"title"=>"The Merchant of Venice", "finished"=>1597},"17"=>{"title"=>"Henry IV, Part 1", "finished"=>1597},"18"=>{"title"=>"The Merry Wives of Windsor", "finished"=>1597},"19"=>{"title"=>"Henry IV, Part 2", "finished"=>1598},"20"=>{"title"=>"Much Ado About Nothing", "finished"=>1599},"21"=>{"title"=>"Henry V", "finished"=>1599},"22"=>{"title"=>"Julius Caesar", "finished"=>1599},"23"=>{"title"=>"As You Like It", "finished"=>1600},"24"=>{"title"=>"Hamlet", "finished"=>1601},"25"=>{"title"=>"Twelfth Night", "finished"=>1601},"26"=>{"title"=>"Troilus and Cressida", "finished"=>1602},"27"=>{"title"=>"Sir Thomas More", "finished"=>1604},"28"=>{"title"=>"Measure for Measure", "finished"=>1604},"29"=>{"title"=>"Othello", "finished"=>1604},"30"=>{"title"=>"All's Well That Ends Well", "finished"=>1605},"31"=>{"title"=>"King Lear", "finished"=>1606},"32"=>{"title"=>"Timon of Athens", "finished"=>1606},"33"=>{"title"=>"Macbeth", "finished"=>1606},"34"=>{"title"=>"Antony and Cleopatra", "finished"=>1606},"35"=>{"title"=>"Pericles, Prince of Tyre", "finished"=>1608},"36"=>{"title"=>"Coriolanus", "finished"=>1608},"37"=>{"title"=>"The Winter's Tale", "finished"=>1611},"38"=>{"title"=>"Cymbeline", "finished"=>1610},"39"=>{"title"=>"The Tempest", "finished"=>1611},"40"=>{"title"=>"Cardenio", "finished"=>1613},"41"=>{"title"=>"Henry VIII", "finished"=>1613},"42"=>{"title"=>"The Two Noble Kinsmen", "finished"=>1614}}}; end;
---

So far we have been running programs that only use things that we have typed ourselves.
Expand Down
2 changes: 1 addition & 1 deletion translations/en/try_ruby_500.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ At the same time we can limit the length of the Blurb<sup>TM</sup> content to 40
end
end

Blurb.new.time
Blurb.new(:sick).time

(That parameter __content=""__ is there to make sure that we know content is a string,
even if no content parameter is passed to the initialize method.)
2 changes: 1 addition & 1 deletion translations/es/try_ruby_200.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
lang: ES
title: Apunten. Fuego
answer: ^\n.ti tae ot (.+)
answer: dnah ym morf nwolf sah tsaot yM
load: prev
ok: De acuerdo, sí. Se ha dado la vuelta el poema entero.
error:
Expand Down
2 changes: 1 addition & 1 deletion translations/es/try_ruby_220.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
lang: ES
title: Tirabuzón de Métodos en Cadena
answer: ^More still did (.+)
answer: My toast has flown from my hand
load: prev
ok: Bien hecho, amigo mío.<br/>El método join cogió el array de líneas y las puso juntas en un string.
error:
Expand Down
2 changes: 1 addition & 1 deletion translations/es/try_ruby_280.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
lang: ES
title: ¿Eres severo?
answer: "mediocre"
answer: :mediocre
load: libros = {"El Arco Iris de Gravedad" => :esplendido, "El fin profundo" => :abismal, "Colores vivientes" => :mediocre, "Abejorros" => :mediocre}
ok: ¡Genial! Has hecho un marcador de puntuaciones.
error:
Expand Down
2 changes: 1 addition & 1 deletion translations/es/try_ruby_380.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ title: El mundo es nuestro
answer: ^\{\"William
ok: Bien. Un poco difícil de leer
error:
load: def get_shakey;JSON.parse("{\"William Shakespeare\": {\"1\": {\"titulo\": \"Los dos hidalgos de Verona\", \"terminado\": 1591},\"2\": {\"titulo\": \"La fierecilla domada\", \"terminado\": 1591},\"3\": {\"titulo\": \"Enrique VI, Parte 2\", \"terminado\": 1591},\"4\": {\"titulo\": \"Enrique VI, Parte 3\", \"terminado\": 1591},\"5\": {\"titulo\": \"Enrique VI, Parte 1\", \"terminado\": 1592},\"6\": {\"titulo\": \"Tito Andrónico\", \"terminado\": 1592},\"7\": {\"titulo\": \"Ricardo III\", \"terminado\": 1593},\"8\": {\"titulo\": \"Eduardo III\", \"terminado\": 1593},\"9\": {\"titulo\": \"La comedia de las equivocaciones\", \"terminado\": 1594},\"10\": {\"titulo\": \"Trabajos de amor perdidos\", \"terminado\": 1595},\"11\": {\"titulo\": \"Trabajos de amor ganados\", \"terminado\": 1596},\"12\": {\"titulo\": \"Ricardo II\", \"terminado\": 1595},\"13\": {\"titulo\": \"Romeo y Julieta\", \"terminado\": 1595},\"14\": {\"titulo\": \"El sueño de una noche de verano\", \"terminado\": 1595},\"15\": {\"titulo\": \"El rey Juan\", \"terminado\": 1596},\"16\": {\"titulo\": \"El mercader de Venecia\", \"terminado\": 1597},\"17\": {\"titulo\": \"Enrique IV, Parte 1\", \"terminado\": 1597},\"18\": {\"titulo\": \"Las alegres comadres de Windsor\", \"terminado\": 1597},\"19\": {\"titulo\": \"Enrique IV, Parte 2\", \"terminado\": 1598},\"20\": {\"titulo\": \"Mucho ruido y pocas nueces\", \"terminado\": 1599},\"21\": {\"titulo\": \"Enrique V\", \"terminado\": 1599},\"22\": {\"titulo\": \"Julio Cesar\", \"terminado\": 1599},\"23\": {\"titulo\": \"Como gustéis\", \"terminado\": 1600},\"24\": {\"titulo\": \"Hamlet\", \"terminado\": 1601},\"25\": {\"titulo\": \"La decimosegunda noche\", \"terminado\": 1601},\"26\": {\"titulo\": \"Troilo y Crésida\", \"terminado\": 1602},\"27\": {\"titulo\": \"Tomás Moro\", \"terminado\": 1604},\"28\": {\"titulo\": \"Medida por medida\", \"terminado\": 1604},\"29\": {\"titulo\": \"Otelo\", \"terminado\": 1604},\"30\": {\"titulo\": \"A buen fin no hay mal tiempo\", \"terminado\": 1605},\"31\": {\"titulo\": \"El rey Lear\", \"terminado\": 1606},\"32\": {\"titulo\": \"Timón de Atenas\", \"terminado\": 1606},\"33\": {\"titulo\": \"Macbeth\", \"terminado\": 1606},\"34\": {\"titulo\": \"Antonio y Cleopatra\", \"terminado\": 1606},\"35\": {\"titulo\": \"Pericles\", \"terminado\": 1608},\"36\": {\"titulo\": \"Coriolano\", \"terminado\": 1608},\"37\": {\"titulo\": \"Cuento de invierno\", \"terminado\": 1611},\"38\": {\"titulo\": \"Cimbelino\", \"terminado\": 1610},\"39\": {\"titulo\": \"La tempestad\", \"terminado\": 1611},\"40\": {\"titulo\": \"Cardenio\", \"terminado\": 1613},\"41\": {\"titulo\": \"Enrique VIII\", \"terminado\": 1613},\"42\": {\"titulo\": \"Los dos nobles caballeros\", \"terminado\": 1614}}}");end;
load: def get_shakey; {"William Shakespeare"=>{"1"=>{"titulo"=>"Los dos hidalgos de Verona", "terminado"=>1591},"2"=>{"titulo"=>"La fierecilla domada", "terminado"=>1591},"3"=>{"titulo"=>"Enrique VI, Parte 2", "terminado"=>1591},"4"=>{"titulo"=>"Enrique VI, Parte 3", "terminado"=>1591},"5"=>{"titulo"=>"Enrique VI, Parte 1", "terminado"=>1592},"6"=>{"titulo"=>"Tito Andrónico", "terminado"=>1592},"7"=>{"titulo"=>"Ricardo III", "terminado"=>1593},"8"=>{"titulo"=>"Eduardo III", "terminado"=>1593},"9"=>{"titulo"=>"La comedia de las equivocaciones", "terminado"=>1594},"10"=>{"titulo"=>"Trabajos de amor perdidos", "terminado"=>1595},"11"=>{"titulo"=>"Trabajos de amor ganados", "terminado"=>1596},"12"=>{"titulo"=>"Ricardo II", "terminado"=>1595},"13"=>{"titulo"=>"Romeo y Julieta", "terminado"=>1595},"14"=>{"titulo"=>"El sueño de una noche de verano", "terminado"=>1595},"15"=>{"titulo"=>"El rey Juan", "terminado"=>1596},"16"=>{"titulo"=>"El mercader de Venecia", "terminado"=>1597},"17"=>{"titulo"=>"Enrique IV, Parte 1", "terminado"=>1597},"18"=>{"titulo"=>"Las alegres comadres de Windsor", "terminado"=>1597},"19"=>{"titulo"=>"Enrique IV, Parte 2", "terminado"=>1598},"20"=>{"titulo"=>"Mucho ruido y pocas nueces", "terminado"=>1599},"21"=>{"titulo"=>"Enrique V", "terminado"=>1599},"22"=>{"titulo"=>"Julio Cesar", "terminado"=>1599},"23"=>{"titulo"=>"Como gustéis", "terminado"=>1600},"24"=>{"titulo"=>"Hamlet", "terminado"=>1601},"25"=>{"titulo"=>"La decimosegunda noche", "terminado"=>1601},"26"=>{"titulo"=>"Troilo y Crésida", "terminado"=>1602},"27"=>{"titulo"=>"Tomás Moro", "terminado"=>1604},"28"=>{"titulo"=>"Medida por medida", "terminado"=>1604},"29"=>{"titulo"=>"Otelo", "terminado"=>1604},"30"=>{"titulo"=>"A buen fin no hay mal tiempo", "terminado"=>1605},"31"=>{"titulo"=>"El rey Lear", "terminado"=>1606},"32"=>{"titulo"=>"Timón de Atenas", "terminado"=>1606},"33"=>{"titulo"=>"Macbeth", "terminado"=>1606},"34"=>{"titulo"=>"Antonio y Cleopatra", "terminado"=>1606},"35"=>{"titulo"=>"Pericles", "terminado"=>1608},"36"=>{"titulo"=>"Coriolano", "terminado"=>1608},"37"=>{"titulo"=>"Cuento de invierno", "terminado"=>1611},"38"=>{"titulo"=>"Cimbelino", "terminado"=>1610},"39"=>{"titulo"=>"La tempestad", "terminado"=>1611},"40"=>{"titulo"=>"Cardenio", "terminado"=>1613},"41"=>{"titulo"=>"Enrique VIII", "terminado"=>1613},"42"=>{"titulo"=>"Los dos nobles caballeros", "terminado"=>1614}}}; end;
---

Hasta ahora hemos ejecutado programas que usan solamente cosas que hemos tecleado nosotros mismos.
Expand Down
2 changes: 1 addition & 1 deletion translations/es/try_ruby_500.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,6 @@ A la misma vez podemos limitar la longitud del contenido del Blurb<sup>TM</sup>
end
end

Blurb.new.tiempo
Blurb.new(:sick).tiempo

(Ese parámetro __contenido=""__ está ahí para asegurarnos de que tenemos un string como contenido, aunque no le pasemos nada al método initialize).
2 changes: 1 addition & 1 deletion translations/ja/try_ruby_200.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
lang: JA
title: 構えて、狙って
answer: ^\n.ti tae ot (.+)
answer: dnah ym morf nwolf sah tsaot yM
load: prev
ok: オーケー。詩全体が逆順に変わりました。
error:
Expand Down
2 changes: 1 addition & 1 deletion translations/ja/try_ruby_220.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
lang: JA
title: メソッドをつなげる
answer: ^More still did (.+)
answer: My toast has flown from my hand
load: prev
ok: いい感じですね!joinメソッドは、配列の各要素をつなげて、一つの文字列にしました。
error:
Expand Down
2 changes: 1 addition & 1 deletion translations/ja/try_ruby_280.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
lang: JA
title: 辛辣な書評をつけてしまった?
answer: "mediocre"
answer: :mediocre
load: books = {"Gravitys Rainbow" => :splendid, "The deep end" => :abysmal, "Living colors" => :mediocre, "Bumblebees" => :mediocre}
ok: やった!すごいです。評価のスコアカードを作成しました
error:
Expand Down
Loading