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
db7e02cd
Commit
db7e02cd
authored
Jun 25, 2015
by
Yukihiro "Matz" Matsumoto
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #2858 from franckverrot/remove-unnecessary-backticks
Remove unnecessary backticks
parents
5161909c
25885072
Changes
12
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
67 additions
and
67 deletions
+67
-67
include/mruby/compile.h
include/mruby/compile.h
+2
-2
include/mruby/opcode.h
include/mruby/opcode.h
+1
-1
mrbgems/mruby-compiler/core/parse.y
mrbgems/mruby-compiler/core/parse.y
+7
-7
mrbgems/mruby-hash-ext/mrblib/hash.rb
mrbgems/mruby-hash-ext/mrblib/hash.rb
+1
-1
mrbgems/mruby-sprintf/src/sprintf.c
mrbgems/mruby-sprintf/src/sprintf.c
+40
-40
mrbgems/mruby-struct/src/struct.c
mrbgems/mruby-struct/src/struct.c
+4
-4
mrblib/array.rb
mrblib/array.rb
+1
-1
src/class.c
src/class.c
+4
-4
src/numeric.c
src/numeric.c
+2
-2
src/object.c
src/object.c
+1
-1
src/string.c
src/string.c
+3
-3
src/variable.c
src/variable.c
+1
-1
No files found.
include/mruby/compile.h
View file @
db7e02cd
...
...
@@ -55,8 +55,8 @@ enum mrb_lex_state_enum {
EXPR_CMDARG
,
/* newline significant, +/- is an operator. */
EXPR_MID
,
/* newline significant, +/- is an operator. */
EXPR_FNAME
,
/* ignore newline, no reserved words. */
EXPR_DOT
,
/* right after
`.' or `
::', no reserved words. */
EXPR_CLASS
,
/* immediate after
`
class', no here document. */
EXPR_DOT
,
/* right after
'.' or '
::', no reserved words. */
EXPR_CLASS
,
/* immediate after
'
class', no here document. */
EXPR_VALUE
,
/* alike EXPR_BEG but label is disallowed. */
EXPR_MAX_STATE
};
...
...
include/mruby/opcode.h
View file @
db7e02cd
...
...
@@ -8,7 +8,7 @@
#define MRUBY_OPCODE_H
#define MAXARG_Bx (0xffff)
#define MAXARG_sBx (MAXARG_Bx>>1)
/*
`
sBx' is signed */
#define MAXARG_sBx (MAXARG_Bx>>1)
/*
'
sBx' is signed */
/* instructions: packed 32 bit */
/* ------------------------------- */
...
...
mrbgems/mruby-compiler/core/parse.y
View file @
db7e02cd
...
...
@@ -4204,7 +4204,7 @@ parser_yylex(parser_state *p)
}
pushback(p, c);
if (IS_SPCARG(c)) {
yywarning(p, "
`
*' interpreted as argument prefix");
yywarning(p, "
'
*' interpreted as argument prefix");
c = tSTAR;
}
else if (IS_BEG()) {
...
...
@@ -4455,7 +4455,7 @@ parser_yylex(parser_state *p)
}
pushback(p, c);
if (IS_SPCARG(c)) {
yywarning(p, "
`
&' interpreted as argument prefix");
yywarning(p, "
'
&' interpreted as argument prefix");
c = tAMPER;
}
else if (IS_BEG()) {
...
...
@@ -4761,7 +4761,7 @@ parser_yylex(parser_state *p)
nondigit = c;
break;
case '_': /*
`
_' in number just ignored */
case '_': /*
'
_' in number just ignored */
if (nondigit) goto decode_num;
nondigit = c;
break;
...
...
@@ -4776,7 +4776,7 @@ parser_yylex(parser_state *p)
pushback(p, c);
if (nondigit) {
trailing_uc:
yyerror_i(p, "trailing
`
%c' in number", nondigit);
yyerror_i(p, "trailing
'
%c' in number", nondigit);
}
tokfix(p);
if (is_float) {
...
...
@@ -5157,10 +5157,10 @@ parser_yylex(parser_state *p)
}
else if (isdigit(c)) {
if (p->bidx == 1) {
yyerror_i(p, "
`
@%c' is not allowed as an instance variable name", c);
yyerror_i(p, "
'
@%c' is not allowed as an instance variable name", c);
}
else {
yyerror_i(p, "
`
@@%c' is not allowed as a class variable name", c);
yyerror_i(p, "
'
@@%c' is not allowed as a class variable name", c);
}
return 0;
}
...
...
@@ -5176,7 +5176,7 @@ parser_yylex(parser_state *p)
default:
if (!identchar(c)) {
yyerror_i(p, "Invalid char
`
\\x%02X' in expression", c);
yyerror_i(p, "Invalid char
'
\\x%02X' in expression", c);
goto retry;
}
...
...
mrbgems/mruby-hash-ext/mrblib/hash.rb
View file @
db7e02cd
...
...
@@ -119,7 +119,7 @@ class Hash
#
# <em>produces:</em>
#
# prog.rb:2:in
`
fetch': key not found (KeyError)
# prog.rb:2:in
'
fetch': key not found (KeyError)
# from prog.rb:2
#
...
...
mrbgems/mruby-sprintf/src/sprintf.c
View file @
db7e02cd
This diff is collapsed.
Click to expand it.
mrbgems/mruby-struct/src/struct.c
View file @
db7e02cd
...
...
@@ -114,7 +114,7 @@ mrb_struct_getmember(mrb_state *mrb, mrb_value obj, mrb_sym id)
return
ptr
[
i
];
}
}
mrb_raisef
(
mrb
,
E_INDEX_ERROR
,
"
`
%S' is not a struct member"
,
mrb_sym2str
(
mrb
,
id
));
mrb_raisef
(
mrb
,
E_INDEX_ERROR
,
"
'
%S' is not a struct member"
,
mrb_sym2str
(
mrb
,
id
));
return
mrb_nil_value
();
/* not reached */
}
...
...
@@ -193,7 +193,7 @@ mrb_struct_set(mrb_state *mrb, mrb_value obj, mrb_value val)
return
ptr
[
i
]
=
val
;
}
}
mrb_raisef
(
mrb
,
E_INDEX_ERROR
,
"
`
%S' is not a struct member"
,
mrb_sym2str
(
mrb
,
mid
));
mrb_raisef
(
mrb
,
E_INDEX_ERROR
,
"
'
%S' is not a struct member"
,
mrb_sym2str
(
mrb
,
mid
));
return
mrb_nil_value
();
/* not reached */
}
...
...
@@ -749,8 +749,8 @@ mrb_struct_values_at(mrb_state *mrb, mrb_value self)
* The <code>Struct</code> class is a generator of specific classes,
* each one of which is defined to hold a set of variables and their
* accessors. In these examples, we'll call the generated class
*
``<i>Customer</i>Class,''
and we'll show an example instance of that
* class as
``<i>Customer</i>Inst.''
*
"<i>Customer</i>Class,"
and we'll show an example instance of that
* class as
"<i>Customer</i>Inst."
*
* In the descriptions that follow, the parameter <i>symbol</i> refers
* to a symbol, which is either a quoted string or a
...
...
mrblib/array.rb
View file @
db7e02cd
...
...
@@ -146,7 +146,7 @@ class Array
# equal, then that inequality is the return value. If all the
# values found are equal, then the return is based on a
# comparison of the array lengths. Thus, two arrays are
#
``equal''
according to <code>Array#<=></code> if and only if they have
#
"equal"
according to <code>Array#<=></code> if and only if they have
# the same length and the value of each element is equal to the
# value of the corresponding element in the other array.
#
...
...
src/class.c
View file @
db7e02cd
...
...
@@ -212,7 +212,7 @@ MRB_API struct RClass*
mrb_define_class_id
(
mrb_state
*
mrb
,
mrb_sym
name
,
struct
RClass
*
super
)
{
if
(
!
super
)
{
mrb_warn
(
mrb
,
"no super class for
`
%S', Object assumed"
,
mrb_sym2str
(
mrb
,
name
));
mrb_warn
(
mrb
,
"no super class for
'
%S', Object assumed"
,
mrb_sym2str
(
mrb
,
name
));
}
return
define_class
(
mrb
,
name
,
super
,
mrb
->
object_class
);
}
...
...
@@ -311,7 +311,7 @@ mrb_define_class_under(mrb_state *mrb, struct RClass *outer, const char *name, s
#if 0
if (!super) {
mrb_warn(mrb, "no super class for
`
%S::%S', Object assumed",
mrb_warn(mrb, "no super class for
'
%S::%S', Object assumed",
mrb_obj_value(outer), mrb_sym2str(mrb, id));
}
#endif
...
...
@@ -1658,7 +1658,7 @@ check_cv_name_str(mrb_state *mrb, mrb_value str)
mrb_int
len
=
RSTRING_LEN
(
str
);
if
(
len
<
3
||
!
(
s
[
0
]
==
'@'
&&
s
[
1
]
==
'@'
))
{
mrb_name_error
(
mrb
,
mrb_intern_str
(
mrb
,
str
),
"
`
%S' is not allowed as a class variable name"
,
str
);
mrb_name_error
(
mrb
,
mrb_intern_str
(
mrb
,
str
),
"
'
%S' is not allowed as a class variable name"
,
str
);
}
}
...
...
@@ -1846,7 +1846,7 @@ remove_method(mrb_state *mrb, mrb_value mod, mrb_sym mid)
}
}
mrb_name_error
(
mrb
,
mid
,
"method
`
%S' not defined in %S"
,
mrb_name_error
(
mrb
,
mid
,
"method
'
%S' not defined in %S"
,
mrb_sym2str
(
mrb
,
mid
),
mod
);
}
...
...
src/numeric.c
View file @
db7e02cd
...
...
@@ -110,8 +110,8 @@ num_div(mrb_state *mrb, mrb_value x)
*
* Returns a string containing a representation of self. As well as a
* fixed or exponential form of the number, the call may return
*
``<code>NaN</code>'', ``<code>Infinity</code>''
, and
*
``<code>-Infinity</code>''
.
*
"<code>NaN</code>", "<code>Infinity</code>"
, and
*
"<code>-Infinity</code>"
.
*/
static
mrb_value
...
...
src/object.c
View file @
db7e02cd
...
...
@@ -428,7 +428,7 @@ mrb_check_type(mrb_state *mrb, mrb_value x, enum mrb_vtype t)
* Returns a string representing <i>obj</i>. The default
* <code>to_s</code> prints the object's class and an encoding of the
* object id. As a special case, the top-level object that is the
* initial execution context of Ruby programs returns
``main.''
* initial execution context of Ruby programs returns
"main."
*/
MRB_API
mrb_value
...
...
src/string.c
View file @
db7e02cd
...
...
@@ -1100,7 +1100,7 @@ mrb_str_downcase_bang(mrb_state *mrb, mrb_value str)
*
* Returns a copy of <i>str</i> with all uppercase letters replaced with their
* lowercase counterparts. The operation is locale insensitive---only
* characters
``A'' to ``Z'
' are affected.
* characters
'A' to 'Z
' are affected.
*
* "hEllO".downcase #=> "hello"
*/
...
...
@@ -1703,7 +1703,7 @@ mrb_str_rindex_m(mrb_state *mrb, mrb_value str)
*
* If <i>pattern</i> is omitted, the value of <code>$;</code> is used. If
* <code>$;</code> is <code>nil</code> (which is the default), <i>str</i> is
* split on whitespace as if
`
' were specified.
* split on whitespace as if
'
' were specified.
*
* If the <i>limit</i> parameter is omitted, trailing null fields are
* suppressed. If <i>limit</i> is a positive number, at most that number of
...
...
@@ -2211,7 +2211,7 @@ mrb_str_upcase_bang(mrb_state *mrb, mrb_value str)
*
* Returns a copy of <i>str</i> with all lowercase letters replaced with their
* uppercase counterparts. The operation is locale insensitive---only
* characters
``a'' to ``z'
' are affected.
* characters
'a' to 'z
' are affected.
*
* "hEllO".upcase #=> "HELLO"
*/
...
...
src/variable.c
View file @
db7e02cd
...
...
@@ -563,7 +563,7 @@ MRB_API void
mrb_iv_check
(
mrb_state
*
mrb
,
mrb_sym
iv_name
)
{
if
(
!
mrb_iv_p
(
mrb
,
iv_name
))
{
mrb_name_error
(
mrb
,
iv_name
,
"
`
%S' is not allowed as an instance variable name"
,
mrb_sym2str
(
mrb
,
iv_name
));
mrb_name_error
(
mrb
,
iv_name
,
"
'
%S' is not allowed as an instance variable name"
,
mrb_sym2str
(
mrb
,
iv_name
));
}
}
...
...
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