Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

Marshalling nested JS `Date` to rb `Time` not working

クローズ
#121 コメント 5 件 リアクション 1 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
38/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
停滞
技術スタック
javascript, ruby
領域
backend

調査の方向性

Start by reproducing the issue with the Ruby snippet in the report, which compares a top-level JavaScript Date with one nested in an object. Then trace how MiniRacer converts JavaScript values back to Ruby, using the nested Date case to locate the missing conversion. Done means the nested value is returned as a Ruby Time, as the top-level case already is.

索引モデルが issue の本文から書いたものです。

説明

bug

Related to #12

require 'bundler/inline'
gemfile do
  gem 'mini_racer', '= 0.2.4'
end

ctx = MiniRacer::Context.new
ctx.eval( <<~JSEVAL )
  var extractDate = (nestedObj) => nestedObj.abc[0].constructor.name;
JSEVAL

# PASS: returns "Date" (rb => js conversion happens even when `Time` is nested)
p ctx.call('extractDate', {abc: [Time.now]})

# PASS: returns `Time` (js => rb conversion happens when a `Date` isn't nested)
p ctx.eval(%q|new Date()|).class

# FAIL: returns `String` (js => rb conversion doesn't happen for nested `Date`s)
p ctx.eval(%q|( {abc: new Date()} )|)['abc'].class
主要言語
JavaScript
スター
628
フォーク
100
平均マージ
1日 20時間
マージ済み PR(30日)
2

環境構築

  • Dockerfile または Docker Compose ファイルあり
  • プルリクエストのテンプレートなし
  • コントリビューションガイドなし

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

rubyjs/mini_racer のほかの issue

rubyjs/mini_racer の issue をすべて見る

似ている issue

JavaScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。