File tree Expand file tree Collapse file tree 2 files changed +2
-14
lines changed Expand file tree Collapse file tree 2 files changed +2
-14
lines changed Original file line number Diff line number Diff line change @@ -2207,7 +2207,8 @@ def reopen(other, mode=undefined)
2207
2207
2208
2208
Truffle ::IOOperations . dup2_with_cloexec ( io . fileno , @descriptor )
2209
2209
2210
- Truffle ::Internal ::Unsafe . set_class self , io . class
2210
+ Truffle . invoke_primitive :vm_set_class , self , io . class
2211
+
2211
2212
if io . respond_to? ( :path )
2212
2213
@path = io . path
2213
2214
end
Original file line number Diff line number Diff line change 35
35
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
36
36
37
37
module Truffle ::Internal
38
-
39
- module Unsafe
40
- def self . set_class ( obj , cls )
41
- Truffle . primitive :vm_set_class
42
-
43
- if obj . kind_of? ImmediateValue
44
- raise TypeError , 'Can not change the class of an immediate'
45
- end
46
-
47
- raise ArgumentError , "Class #{ cls } is not compatible with #{ obj . inspect } "
48
- end
49
- end
50
-
51
38
def self . get_data ( path , offset )
52
39
file = File . open ( path )
53
40
file . seek ( offset )
You can’t perform that action at this time.
0 commit comments