Project

General

Profile

Actions

Bug #12930

closed

instance_eval, instance_exec raises TypeError on a frozen String

Added by matsuda (Akira Matsuda) over 7 years ago. Updated about 7 years ago.

Status:
Closed
Target version:
-
ruby -v:
ruby 2.4.0dev (2016-11-13 trunk 56767) [x86_64-darwin15]
[ruby-core:78110]

Description

% ruby -ve 'p "".freeze.instance_eval "size"'
ruby 2.4.0dev (2016-11-13 trunk 56767) [x86_64-darwin15]
-e:1:in `instance_eval': can't define singleton (TypeError)

since 56747


Related issues 1 (0 open1 closed)

Related to Ruby master - Bug #12923: Accessing singleton_class of fstring cause assertion failureClosedmatz (Yukihiro Matsumoto)Actions
Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0