diff options
author | Aaron Patterson <tenderlove@ruby-lang.org> | 2022-11-16 16:31:14 -0800 |
---|---|---|
committer | Takashi Kokubun <takashikkbn@gmail.com> | 2022-12-02 12:53:51 -0800 |
commit | 744b0527eacb6f1d76c225c720c1a3ed23185ad4 (patch) | |
tree | e9212794b4dc6371b8ef5db17eb2745de823e697 /yjit/src/cruby.rs | |
parent | 7b5ee9a8a60bb4d8cdc68aab9795109e766dbc96 (diff) | |
download | ruby-744b0527eacb6f1d76c225c720c1a3ed23185ad4.tar.gz |
bail on compilation if the comptime receiver is frozen
Diffstat (limited to 'yjit/src/cruby.rs')
-rw-r--r-- | yjit/src/cruby.rs | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/yjit/src/cruby.rs b/yjit/src/cruby.rs index c2f5790620..b6228fe64b 100644 --- a/yjit/src/cruby.rs +++ b/yjit/src/cruby.rs @@ -394,6 +394,10 @@ impl VALUE { unsafe { CLASS_OF(self) } } + pub fn is_frozen(self) -> bool { + unsafe { rb_obj_frozen_p(self) != VALUE(0) } + } + pub fn shape_id_of(self) -> u32 { unsafe { rb_shape_get_shape_id(self) } } |