mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
Fix spelling
This commit is contained in:
@@ -260,7 +260,7 @@ class Scene
|
||||
w.times do |x|
|
||||
rad = Vec.new(0.0, 0.0, 0.0)
|
||||
|
||||
# Subsmpling
|
||||
# Subsampling
|
||||
nsubsamples.times do |v|
|
||||
nsubsamples.times do |u|
|
||||
cnt = cnt + 1
|
||||
|
||||
@@ -76,7 +76,7 @@ MRuby::Build.new do |conf|
|
||||
# exts.library = '.a'
|
||||
# end
|
||||
|
||||
# file separetor
|
||||
# file separator
|
||||
# conf.file_separator = '/'
|
||||
|
||||
# Turn on `enable_debug` for better debugging
|
||||
|
||||
@@ -26,7 +26,7 @@ MRuby::Build.new do |conf|
|
||||
exts.library = '.so'
|
||||
end
|
||||
|
||||
# file separetor
|
||||
# file separator
|
||||
# conf.file_separator = '/'
|
||||
|
||||
# Turn on `enable_debug` for better debugging
|
||||
|
||||
@@ -13,7 +13,7 @@ To compile mruby out of the source code you need the following tools:
|
||||
* Ruby 2.0 or later (e.g. `ruby` or `jruby`)
|
||||
|
||||
Note that `bison` bundled with MacOS is too old to compile `mruby`.
|
||||
Try `brew install bison` and follow the instuction shown to update
|
||||
Try `brew install bison` and follow the instruction shown to update
|
||||
the `$PATH` to compile `mruby`. We also encourage to upgrade `ruby`
|
||||
on MacOS in similar manner.
|
||||
|
||||
@@ -29,7 +29,7 @@ inside of the mruby source root. To generate and execute the test tools call
|
||||
`rake test`. To clean all build files call `rake clean`. To see full command
|
||||
line on build, call `rake -v`.
|
||||
|
||||
You can specify your owne configration file by the `MRUBY_CONFIG` environment
|
||||
You can specify your owne configuration file by the `MRUBY_CONFIG` environment
|
||||
variable (you can use `CONFIG` for shorthand for `MRUBY_CONFIG`). If the path
|
||||
doesn't exist, *build_config/${MRUBY_CONFIG}.rb* is used. The default
|
||||
configuration is defined in the `build_config/default.rb` file.
|
||||
|
||||
@@ -59,7 +59,7 @@ NOTE: `:bitbucket` option supports only git. Hg is unsupported in this version.
|
||||
|
||||
There are instances when you wish to add a collection of mrbgems into mruby at
|
||||
once, or be able to substitute mrbgems based on configuration, without having to
|
||||
add each gem to your build configration file. A packaged collection of mrbgems
|
||||
add each gem to your build configuration file. A packaged collection of mrbgems
|
||||
is called a GemBox. A GemBox is a file that contains a list of mrbgems to load
|
||||
into mruby, in the same format as if you were adding them to the build config
|
||||
via `config.gem`, but wrapped in an `MRuby::GemBox` object. GemBoxes are
|
||||
@@ -78,7 +78,7 @@ must be saved with a *.gembox* extension inside the *mrbgems* directory to to be
|
||||
picked up by mruby.
|
||||
|
||||
To use this example GemBox, we save it as `custom.gembox` inside the *mrbgems*
|
||||
directory in mruby, and add the following to your build configration file inside
|
||||
directory in mruby, and add the following to your build configuration file inside
|
||||
the build block:
|
||||
```ruby
|
||||
conf.gembox 'custom'
|
||||
|
||||
+3
-3
@@ -13,7 +13,7 @@ directory. For examples:
|
||||
* `boxing`: compiles all three boxing options
|
||||
* `clang-asan`: compiles with `clang`'s Address Sanitizer
|
||||
|
||||
You can specify the build configration file with the
|
||||
You can specify the build configuration file with the
|
||||
`MRUBY_CONFIG` environment variable (or `CONFIG` in short).
|
||||
If the value specified by `MRUBY_CONFIG` is not the path to
|
||||
the configuration file, `build_config/${MRUBY_CONFIG}.rb` is
|
||||
@@ -68,7 +68,7 @@ Some configuration macro names are changed for consistency (use `MRB_USE_XXX`
|
||||
## `MRB_NO_BOXING`
|
||||
|
||||
Uses `struct` to represent `mrb_value`. Consumes more memory
|
||||
but easier to inveticate the internal and to debug. It used
|
||||
but easier to investigate the internal and to debug. It used
|
||||
to be default `mrb_value` representation. Now the default is
|
||||
`MRB_WORD_BOXING`.
|
||||
|
||||
@@ -137,7 +137,7 @@ Instructions for old exception handling
|
||||
* `OP_EPUSH`
|
||||
* `OP_EPOP`
|
||||
|
||||
No more operand extention
|
||||
No more operand extension
|
||||
|
||||
* `OP_EXT1`
|
||||
* `OP_EXT2`
|
||||
|
||||
@@ -296,7 +296,7 @@ MRB_API mrb_value mrb_ary_clear(mrb_state *mrb, mrb_value self);
|
||||
*
|
||||
* @param mrb The mruby state reference.
|
||||
* @param ary The target array
|
||||
* @param sep The separater, can be NULL
|
||||
* @param sep The separator, can be NULL
|
||||
*/
|
||||
MRB_API mrb_value mrb_ary_join(mrb_state *mrb, mrb_value ary, mrb_value sep);
|
||||
|
||||
|
||||
@@ -91,7 +91,7 @@ kh_fill_flags(uint8_t *p, uint8_t c, size_t len)
|
||||
khval_t: value data type
|
||||
kh_is_map: (0: hash set / 1: hash map)
|
||||
__hash_func: hash function
|
||||
__hash_equal: hash comparation function
|
||||
__hash_equal: hash comparison function
|
||||
*/
|
||||
#define KHASH_DEFINE(name, khkey_t, khval_t, kh_is_map, __hash_func, __hash_equal) \
|
||||
mrb_noreturn void mrb_raise_nomemory(mrb_state *mrb); \
|
||||
|
||||
@@ -345,9 +345,9 @@ MRB_API mrb_value mrb_str_new_capa(mrb_state *mrb, size_t capa);
|
||||
MRB_API const char *mrb_string_cstr(mrb_state *mrb, mrb_value str);
|
||||
/* NULL terminated C string from mrb_value; `str` will be updated */
|
||||
MRB_API const char *mrb_string_value_cstr(mrb_state *mrb, mrb_value *str);
|
||||
/* obslete: use RSTRING_PTR() */
|
||||
/* obsolete: use RSTRING_PTR() */
|
||||
MRB_API const char *mrb_string_value_ptr(mrb_state *mrb, mrb_value str);
|
||||
/* obslete: use RSTRING_LEN() */
|
||||
/* obsolete: use RSTRING_LEN() */
|
||||
MRB_API mrb_int mrb_string_value_len(mrb_state *mrb, mrb_value str);
|
||||
|
||||
/**
|
||||
@@ -433,7 +433,7 @@ MRB_API int mrb_str_cmp(mrb_state *mrb, mrb_value str1, mrb_value str2);
|
||||
* - Returned string does not contain any NUL characters (but terminator).
|
||||
* - It raises an ArgumentError exception if Ruby string contains
|
||||
* NUL characters.
|
||||
* - Retured string will be freed automatically on next GC.
|
||||
* - Returned string will be freed automatically on next GC.
|
||||
* - Caller can modify returned string without affecting Ruby string
|
||||
* (e.g. it can be used for mkstemp(3)).
|
||||
*
|
||||
|
||||
@@ -67,7 +67,7 @@ assert('mruby-bin-debugger(print) invalid arguments') do
|
||||
BinTest_MrubyBinDebugger.test(src, tc)
|
||||
end
|
||||
|
||||
assert('mruby-bin-debugger(print) nomal') do
|
||||
assert('mruby-bin-debugger(print) normal') do
|
||||
# ruby source
|
||||
src = <<"SRC"
|
||||
foo = 'foo'
|
||||
@@ -99,7 +99,7 @@ assert('mruby-bin-debugger(print) error') do
|
||||
BinTest_MrubyBinDebugger.test(src, tc)
|
||||
end
|
||||
|
||||
# Kernel#instance_eval(string) does't work multiple statements.
|
||||
# Kernel#instance_eval(string) doesn't work multiple statements.
|
||||
=begin
|
||||
assert('mruby-bin-debugger(print) multiple statements') do
|
||||
# ruby source
|
||||
@@ -234,7 +234,7 @@ SRC
|
||||
BinTest_MrubyBinDebugger.test(src, tc)
|
||||
end
|
||||
|
||||
assert('mruby-bin-debugger(print) same name:local variabe') do
|
||||
assert('mruby-bin-debugger(print) same name:local variable') do
|
||||
# ruby source (bp is break point)
|
||||
src = <<"SRC"
|
||||
lv = 'top'
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
mruby-method
|
||||
===
|
||||
|
||||
A implementetion of class **Method** and **UnboundMethod** for mruby
|
||||
A implementation of class **Method** and **UnboundMethod** for mruby
|
||||
|
||||
```ruby
|
||||
p Enumerable.instance_method(:find_all).source_location
|
||||
|
||||
@@ -506,7 +506,7 @@ get_hash(mrb_state *mrb, mrb_value *hash, mrb_int argc, const mrb_value *argv)
|
||||
* For more complex formatting, Ruby supports a reference by name.
|
||||
* %<name>s style uses format style, but %{name} style doesn't.
|
||||
*
|
||||
* Exapmles:
|
||||
* Examples:
|
||||
* sprintf("%<foo>d : %<bar>f", { :foo => 1, :bar => 2 })
|
||||
* #=> 1 : 2.000000
|
||||
* sprintf("%{foo}f", { :foo => 1 })
|
||||
|
||||
@@ -20,7 +20,7 @@ if Object.const_defined?(:Struct)
|
||||
|
||||
##
|
||||
# Calls the given block for each element of +self+
|
||||
# and pass the name and value of the respectiev
|
||||
# and pass the name and value of the respective
|
||||
# element.
|
||||
#
|
||||
# ISO 15.2.18.4.5
|
||||
|
||||
@@ -45,7 +45,7 @@
|
||||
|
||||
== Two White Types
|
||||
|
||||
There're two white color types in a flip-flop fashion: White-A and White-B,
|
||||
There are two white color types in a flip-flop fashion: White-A and White-B,
|
||||
which respectively represent the Current White color (the newly allocated
|
||||
objects in the current GC cycle) and the Sweep Target White color (the
|
||||
dead objects to be swept).
|
||||
|
||||
+1
-1
@@ -2997,7 +2997,7 @@ mrb_float_read(const char *string, char **endPtr)
|
||||
int c;
|
||||
int exp = 0; /* Exponent read from "EX" field. */
|
||||
int fracExp = 0; /* Exponent that derives from the fractional
|
||||
* part. Under normal circumstatnces, it is
|
||||
* part. Under normal circumstances, it is
|
||||
* the negative of the number of digits in F.
|
||||
* However, if I is very long, the last digits
|
||||
* of I get dropped (otherwise a long I with a
|
||||
|
||||
@@ -1840,11 +1840,11 @@ RETRY_TRY_BLOCK:
|
||||
if (mlen < m2) {
|
||||
stack_clear(®s[len-m2+mlen+1], m2-mlen);
|
||||
}
|
||||
/* initalize rest arguments with empty Array */
|
||||
/* initialize rest arguments with empty Array */
|
||||
if (r) {
|
||||
regs[m1+o+1] = mrb_ary_new_capa(mrb, 0);
|
||||
}
|
||||
/* skip initailizer of passed arguments */
|
||||
/* skip initializer of passed arguments */
|
||||
if (o > 0 && argc-kargs > m1+m2)
|
||||
pc += (argc - kargs - m1 - m2)*3;
|
||||
}
|
||||
|
||||
+1
-1
@@ -5,7 +5,7 @@ assert('Array', '15.2.12') do
|
||||
assert_equal(Class, Array.class)
|
||||
end
|
||||
|
||||
assert('Array inclueded modules', '15.2.12.3') do
|
||||
assert('Array included modules', '15.2.12.3') do
|
||||
assert_true(Array.include?(Enumerable))
|
||||
end
|
||||
|
||||
|
||||
+1
-1
@@ -674,7 +674,7 @@ end
|
||||
c1 = labeled_class("C1")
|
||||
c2 = labeled_class("C2", c1) {prepend m}
|
||||
c1.class_eval {prepend m}
|
||||
assert_equal([m, c2, m, c1], c2.ancestors[0, 4], "should accesisble prepended module in superclass")
|
||||
assert_equal([m, c2, m, c1], c2.ancestors[0, 4], "should accessible prepended module in superclass")
|
||||
end
|
||||
|
||||
# requires #assert_separately
|
||||
|
||||
Reference in New Issue
Block a user