Skip to content

Commit

Permalink
Removed trailing spaces
Browse files Browse the repository at this point in the history
  • Loading branch information
nobu committed Sep 28, 2016
1 parent 9d3167c commit 6511bfd
Show file tree
Hide file tree
Showing 20 changed files with 82 additions and 82 deletions.
2 changes: 1 addition & 1 deletion doc/limitations.md
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ class Liste < Array
def initialize(str = nil)
@feld = str
end
end
end

p Liste.new "foobar"
```
Expand Down
8 changes: 4 additions & 4 deletions examples/targets/build_config_IntelEdison.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,20 +5,20 @@
MRuby::Build.new do |conf|
toolchain :gcc
conf.gembox 'default'
conf.cc.defines = %w(ENABLE_READLINE)
conf.cc.defines = %w(ENABLE_READLINE)
conf.gembox 'default'

#lightweight regular expression
conf.gem :github => "pbosetti/mruby-hs-regexp", :branch => "master"

end

# Define cross build settings
MRuby::CrossBuild.new('core2-32-poky-linux') do |conf|
toolchain :gcc

# Mac OS X
#
#
POKY_EDISON_PATH = '/opt/poky-edison/1.7.2'

POKY_EDISON_SYSROOT = "#{POKY_EDISON_PATH}/sysroots/core2-32-poky-linux"
Expand All @@ -42,7 +42,7 @@
cxx.include_paths << ["#{POKY_EDISON_SYSROOT}/usr/include/c++/4.9.1"]
cxx.flags = conf.cc.flags.dup
cxx.defines = conf.cc.defines.dup
cxx.compile_options = conf.cc.compile_options.dup
cxx.compile_options = conf.cc.compile_options.dup
end

conf.archiver do |archiver|
Expand Down
78 changes: 39 additions & 39 deletions include/mruby.h
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ MRB_API struct RClass *mrb_define_class(mrb_state *mrb, const char *name, struct

/**
* Defines a new module.
*
*
* @param [mrb_state *] mrb_state* The current mruby state.
* @param [const char *] char* The name of the module.
* @return [struct RClass *] Reference to the newly defined module.
Expand All @@ -232,11 +232,11 @@ MRB_API mrb_value mrb_singleton_class(mrb_state*, mrb_value);

/**
* Include a module in another class or module.
* Equivalent to:
* Equivalent to:
*
* module B
* include A
* end
* module B
* include A
* end
* @param [mrb_state *] mrb_state* The current mruby state.
* @param [struct RClass *] RClass* A reference to module or a class.
* @param [struct RClass *] RClass* A reference to the module to be included.
Expand All @@ -253,7 +253,7 @@ MRB_API void mrb_include_module(mrb_state*, struct RClass*, struct RClass*);
* @param [mrb_state *] mrb_state* The current mruby state.
* @param [struct RClass *] RClass* A reference to module or a class.
* @param [struct RClass *] RClass* A reference to the module to be prepended.
*/
*/
MRB_API void mrb_prepend_module(mrb_state*, struct RClass*, struct RClass*);

/**
Expand Down Expand Up @@ -302,7 +302,7 @@ MRB_API void mrb_define_method(mrb_state *mrb, struct RClass *cla, const char *n
* foo = mrb_define_class(mrb, "Foo", mrb->object_class);
* mrb_define_class_method(mrb, foo, "bar", bar_method, MRB_ARGS_NONE());
* }
* @param [mrb_state *] mrb_state* The MRuby state reference.
* @param [mrb_state *] mrb_state* The MRuby state reference.
* @param [struct RClass *] RClass* The class where the class method will be defined.
* @param [const char *] char* The name of the class method being defined.
* @param [mrb_func_t] mrb_func_t The function pointer to the class method definition.
Expand All @@ -317,23 +317,23 @@ MRB_API void mrb_define_singleton_method(mrb_state*, struct RObject*, const char
* Example:
*
* # Ruby style
* module Foo
* module Foo
* def Foo.bar
* end
* end
* // C style
* end
* end
* // C style
* mrb_value bar_method(mrb_state* mrb, mrb_value self){
* return mrb_nil_value();
* }
* void mrb_example_gem_init(mrb_state* mrb){
* return mrb_nil_value();
* }
* void mrb_example_gem_init(mrb_state* mrb){
* struct RClass *foo;
* foo = mrb_define_module(mrb, "Foo");
* foo = mrb_define_module(mrb, "Foo");
* mrb_define_module_function(mrb, foo, "bar", bar_method, MRB_ARGS_NONE());
* }
* }
* @param [mrb_state *] mrb_state* The MRuby state reference.
* @param [struct RClass *] RClass* The module where the module function will be defined.
* @param [const char *] char* The name of the module function being defined.
* @param [mrb_func_t] mrb_func_t The function pointer to the module function definition.
* @param [mrb_func_t] mrb_func_t The function pointer to the module function definition.
* @param [mrb_aspec] mrb_aspec The method parameters declaration.
*/
MRB_API void mrb_define_module_function(mrb_state*, struct RClass*, const char*, mrb_func_t, mrb_aspec);
Expand All @@ -348,9 +348,9 @@ MRB_API void mrb_define_module_function(mrb_state*, struct RClass*, const char*,
* AGE = 22
* end
* // C style
* #include <stdio.h>
* #include <stdio.h>
* #include <mruby.h>
*
*
* void
* mrb_example_gem_init(mrb_state* mrb){
* mrb_define_const(mrb, mrb->kernel_module, "AGE", mrb_fixnum_value(22));
Expand Down Expand Up @@ -389,7 +389,7 @@ MRB_API void mrb_define_const(mrb_state*, struct RClass*, const char *name, mrb_
* // C style
* #include <stdio.h>
* #include <mruby.h>
*
*
* mrb_value
* mrb_example_method(mrb_state *mrb){
* return mrb_str_new_cstr(mrb, "example");
Expand All @@ -400,14 +400,14 @@ MRB_API void mrb_define_const(mrb_state*, struct RClass*, const char *name, mrb_
* struct RClass *example_class_a;
* struct RClass *example_class_b;
* struct RClass *example_class_c;
*
*
* example_class_a = mrb_define_class(mrb, "ExampleClassA", mrb->object_class);
* mrb_define_method(mrb, example_class_a, "example_method", mrb_example_method, MRB_ARGS_NONE());
* example_class_b = mrb_define_class(mrb, "ExampleClassB", example_class_a);
* example_class_c = mrb_define_class(mrb, "ExampleClassC", example_class_b);
* mrb_undef_method(mrb, example_class_c, "example_method");
* }
*
*
* mrb_example_gem_final(mrb_state* mrb){
* }
* @param [mrb_state*] mrb_state* The mruby state reference.
Expand All @@ -428,24 +428,24 @@ MRB_API void mrb_undef_method(mrb_state*, struct RClass*, const char*);
* end
*
* ExampleClass.example_method
*
*
* // C style
* #include <stdio.h>
* #include <mruby.h>
* #include <mruby.h>
*
* mrb_value
* mrb_example_method(mrb_state *mrb){
* return mrb_str_new_cstr(mrb, "example");
* return mrb_str_new_cstr(mrb, "example");
* }
*
*
* void
* mrb_example_gem_init(mrb_state* mrb){
* struct RClass *example_class;
* example_class = mrb_define_class(mrb, "ExampleClass", mrb->object_class);
* mrb_define_class_method(mrb, example_class, "example_method", mrb_example_method, MRB_ARGS_NONE());
* mrb_undef_class_method(mrb, example_class, "example_method");
* }
*
*
* void
* mrb_example_gem_final(mrb_state* mrb){
* }
Expand Down Expand Up @@ -476,7 +476,7 @@ MRB_API void mrb_undef_class_method(mrb_state*, struct RClass*, const char*);
* example_class = mrb_define_class(mrb, "ExampleClass", mrb->object_class); # => class ExampleClass; end
* obj = mrb_obj_new(mrb, example_class, 0, NULL); # => ExampleClass.new
* mrb_p(mrb, obj); // => Kernel#p
* }
* }
* @param [mrb_state*] mrb The current mruby state.
* @param [RClass*] c Reference to the class of the new object.
* @param [mrb_int] argc Number of arguments in argv
Expand All @@ -501,7 +501,7 @@ MRB_API mrb_value mrb_instance_new(mrb_state *mrb, mrb_value cv);
* void
* mrb_example_gem_init(mrb_state* mrb) {
* struct RClass *example_class;
*
*
* mrb_value obj;
* example_class = mrb_class_new(mrb, mrb->object_class);
* obj = mrb_obj_new(mrb, example_class, 0, NULL); // => #<#<Class:0x9a945b8>:0x9a94588>
Expand All @@ -521,7 +521,7 @@ MRB_API struct RClass * mrb_class_new(mrb_state *mrb, struct RClass *super);
* void
* mrb_example_gem_init(mrb_state* mrb) {
* struct RClass *example_module;
*
*
* example_module = mrb_module_new(mrb);
* }
*
Expand All @@ -541,7 +541,7 @@ MRB_API struct RClass * mrb_module_new(mrb_state *mrb);
*
* example_class = mrb_define_class(mrb, "ExampleClass", mrb->object_class);
* cd = mrb_class_defined(mrb, "ExampleClass");
*
*
* // If mrb_class_defined returns 1 then puts "True"
* // If mrb_class_defined returns 0 then puts "False"
* if (cd == 1){
Expand Down Expand Up @@ -597,7 +597,7 @@ MRB_API mrb_value mrb_notimplement_m(mrb_state*, mrb_value);
* Duplicate an object.
*
* Equivalent to:
* Object#dup
* Object#dup
* @param [mrb_state*] mrb The current mruby state.
* @param [mrb_value] obj Object to be duplicate.
* @return [mrb_value] The newly duplicated object.
Expand Down Expand Up @@ -629,7 +629,7 @@ MRB_API mrb_value mrb_check_to_integer(mrb_state *mrb, mrb_value val, const char
* mrb_define_method(mrb, example_class, "example_method", exampleMethod, MRB_ARGS_NONE());
* mid = mrb_intern_str(mrb, mrb_str_new_cstr(mrb, "example_method" ));
* obj_resp = mrb_obj_respond_to(mrb, example_class, mid); // => 1(true in Ruby world)
*
*
* // If mrb_obj_respond_to returns 1 then puts "True"
* // If mrb_obj_respond_to returns 0 then puts "False"
* if (obj_resp == 1) {
Expand Down Expand Up @@ -780,13 +780,13 @@ mrb_get_argc(mrb_state *mrb) /* get argc */
* #include <stdio.h>
* #include <mruby.h>
* #include "mruby/compile.h"
*
*
* int
* main()
* {
* mrb_int i = 99;
* mrb_state *mrb = mrb_open();
*
*
* if (!mrb) { }
* FILE *fp = fopen("test.rb","r");
* mrb_value obj = mrb_load_file(mrb,fp);
Expand All @@ -804,7 +804,7 @@ mrb_get_argc(mrb_state *mrb) /* get argc */
MRB_API mrb_value mrb_funcall(mrb_state*, mrb_value, const char*, mrb_int,...);
/**
* Call existing ruby functions. This is basically the type safe version of mrb_funcall.
*
*
* #include <stdio.h>
* #include <mruby.h>
* #include "mruby/compile.h"
Expand All @@ -813,10 +813,10 @@ MRB_API mrb_value mrb_funcall(mrb_state*, mrb_value, const char*, mrb_int,...);
* {
* mrb_int i = 99;
* mrb_state *mrb = mrb_open();
*
*
* if (!mrb) { }
* mrb_sym m_sym = mrb_intern_cstr(mrb, "method_name"); // Symbol for method.
*
*
* FILE *fp = fopen("test.rb","r");
* mrb_value obj = mrb_load_file(mrb,fp);
* mrb_funcall_argv(mrb, obj, m_sym, 1, &obj); // Calling ruby function from test.rb.
Expand All @@ -841,7 +841,7 @@ MRB_API mrb_value mrb_funcall_with_block(mrb_state*, mrb_value, mrb_sym, mrb_int
*
* # Ruby style:
* :pizza # => :pizza
*
*
* // C style:
* mrb_sym m_sym = mrb_intern_cstr(mrb, "pizza"); // => :pizza
* @param [mrb_state*] mrb_state* The current mruby state.
Expand Down
16 changes: 8 additions & 8 deletions include/mruby/string.h
Original file line number Diff line number Diff line change
Expand Up @@ -91,12 +91,12 @@ MRB_API void mrb_str_modify(mrb_state*, struct RString*);
/*
* Appends self to other. Returns self as a concatnated string.
*
*
*
* Example:
*
* !!!c
* int
* main(int argc,
* main(int argc,
* char **argv)
* {
* // Variable declarations.
Expand Down Expand Up @@ -138,12 +138,12 @@ MRB_API void mrb_str_concat(mrb_state*, mrb_value, mrb_value);
/*
* Adds two strings together.
*
*
*
* Example:
*
* !!!c
* int
* main(int argc,
* main(int argc,
* char **argv)
* {
* // Variable declarations.
Expand Down Expand Up @@ -215,7 +215,7 @@ MRB_API mrb_value mrb_obj_as_string(mrb_state *mrb, mrb_value obj);
*
* !!!c
* int
* main(int argc,
* main(int argc,
* char **argv)
* {
* // Variable declaration.
Expand All @@ -224,11 +224,11 @@ MRB_API mrb_value mrb_obj_as_string(mrb_state *mrb, mrb_value obj);
* mrb_state *mrb = mrb_open();
* if (!mrb)
* {
* // handle error
* // handle error
* }
* // Creates a new string.
* str = mrb_str_new_cstr(mrb, "Hello, world!");
* // Returns 5 characters of
* // Returns 5 characters of
* mrb_str_resize(mrb, str, 5);
* mrb_p(mrb, str);
*
Expand All @@ -254,7 +254,7 @@ MRB_API mrb_value mrb_str_resize(mrb_state *mrb, mrb_value str, mrb_int len);
*
* !!!c
* int
* main(int argc,
* main(int argc,
* char const **argv)
* {
* // Variable declarations.
Expand Down
2 changes: 1 addition & 1 deletion mrbgems/mruby-bin-debugger/bintest/mrdb.rb
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ def self.test(rubysource, testcase)

# compile
`./bin/mrbc -g -o "#{bin.path}" "#{script.path}"`

# add mrdb quit
testcase << {:cmd=>"quit"}

Expand Down
2 changes: 1 addition & 1 deletion mrbgems/mruby-bin-debugger/bintest/print.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ def self.test(rubysource, testcase)

# compile
`./bin/mrbc -g -o "#{bin.path}" "#{script.path}"`

# add mrdb quit
testcase << {:cmd=>"quit"}

Expand Down
Loading

0 comments on commit 6511bfd

Please sign in to comment.