summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--lib/mruby/build.rb1
-rw-r--r--src/codedump.c6
-rw-r--r--src/hash.c10
-rw-r--r--src/string.c2
4 files changed, 10 insertions, 9 deletions
diff --git a/lib/mruby/build.rb b/lib/mruby/build.rb
index c9a7097b5..6c85d2044 100644
--- a/lib/mruby/build.rb
+++ b/lib/mruby/build.rb
@@ -55,7 +55,6 @@ module MRuby
include LoadGems
attr_accessor :name, :bins, :exts, :file_separator, :build_dir, :gem_clone_dir
attr_reader :libmruby_objs, :gems, :toolchains, :gem_dir_to_repo_url
- attr_writer :enable_bintest, :enable_test
alias libmruby libmruby_objs
diff --git a/src/codedump.c b/src/codedump.c
index e70df3205..524f0b9e1 100644
--- a/src/codedump.c
+++ b/src/codedump.c
@@ -545,8 +545,10 @@ codedump_recur(mrb_state *mrb, const mrb_irep *irep)
int i;
codedump(mrb, irep);
- for (i=0; i<irep->rlen; i++) {
- codedump_recur(mrb, irep->reps[i]);
+ if (irep->reps) {
+ for (i=0; i<irep->rlen; i++) {
+ codedump_recur(mrb, irep->reps[i]);
+ }
}
}
#endif
diff --git a/src/hash.c b/src/hash.c
index b049111b6..b800a251a 100644
--- a/src/hash.c
+++ b/src/hash.c
@@ -29,8 +29,8 @@
*
* [HT]
* Hash Table Implementation. The structure of `Hash` that has IB and is
- * searched by hash table algorithm. It is used when `Hash` > 16. Collision
- * resolution strategy is open addressing method.
+ * searched by hash table algorithm. It is used when `Hash` size > 16.
+ * Collision resolution strategy is open addressing method.
*
* [size]
* The number of `Hash` entries (value of `Hash#size`).
@@ -1522,8 +1522,8 @@ mrb_hash_size(mrb_state *mrb, mrb_value hash)
/* 15.2.13.4.25 */
/*
* call-seq:
- * hsh.length -> fixnum
- * hsh.size -> fixnum
+ * hsh.length -> integer
+ * hsh.size -> integer
*
* Returns the number of key-value pairs in the hash.
*
@@ -1536,7 +1536,7 @@ static mrb_value
mrb_hash_size_m(mrb_state *mrb, mrb_value self)
{
mrb_int size = mrb_hash_size(mrb, self);
- return mrb_fixnum_value(size);
+ return mrb_int_value(mrb, size);
}
MRB_API mrb_bool
diff --git a/src/string.c b/src/string.c
index 2100f9b33..d8e06a1d3 100644
--- a/src/string.c
+++ b/src/string.c
@@ -2378,7 +2378,7 @@ mrb_str_len_to_inum(mrb_state *mrb, const char *str, size_t len, mrb_int base, i
if (p<pend) goto bad; /* trailing garbage */
}
- return mrb_fixnum_value(sign ? val : -val);
+ return mrb_int_value(mrb, sign ? val : -val);
nullbyte:
mrb_raise(mrb, E_ARGUMENT_ERROR, "string contains null byte");
/* not reached */