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
b489ddcb
Commit
b489ddcb
authored
Mar 25, 2019
by
KOBAYASHI Shuji
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove implementation of `Symbol#===`
For reducing program size.
parent
33a9840e
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
23 deletions
+2
-23
src/symbol.c
src/symbol.c
+0
-21
test/t/symbol.rb
test/t/symbol.rb
+2
-2
No files found.
src/symbol.c
View file @
b489ddcb
...
...
@@ -306,26 +306,6 @@ mrb_init_symtbl(mrb_state *mrb)
*
*/
/* 15.2.11.3.1 */
/*
* call-seq:
* sym == obj -> true or false
*
* Equality---If <i>sym</i> and <i>obj</i> are exactly the same
* symbol, returns <code>true</code>.
*/
static
mrb_value
sym_equal
(
mrb_state
*
mrb
,
mrb_value
sym1
)
{
mrb_value
sym2
;
mrb_get_args
(
mrb
,
"o"
,
&
sym2
);
return
mrb_bool_value
(
mrb_obj_equal
(
mrb
,
sym1
,
sym2
));
}
/* 15.2.11.3.2 */
/* 15.2.11.3.3 */
/*
...
...
@@ -585,7 +565,6 @@ mrb_init_symbol(mrb_state *mrb)
MRB_SET_INSTANCE_TT
(
sym
,
MRB_TT_SYMBOL
);
mrb_undef_class_method
(
mrb
,
sym
,
"new"
);
mrb_define_method
(
mrb
,
sym
,
"==="
,
sym_equal
,
MRB_ARGS_REQ
(
1
));
/* 15.2.11.3.1 */
mrb_define_method
(
mrb
,
sym
,
"id2name"
,
mrb_sym_to_s
,
MRB_ARGS_NONE
());
/* 15.2.11.3.2 */
mrb_define_method
(
mrb
,
sym
,
"to_s"
,
mrb_sym_to_s
,
MRB_ARGS_NONE
());
/* 15.2.11.3.3 */
mrb_define_method
(
mrb
,
sym
,
"to_sym"
,
sym_to_sym
,
MRB_ARGS_NONE
());
/* 15.2.11.3.4 */
...
...
test/t/symbol.rb
View file @
b489ddcb
...
...
@@ -13,8 +13,8 @@ assert('Symbol', '15.2.11') do
end
assert
(
'Symbol#==='
,
'15.2.11.3.1'
)
do
assert_true
:abc
==
:abc
assert_false
:abc
==
:cba
assert_true
:abc
==
=
:abc
assert_false
:abc
==
=
:cba
end
assert
(
'Symbol#id2name'
,
'15.2.11.3.2'
)
do
...
...
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