Project

General

Profile

Bug #9651

__dir__ returns nil in instance_eval/module_eval

Added by nagachika (Tomoyuki Chikanaga) over 3 years ago. Updated about 3 years ago.

Status:
Closed
Priority:
Normal
Target version:
ruby -v:
2.1.1
[ruby-dev:48056]

Description

instance_eval/module_eval 内の __dir__ が常に nil を返します。
evalr42103 で修正済みでしたが instance_eval/module_eval では nil のままだったようです。

trunk では r45360 および r45361 で修正済みです。
Backport 管理用に改めてチケット化しておきます。

Associated revisions

Revision 45927
Added by nagachika (Tomoyuki Chikanaga) about 3 years ago

merge revision(s) r45360,r45361: [Backport #9651]

* vm_eval.c (eval_string_with_cref): Use file path even if scope is
  given. Related to  [Bug #8662] and r42103.

* vm_eval.c (eval_string_with_cref): Unify to use NIL_P.

History

#1 [ruby-dev:48057] Updated by sorah (Sorah Fukumori) over 3 years ago

  • Description updated (diff)

#2 [ruby-dev:48081] Updated by nagachika (Tomoyuki Chikanaga) about 3 years ago

  • Backport changed from 2.0.0: REQUIRED, 2.1: REQUIRED to 2.0.0: DONE, 2.1: REQUIRED

r42230 and r42231 were backported to ruby_2_0_0 at r45473. These changesets were required for resolv conflict.
And r45360 and r45361 were backported to ruby_2_0_0 at r45474.

#3 [ruby-dev:48216] Updated by nagachika (Tomoyuki Chikanaga) about 3 years ago

  • Backport changed from 2.0.0: DONE, 2.1: REQUIRED to 2.0.0: DONE, 2.1: DONE

r45360 and r45361 were backported to ruby_2_1 branch at r45927.

Also available in: Atom PDF