From a8068b44cb4cc022ff04c8892061f69337b1507e Mon Sep 17 00:00:00 2001 From: Marcus Stollsteimer Date: Thu, 20 Mar 2014 12:47:37 +0100 Subject: Fix literal asterisks in markdown --- doc/compile/README.md | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/doc/compile/README.md b/doc/compile/README.md index d0dfaf9c2..a06a6b952 100644 --- a/doc/compile/README.md +++ b/doc/compile/README.md @@ -14,8 +14,8 @@ To compile mruby out of the source code you need the following tools: Optional: * GIT (to update mruby source and integrate mrbgems easier) -* C++ compiler (to use GEMs which include *.cpp) -* Assembler (to use GEMs which include *.asm) +* C++ compiler (to use GEMs which include \*.cpp) +* Assembler (to use GEMs which include \*.asm) ## Usage @@ -175,6 +175,7 @@ Integrate GEMs in the build process. See doc/mrbgems/README.md for more option about mrbgems. + ### Mrbtest Configuration Mrbtest build process. @@ -186,7 +187,7 @@ If you want mrbtest.a only, You should set ```conf.build_mrbtest_lib_only``` ### Bintest Tests for mrbgem tools using CRuby. -To have bintests place *.rb scripts to ```bintest/``` directory of mrbgems. +To have bintests place \*.rb scripts to ```bintest/``` directory of mrbgems. See ```mruby-bin-*/bintest/*.rb``` if you need examples. If you want a temporary files use `tempfile` module of CRuby instead of ```/tmp/```. @@ -285,7 +286,7 @@ result will be stored in *build/host/src/y.tab.c*) * create *build/host/lib/libmruby_core.a* out of all object files (C only) * create ```build/host/bin/mrbc``` by compiling *tools/mrbc/mrbc.c* and linking with *build/host/lib/libmruby_core.a* -* create *build/host/mrblib/mrblib.c* by compiling all *.rb files +* create *build/host/mrblib/mrblib.c* by compiling all \*.rb files under *mrblib* with ```build/host/bin/mrbc``` * compile *build/host/mrblib/mrblib.c* to *build/host/mrblib/mrblib.o* * create *build/host/lib/libmruby.a* out of all object files (C and Ruby) @@ -359,7 +360,7 @@ in *build/i386/src*) * generate parser grammar out of *src/parse.y* (generated result will be stored in *build/i386/src/y.tab.c*) * cross-compile *build/i386/src/y.tab.c* to *build/i386/src/y.tab.o* -* create *build/i386/mrblib/mrblib.c* by compiling all *.rb files +* create *build/i386/mrblib/mrblib.c* by compiling all \*.rb files under *mrblib* with the native ```build/host/bin/mrbc``` * cross-compile *build/host/mrblib/mrblib.c* to *build/host/mrblib/mrblib.o* * create *build/i386/lib/libmruby.a* out of all object files (C and Ruby) -- cgit v1.2.3 From 77bf470cc5d3a75e86f311bf119bb8effab207c3 Mon Sep 17 00:00:00 2001 From: Marcus Stollsteimer Date: Thu, 20 Mar 2014 12:49:19 +0100 Subject: Fix typos in README --- README.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index fbfed5fc6..34abdc0b7 100644 --- a/README.md +++ b/README.md @@ -3,10 +3,10 @@ ## What's mruby mruby is the lightweight implementation of the Ruby language complying to (part of) -the [ISO standard](http://www.iso.org/iso/iso_catalogue/catalogue_tc/catalogue_detail.htm?csnumber=59579). -mruby can be linked and embedded within your application. We provide the interpreter program "mruby" and +the [ISO standard](http://www.iso.org/iso/iso_catalogue/catalogue_tc/catalogue_detail.htm?csnumber=59579). +mruby can be linked and embedded within your application. We provide the interpreter program "mruby" and the interactive mruby shell "mirb" as examples. You can also compile Ruby programs into compiled byte code -using the mruby compiler "mrbc". All those tools reside in "bin" directory. The "mrbc" is also able to +using the mruby compiler "mrbc". All those tools reside in the "bin" directory. "mrbc" is also able to generate compiled byte code in a C source file. You can check the "mrbtest" program under the "test" directory. This achievement was sponsored by the Regional Innovation Creation R&D Programs of @@ -19,7 +19,7 @@ The stable version 1.0.0 of mruby can be downloaded via the following URL: https://github.com/mruby/mruby/archive/1.0.0.zip -The latest mruby development version of can be downloaded via the following URL: +The latest development version of mruby can be downloaded via the following URL: https://github.com/mruby/mruby/zipball/master -- cgit v1.2.3 From 6cfc5795af507762adb16df78e86baa77ce62191 Mon Sep 17 00:00:00 2001 From: Jun Hiroe Date: Fri, 21 Mar 2014 00:44:00 +0900 Subject: Add Enumerable#count comment --- mrbgems/mruby-enum-ext/mrblib/enum.rb | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/mrbgems/mruby-enum-ext/mrblib/enum.rb b/mrbgems/mruby-enum-ext/mrblib/enum.rb index 4be807640..c0f0ea3f2 100644 --- a/mrbgems/mruby-enum-ext/mrblib/enum.rb +++ b/mrbgems/mruby-enum-ext/mrblib/enum.rb @@ -210,6 +210,16 @@ module Enumerable end end + ## + # call-seq: + # enum.count -> int + # enum.count(item) -> int + # enum.count { |obj| block } -> int + # + # Returns the number of items in +enum+ through enumeration. + # If an argument is given, the number of items in +enum+ that + # are equal to +item+ are counted. If a block is given, it + # counts the number of elements yielding a true value. def count(v=NONE, &block) count = 0 if block -- cgit v1.2.3 From 02406bc2e32bb287cd691bf026e6cac9630de5b7 Mon Sep 17 00:00:00 2001 From: Akira Kuroda Date: Fri, 21 Mar 2014 01:10:05 +0900 Subject: add tests for TrueClass reorder and add tests for 15.2.5.1 --- test/t/true.rb | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/test/t/true.rb b/test/t/true.rb index 3aebf43a1..e5da2112c 100644 --- a/test/t/true.rb +++ b/test/t/true.rb @@ -5,12 +5,14 @@ assert('TrueClass', '15.2.5') do assert_equal Class, TrueClass.class end -assert('TrueClass superclass', '15.2.5.2') do - assert_equal Object, TrueClass.superclass -end - assert('TrueClass true', '15.2.5.1') do assert_true true + assert_equal TrueClass, true.class + assert_false TrueClass.method_defined? :new +end + +assert('TrueClass superclass', '15.2.5.2') do + assert_equal Object, TrueClass.superclass end assert('TrueClass#&', '15.2.5.3.1') do -- cgit v1.2.3