Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
mruby
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Libraries
mruby
Commits
b74458a4
Commit
b74458a4
authored
Feb 10, 2014
by
Tomoyuki Sahara
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
remove _bless trick. closes #8.
parent
f10b73ef
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
0 additions
and
17 deletions
+0
-17
mrblib/file.rb
mrblib/file.rb
+0
-1
src/io.c
src/io.c
+0
-16
No files found.
mrblib/file.rb
View file @
b74458a4
...
...
@@ -9,7 +9,6 @@ class File < IO
attr_accessor
:path
def
initialize
(
fd_or_path
,
mode
=
"r"
,
perm
=
0666
)
self
.
_bless
if
fd_or_path
.
kind_of?
Fixnum
super
(
fd_or_path
,
mode
)
else
...
...
src/io.c
View file @
b74458a4
...
...
@@ -356,21 +356,6 @@ fptr_finalize(mrb_state *mrb, struct mrb_io *fptr, int noraise)
}
}
mrb_value
mrb_io_bless
(
mrb_state
*
mrb
,
mrb_value
io
)
{
if
(
mrb_type
(
io
)
!=
MRB_TT_DATA
)
{
mrb_raise
(
mrb
,
E_TYPE_ERROR
,
"expected IO object"
);
return
mrb_nil_value
();
}
DATA_TYPE
(
io
)
=
&
mrb_io_type
;
DATA_PTR
(
io
)
=
NULL
;
DATA_PTR
(
io
)
=
mrb_io_alloc
(
mrb
);
return
io
;
}
mrb_value
mrb_io_s_for_fd
(
mrb_state
*
mrb
,
mrb_value
klass
)
{
...
...
@@ -752,7 +737,6 @@ mrb_init_io(mrb_state *mrb)
mrb_define_class_method
(
mrb
,
io
,
"sysopen"
,
mrb_io_s_sysopen
,
MRB_ARGS_ANY
());
mrb_define_class_method
(
mrb
,
io
,
"select"
,
mrb_io_s_select
,
MRB_ARGS_ANY
());
mrb_define_method
(
mrb
,
io
,
"_bless"
,
mrb_io_bless
,
MRB_ARGS_NONE
());
mrb_define_method
(
mrb
,
io
,
"initialize"
,
mrb_io_initialize
,
MRB_ARGS_ANY
());
/* 15.2.20.5.21 (x)*/
mrb_define_method
(
mrb
,
io
,
"sysread"
,
mrb_io_sysread
,
MRB_ARGS_ANY
());
mrb_define_method
(
mrb
,
io
,
"sysseek"
,
mrb_io_sysseek
,
MRB_ARGS_REQ
(
1
));
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment