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
1e14afa4
Unverified
Commit
1e14afa4
authored
Mar 25, 2019
by
Yukihiro "Matz" Matsumoto
Committed by
GitHub
Mar 25, 2019
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #4341 from shuujii/remove-implementation-of-Symbol-eqq
Remove implementation of `Symbol#===`
parents
33a9840e
b489ddcb
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 @
1e14afa4
...
...
@@ -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 @
1e14afa4
...
...
@@ -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