Commit 2d335dae authored by Yukihiro "Matz" Matsumoto's avatar Yukihiro "Matz" Matsumoto Committed by GitHub

Merge pull request #3218 from nobu/trailing-space

Removed trailing spaces
parents 9d3167ca 6511bfd7
...@@ -96,7 +96,7 @@ class Liste < Array ...@@ -96,7 +96,7 @@ class Liste < Array
def initialize(str = nil) def initialize(str = nil)
@feld = str @feld = str
end end
end end
p Liste.new "foobar" p Liste.new "foobar"
``` ```
......
...@@ -5,12 +5,12 @@ ...@@ -5,12 +5,12 @@
MRuby::Build.new do |conf| MRuby::Build.new do |conf|
toolchain :gcc toolchain :gcc
conf.gembox 'default' conf.gembox 'default'
conf.cc.defines = %w(ENABLE_READLINE) conf.cc.defines = %w(ENABLE_READLINE)
conf.gembox 'default' conf.gembox 'default'
#lightweight regular expression #lightweight regular expression
conf.gem :github => "pbosetti/mruby-hs-regexp", :branch => "master" conf.gem :github => "pbosetti/mruby-hs-regexp", :branch => "master"
end end
# Define cross build settings # Define cross build settings
...@@ -18,7 +18,7 @@ MRuby::CrossBuild.new('core2-32-poky-linux') do |conf| ...@@ -18,7 +18,7 @@ MRuby::CrossBuild.new('core2-32-poky-linux') do |conf|
toolchain :gcc toolchain :gcc
# Mac OS X # Mac OS X
# #
POKY_EDISON_PATH = '/opt/poky-edison/1.7.2' POKY_EDISON_PATH = '/opt/poky-edison/1.7.2'
POKY_EDISON_SYSROOT = "#{POKY_EDISON_PATH}/sysroots/core2-32-poky-linux" POKY_EDISON_SYSROOT = "#{POKY_EDISON_PATH}/sysroots/core2-32-poky-linux"
...@@ -42,7 +42,7 @@ MRuby::CrossBuild.new('core2-32-poky-linux') do |conf| ...@@ -42,7 +42,7 @@ MRuby::CrossBuild.new('core2-32-poky-linux') do |conf|
cxx.include_paths << ["#{POKY_EDISON_SYSROOT}/usr/include/c++/4.9.1"] cxx.include_paths << ["#{POKY_EDISON_SYSROOT}/usr/include/c++/4.9.1"]
cxx.flags = conf.cc.flags.dup cxx.flags = conf.cc.flags.dup
cxx.defines = conf.cc.defines.dup cxx.defines = conf.cc.defines.dup
cxx.compile_options = conf.cc.compile_options.dup cxx.compile_options = conf.cc.compile_options.dup
end end
conf.archiver do |archiver| conf.archiver do |archiver|
......
This diff is collapsed.
...@@ -91,12 +91,12 @@ MRB_API void mrb_str_modify(mrb_state*, struct RString*); ...@@ -91,12 +91,12 @@ MRB_API void mrb_str_modify(mrb_state*, struct RString*);
/* /*
* Appends self to other. Returns self as a concatnated string. * Appends self to other. Returns self as a concatnated string.
* *
* *
* Example: * Example:
* *
* !!!c * !!!c
* int * int
* main(int argc, * main(int argc,
* char **argv) * char **argv)
* { * {
* // Variable declarations. * // Variable declarations.
...@@ -138,12 +138,12 @@ MRB_API void mrb_str_concat(mrb_state*, mrb_value, mrb_value); ...@@ -138,12 +138,12 @@ MRB_API void mrb_str_concat(mrb_state*, mrb_value, mrb_value);
/* /*
* Adds two strings together. * Adds two strings together.
* *
* *
* Example: * Example:
* *
* !!!c * !!!c
* int * int
* main(int argc, * main(int argc,
* char **argv) * char **argv)
* { * {
* // Variable declarations. * // Variable declarations.
...@@ -215,7 +215,7 @@ MRB_API mrb_value mrb_obj_as_string(mrb_state *mrb, mrb_value obj); ...@@ -215,7 +215,7 @@ MRB_API mrb_value mrb_obj_as_string(mrb_state *mrb, mrb_value obj);
* *
* !!!c * !!!c
* int * int
* main(int argc, * main(int argc,
* char **argv) * char **argv)
* { * {
* // Variable declaration. * // Variable declaration.
...@@ -224,11 +224,11 @@ MRB_API mrb_value mrb_obj_as_string(mrb_state *mrb, mrb_value obj); ...@@ -224,11 +224,11 @@ MRB_API mrb_value mrb_obj_as_string(mrb_state *mrb, mrb_value obj);
* mrb_state *mrb = mrb_open(); * mrb_state *mrb = mrb_open();
* if (!mrb) * if (!mrb)
* { * {
* // handle error * // handle error
* } * }
* // Creates a new string. * // Creates a new string.
* str = mrb_str_new_cstr(mrb, "Hello, world!"); * str = mrb_str_new_cstr(mrb, "Hello, world!");
* // Returns 5 characters of * // Returns 5 characters of
* mrb_str_resize(mrb, str, 5); * mrb_str_resize(mrb, str, 5);
* mrb_p(mrb, str); * mrb_p(mrb, str);
* *
...@@ -254,7 +254,7 @@ MRB_API mrb_value mrb_str_resize(mrb_state *mrb, mrb_value str, mrb_int len); ...@@ -254,7 +254,7 @@ MRB_API mrb_value mrb_str_resize(mrb_state *mrb, mrb_value str, mrb_int len);
* *
* !!!c * !!!c
* int * int
* main(int argc, * main(int argc,
* char const **argv) * char const **argv)
* { * {
* // Variable declarations. * // Variable declarations.
......
...@@ -14,7 +14,7 @@ class BinTest_MrubyBinDebugger ...@@ -14,7 +14,7 @@ class BinTest_MrubyBinDebugger
# compile # compile
`./bin/mrbc -g -o "#{bin.path}" "#{script.path}"` `./bin/mrbc -g -o "#{bin.path}" "#{script.path}"`
# add mrdb quit # add mrdb quit
testcase << {:cmd=>"quit"} testcase << {:cmd=>"quit"}
......
...@@ -13,7 +13,7 @@ class BinTest_MrubyBinDebugger ...@@ -13,7 +13,7 @@ class BinTest_MrubyBinDebugger
# compile # compile
`./bin/mrbc -g -o "#{bin.path}" "#{script.path}"` `./bin/mrbc -g -o "#{bin.path}" "#{script.path}"`
# add mrdb quit # add mrdb quit
testcase << {:cmd=>"quit"} testcase << {:cmd=>"quit"}
......
...@@ -97,7 +97,7 @@ check_file_lineno( struct mrb_irep *irep, const char *file, uint16_t lineno ) ...@@ -97,7 +97,7 @@ check_file_lineno( struct mrb_irep *irep, const char *file, uint16_t lineno )
result = MRB_DEBUG_BP_FILE_OK; result = MRB_DEBUG_BP_FILE_OK;
fix_lineno = check_lineno( info_file, lineno ); fix_lineno = check_lineno( info_file, lineno );
if(fix_lineno != 0) { if(fix_lineno != 0) {
return result | MRB_DEBUG_BP_LINENO_OK; return result | MRB_DEBUG_BP_LINENO_OK;
} }
} }
...@@ -200,7 +200,7 @@ mrb_debug_set_break_line( mrb_state *mrb, mrb_debug_context *dbg, const char *fi ...@@ -200,7 +200,7 @@ mrb_debug_set_break_line( mrb_state *mrb, mrb_debug_context *dbg, const char *fi
return MRB_DEBUG_BREAK_INVALID_FILE; return MRB_DEBUG_BREAK_INVALID_FILE;
}else if(result == MRB_DEBUG_BP_FILE_OK) { }else if(result == MRB_DEBUG_BP_FILE_OK) {
return MRB_DEBUG_BREAK_INVALID_LINENO; return MRB_DEBUG_BREAK_INVALID_LINENO;
} }
set_file = mrb_malloc(mrb, strlen(file) + 1); set_file = mrb_malloc(mrb, strlen(file) + 1);
...@@ -272,7 +272,7 @@ mrb_debug_get_breaknum( mrb_state *mrb, mrb_debug_context *dbg ) ...@@ -272,7 +272,7 @@ mrb_debug_get_breaknum( mrb_state *mrb, mrb_debug_context *dbg )
return dbg->bpnum; return dbg->bpnum;
} }
int32_t int32_t
mrb_debug_get_break_all( mrb_state *mrb, mrb_debug_context *dbg, uint32_t size, mrb_debug_breakpoint *bp ) mrb_debug_get_break_all( mrb_state *mrb, mrb_debug_context *dbg, uint32_t size, mrb_debug_breakpoint *bp )
{ {
uint32_t get_size = 0; uint32_t get_size = 0;
...@@ -315,7 +315,7 @@ mrb_debug_get_break( mrb_state *mrb, mrb_debug_context *dbg, uint32_t bpno, mrb_ ...@@ -315,7 +315,7 @@ mrb_debug_get_break( mrb_state *mrb, mrb_debug_context *dbg, uint32_t bpno, mrb_
return 0; return 0;
} }
int32_t int32_t
mrb_debug_delete_break( mrb_state *mrb, mrb_debug_context *dbg, uint32_t bpno ) mrb_debug_delete_break( mrb_state *mrb, mrb_debug_context *dbg, uint32_t bpno )
{ {
uint32_t i; uint32_t i;
...@@ -346,7 +346,7 @@ mrb_debug_delete_break( mrb_state *mrb, mrb_debug_context *dbg, uint32_t bpno ) ...@@ -346,7 +346,7 @@ mrb_debug_delete_break( mrb_state *mrb, mrb_debug_context *dbg, uint32_t bpno )
return MRB_DEBUG_OK; return MRB_DEBUG_OK;
} }
int32_t int32_t
mrb_debug_delete_break_all( mrb_state *mrb, mrb_debug_context *dbg ) mrb_debug_delete_break_all( mrb_state *mrb, mrb_debug_context *dbg )
{ {
uint32_t i; uint32_t i;
...@@ -364,7 +364,7 @@ mrb_debug_delete_break_all( mrb_state *mrb, mrb_debug_context *dbg ) ...@@ -364,7 +364,7 @@ mrb_debug_delete_break_all( mrb_state *mrb, mrb_debug_context *dbg )
return MRB_DEBUG_OK; return MRB_DEBUG_OK;
} }
int32_t int32_t
mrb_debug_enable_break( mrb_state *mrb, mrb_debug_context *dbg, uint32_t bpno ) mrb_debug_enable_break( mrb_state *mrb, mrb_debug_context *dbg, uint32_t bpno )
{ {
int32_t index = 0; int32_t index = 0;
...@@ -399,7 +399,7 @@ mrb_debug_enable_break_all( mrb_state *mrb, mrb_debug_context *dbg ) ...@@ -399,7 +399,7 @@ mrb_debug_enable_break_all( mrb_state *mrb, mrb_debug_context *dbg )
return MRB_DEBUG_OK; return MRB_DEBUG_OK;
} }
int32_t int32_t
mrb_debug_disable_break( mrb_state *mrb, mrb_debug_context *dbg, uint32_t bpno ) mrb_debug_disable_break( mrb_state *mrb, mrb_debug_context *dbg, uint32_t bpno )
{ {
int32_t index = 0; int32_t index = 0;
...@@ -418,7 +418,7 @@ mrb_debug_disable_break( mrb_state *mrb, mrb_debug_context *dbg, uint32_t bpno ) ...@@ -418,7 +418,7 @@ mrb_debug_disable_break( mrb_state *mrb, mrb_debug_context *dbg, uint32_t bpno )
return MRB_DEBUG_OK; return MRB_DEBUG_OK;
} }
int32_t int32_t
mrb_debug_disable_break_all( mrb_state *mrb, mrb_debug_context *dbg ) mrb_debug_disable_break_all( mrb_state *mrb, mrb_debug_context *dbg )
{ {
uint32_t i; uint32_t i;
...@@ -483,7 +483,7 @@ mrb_debug_check_breakpoint_line( mrb_state *mrb, mrb_debug_context *dbg, const c ...@@ -483,7 +483,7 @@ mrb_debug_check_breakpoint_line( mrb_state *mrb, mrb_debug_context *dbg, const c
} }
int32_t int32_t
mrb_debug_check_breakpoint_method( mrb_state *mrb, mrb_debug_context *dbg, struct RClass *class_obj, mrb_sym method_sym, mrb_bool* isCfunc ) mrb_debug_check_breakpoint_method( mrb_state *mrb, mrb_debug_context *dbg, struct RClass *class_obj, mrb_sym method_sym, mrb_bool* isCfunc )
{ {
mrb_debug_breakpoint *bp; mrb_debug_breakpoint *bp;
......
...@@ -22,7 +22,7 @@ dbgcmd_run(mrb_state *mrb, mrdb_state *mrdb) ...@@ -22,7 +22,7 @@ dbgcmd_run(mrb_state *mrb, mrdb_state *mrdb)
mrb_raise(mrb, exc, "Restart mrdb."); mrb_raise(mrb, exc, "Restart mrdb.");
} }
} }
return DBGST_RESTART; return DBGST_RESTART;
} }
......
...@@ -691,7 +691,7 @@ main(int argc, char **argv) ...@@ -691,7 +691,7 @@ main(int argc, char **argv)
} }
mrdb->dbg->xm = DBG_INIT; mrdb->dbg->xm = DBG_INIT;
mrdb->dbg->ccnt = 1; mrdb->dbg->ccnt = 1;
/* setup hook functions */ /* setup hook functions */
mrb->code_fetch_hook = mrb_code_fetch_hook; mrb->code_fetch_hook = mrb_code_fetch_hook;
mrdb->dbg->break_hook = mrb_debug_break_hook; mrdb->dbg->break_hook = mrb_debug_break_hook;
...@@ -738,21 +738,21 @@ main(int argc, char **argv) ...@@ -738,21 +738,21 @@ main(int argc, char **argv)
mrb_p(mrb, v); mrb_p(mrb, v);
} }
} }
mrdb->dbg->prvfile = "-"; mrdb->dbg->prvfile = "-";
mrdb->dbg->prvline = 0; mrdb->dbg->prvline = 0;
while (1) { while (1) {
cmd = get_and_parse_command(mrb, mrdb); cmd = get_and_parse_command(mrb, mrdb);
mrb_assert(cmd); mrb_assert(cmd);
if (cmd->id == DBGCMD_QUIT) { if (cmd->id == DBGCMD_QUIT) {
break; break;
} }
if( cmd->func(mrb, mrdb) == DBGST_RESTART ) goto l_restart; if( cmd->func(mrb, mrdb) == DBGST_RESTART ) goto l_restart;
} }
cleanup(mrb, &args); cleanup(mrb, &args);
return 0; return 0;
......
...@@ -2972,7 +2972,7 @@ superclass : /* term */ ...@@ -2972,7 +2972,7 @@ superclass : /* term */
expr_value term expr_value term
{ {
$$ = $3; $$ = $3;
} /* } /*
| error term | error term
{ {
yyerrok; yyerrok;
......
...@@ -5,7 +5,7 @@ assert 'mrb_protect' do ...@@ -5,7 +5,7 @@ assert 'mrb_protect' do
end end
# failure in protect returns [exception, true] # failure in protect returns [exception, true]
result = ExceptionTest.mrb_protect { raise 'test' } result = ExceptionTest.mrb_protect { raise 'test' }
assert_kind_of RuntimeError, result[0] assert_kind_of RuntimeError, result[0]
assert_true result[1] assert_true result[1]
end end
......
...@@ -61,7 +61,7 @@ mrb_f_integer(mrb_state *mrb, mrb_value self) ...@@ -61,7 +61,7 @@ mrb_f_integer(mrb_state *mrb, mrb_value self)
* Float(arg) -> float * Float(arg) -> float
* *
* Returns <i>arg</i> converted to a float. Numeric types are converted * Returns <i>arg</i> converted to a float. Numeric types are converted
* directly, the rest are converted using <i>arg</i>.to_f. * directly, the rest are converted using <i>arg</i>.to_f.
* *
* Float(1) #=> 1.0 * Float(1) #=> 1.0
* Float(123.456) #=> 123.456 * Float(123.456) #=> 123.456
......
...@@ -28,7 +28,7 @@ ...@@ -28,7 +28,7 @@
** Any feedback is very welcome. ** Any feedback is very welcome.
** http://www.math.sci.hiroshima-u.ac.jp/~m-mat/MT/emt.html ** http://www.math.sci.hiroshima-u.ac.jp/~m-mat/MT/emt.html
** email: m-mat @ math.sci.hiroshima-u.ac.jp (remove space) ** email: m-mat @ math.sci.hiroshima-u.ac.jp (remove space)
** **
** This version is modified by mruby developers. If you see any problem, ** This version is modified by mruby developers. If you see any problem,
** contact us first at https://github.com/mruby/mruby/issues ** contact us first at https://github.com/mruby/mruby/issues
*/ */
......
...@@ -207,7 +207,7 @@ class String ...@@ -207,7 +207,7 @@ class String
else else
idx = arg1 idx = arg1
idx += self.size if arg1 < 0 idx += self.size if arg1 < 0
validated = true if idx >=0 && arg1 < self.size validated = true if idx >=0 && arg1 < self.size
end end
if validated if validated
str = self[arg1] str = self[arg1]
......
...@@ -201,7 +201,7 @@ class Hash ...@@ -201,7 +201,7 @@ class Hash
}.join(", ")+"}" }.join(", ")+"}"
end end
## ##
# Return the contents of this hash as a string. # Return the contents of this hash as a string.
# #
# ISO 15.2.13.4.30 (x) # ISO 15.2.13.4.30 (x)
def inspect def inspect
......
...@@ -253,7 +253,7 @@ fmt_fp(struct fmt_args *f, long double y, int w, int p, int fl, int t) ...@@ -253,7 +253,7 @@ fmt_fp(struct fmt_args *f, long double y, int w, int p, int fl, int t)
if (z>d+1) z=d+1; if (z>d+1) z=d+1;
} }
for (; z>a && !z[-1]; z--); for (; z>a && !z[-1]; z--);
if ((t|32)=='g') { if ((t|32)=='g') {
if (!p) p++; if (!p) p++;
if (p>e && e>=-4) { if (p>e && e>=-4) {
...@@ -354,7 +354,7 @@ fmt_core(struct fmt_args *f, const char *fmt, mrb_float flo) ...@@ -354,7 +354,7 @@ fmt_core(struct fmt_args *f, const char *fmt, mrb_float flo)
return fmt_fp(f, flo, 0, p, 0, *fmt); return fmt_fp(f, flo, 0, p, 0, *fmt);
default: default:
return -1; return -1;
} }
} }
mrb_value mrb_value
......
...@@ -65,7 +65,7 @@ ...@@ -65,7 +65,7 @@
mruby implementer and C extension library writer must insert a write mruby implementer and C extension library writer must insert a write
barrier when updating a reference from a field of an object. barrier when updating a reference from a field of an object.
When updating a reference from a field of object A to object B, When updating a reference from a field of object A to object B,
two different types of write barrier are available: two different types of write barrier are available:
* mrb_field_write_barrier - target B object for a mark. * mrb_field_write_barrier - target B object for a mark.
......
...@@ -523,7 +523,7 @@ read_binary_header(const uint8_t *bin, size_t *bin_size, uint16_t *crc, uint8_t ...@@ -523,7 +523,7 @@ read_binary_header(const uint8_t *bin, size_t *bin_size, uint16_t *crc, uint8_t
if (memcmp(header->binary_ident, RITE_BINARY_IDENT, sizeof(header->binary_ident)) == 0) { if (memcmp(header->binary_ident, RITE_BINARY_IDENT, sizeof(header->binary_ident)) == 0) {
if (bigendian_p()) if (bigendian_p())
*flags |= FLAG_BYTEORDER_NATIVE; *flags |= FLAG_BYTEORDER_NATIVE;
else else
*flags |= FLAG_BYTEORDER_BIG; *flags |= FLAG_BYTEORDER_BIG;
} }
else if (memcmp(header->binary_ident, RITE_BINARY_IDENT_LIL, sizeof(header->binary_ident)) == 0) { else if (memcmp(header->binary_ident, RITE_BINARY_IDENT_LIL, sizeof(header->binary_ident)) == 0) {
......
...@@ -55,7 +55,7 @@ num_pow(mrb_state *mrb, mrb_value x) ...@@ -55,7 +55,7 @@ num_pow(mrb_state *mrb, mrb_value x)
mrb_get_args(mrb, "o", &y); mrb_get_args(mrb, "o", &y);
yv = mrb_to_flo(mrb, y); yv = mrb_to_flo(mrb, y);
d = pow(mrb_to_flo(mrb, x), yv); d = pow(mrb_to_flo(mrb, x), yv);
if (mrb_fixnum_p(x) && mrb_fixnum_p(y) && FIXABLE(d) && yv > 0 && if (mrb_fixnum_p(x) && mrb_fixnum_p(y) && FIXABLE(d) && yv > 0 &&
(d < 0 || (d > 0 && (mrb_int)d > 0))) (d < 0 || (d > 0 && (mrb_int)d > 0)))
return mrb_fixnum_value((mrb_int)d); return mrb_fixnum_value((mrb_int)d);
return mrb_float_value(mrb, d); return mrb_float_value(mrb, d);
......
...@@ -18,7 +18,7 @@ module MRuby ...@@ -18,7 +18,7 @@ module MRuby
alias mruby build alias mruby build
attr_accessor :build_config_initializer attr_accessor :build_config_initializer
attr_accessor :mrblib_dir, :objs_dir attr_accessor :mrblib_dir, :objs_dir
attr_accessor :version attr_accessor :version
attr_accessor :description, :summary attr_accessor :description, :summary
attr_accessor :homepage attr_accessor :homepage
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment