summaryrefslogtreecommitdiff
path: root/test/ruby/test_object.rb
diff options
context:
space:
mode:
Diffstat (limited to 'test/ruby/test_object.rb')
-rw-r--r--test/ruby/test_object.rb204
1 files changed, 163 insertions, 41 deletions
diff --git a/test/ruby/test_object.rb b/test/ruby/test_object.rb
index 7d00422629..53ae4fb110 100644
--- a/test/ruby/test_object.rb
+++ b/test/ruby/test_object.rb
@@ -280,6 +280,12 @@ class TestObject < Test::Unit::TestCase
assert_equal([:foo], k.private_methods(false))
end
+ class ToStrCounter
+ def initialize(str = "@foo") @str = str; @count = 0; end
+ def to_str; @count += 1; @str; end
+ def count; @count; end
+ end
+
def test_instance_variable_get
o = Object.new
o.instance_eval { @foo = :foo }
@@ -291,9 +297,7 @@ class TestObject < Test::Unit::TestCase
assert_raise(NameError) { o.instance_variable_get("bar") }
assert_raise(TypeError) { o.instance_variable_get(1) }
- n = Object.new
- def n.to_str; @count = defined?(@count) ? @count + 1 : 1; "@foo"; end
- def n.count; @count; end
+ n = ToStrCounter.new
assert_equal(:foo, o.instance_variable_get(n))
assert_equal(1, n.count)
end
@@ -308,9 +312,7 @@ class TestObject < Test::Unit::TestCase
assert_raise(NameError) { o.instance_variable_set("bar", 1) }
assert_raise(TypeError) { o.instance_variable_set(1, 1) }
- n = Object.new
- def n.to_str; @count = defined?(@count) ? @count + 1 : 1; "@foo"; end
- def n.count; @count; end
+ n = ToStrCounter.new
o.instance_variable_set(n, :bar)
assert_equal(:bar, o.instance_eval { @foo })
assert_equal(1, n.count)
@@ -327,9 +329,7 @@ class TestObject < Test::Unit::TestCase
assert_raise(NameError) { o.instance_variable_defined?("bar") }
assert_raise(TypeError) { o.instance_variable_defined?(1) }
- n = Object.new
- def n.to_str; @count = defined?(@count) ? @count + 1 : 1; "@foo"; end
- def n.count; @count; end
+ n = ToStrCounter.new
assert_equal(true, o.instance_variable_defined?(n))
assert_equal(1, n.count)
end
@@ -356,38 +356,43 @@ class TestObject < Test::Unit::TestCase
end
def test_remove_instance_variable_re_embed
- require "objspace"
-
- c = Class.new do
- def a = @a
-
- def b = @b
-
- def c = @c
- end
-
- o1 = c.new
- o2 = c.new
-
- o1.instance_variable_set(:@foo, 5)
- o1.instance_variable_set(:@a, 0)
- o1.instance_variable_set(:@b, 1)
- o1.instance_variable_set(:@c, 2)
- refute_includes ObjectSpace.dump(o1), '"embedded":true'
- o1.remove_instance_variable(:@foo)
- assert_includes ObjectSpace.dump(o1), '"embedded":true'
-
- o2.instance_variable_set(:@a, 0)
- o2.instance_variable_set(:@b, 1)
- o2.instance_variable_set(:@c, 2)
- assert_includes ObjectSpace.dump(o2), '"embedded":true'
-
- assert_equal(0, o1.a)
- assert_equal(1, o1.b)
- assert_equal(2, o1.c)
- assert_equal(0, o2.a)
- assert_equal(1, o2.b)
- assert_equal(2, o2.c)
+ assert_separately(%w[-robjspace], "#{<<~"begin;"}\n#{<<~'end;'}")
+ begin;
+ # Determine the RVALUE pool's embed capacity from GC constants.
+ rvalue_size = GC::INTERNAL_CONSTANTS[:RVALUE_SIZE]
+ rbasic_size = GC::INTERNAL_CONSTANTS[:RBASIC_SIZE]
+ embed_cap = (rvalue_size - rbasic_size) / RbConfig::SIZEOF["void*"]
+
+ # Build a class whose initialize sets embed_cap ivars so objects
+ # are allocated in the RVALUE pool with embedded storage.
+ init_body = embed_cap.times.map { |i| "@v#{i} = nil" }.join("; ")
+ c = Class.new { class_eval("def initialize; #{init_body}; end") }
+
+ o1 = c.new
+ o2 = c.new
+
+ # All embed_cap ivars fit - should be embedded
+ embed_cap.times { |i| o1.instance_variable_set(:"@v#{i}", i) }
+ assert_includes ObjectSpace.dump(o1), '"embedded":true'
+
+ # One more ivar overflows embed capacity
+ o1.instance_variable_set(:@overflow, 99)
+ refute_includes ObjectSpace.dump(o1), '"embedded":true'
+
+ # Remove the overflow ivar - should re-embed
+ o1.remove_instance_variable(:@overflow)
+ assert_includes ObjectSpace.dump(o1), '"embedded":true'
+
+ # An object that never overflowed is also embedded
+ embed_cap.times { |i| o2.instance_variable_set(:"@v#{i}", i) }
+ assert_includes ObjectSpace.dump(o2), '"embedded":true'
+
+ # Verify values survived re-embedding
+ embed_cap.times do |i|
+ assert_equal(i, o1.instance_variable_get(:"@v#{i}"))
+ assert_equal(i, o2.instance_variable_get(:"@v#{i}"))
+ end
+ end;
end
def test_convert_string
@@ -950,6 +955,82 @@ class TestObject < Test::Unit::TestCase
assert_match(/\bInspect\u{3042}:.* @\u{3044}=42\b/, x.inspect)
x.instance_variable_set("@\u{3046}".encode(Encoding::EUC_JP), 6)
assert_match(/@\u{3046}=6\b/, x.inspect)
+
+ x = Object.new
+ x.singleton_class.class_eval do
+ private def instance_variables_to_inspect = [:@host, :@user]
+ end
+
+ x.instance_variable_set(:@host, "localhost")
+ x.instance_variable_set(:@user, "root")
+ x.instance_variable_set(:@password, "hunter2")
+ s = x.inspect
+ assert_include(s, "@host=\"localhost\"")
+ assert_include(s, "@user=\"root\"")
+ assert_not_include(s, "@password=")
+ end
+
+ def test_inspect_mutating_ivar
+ obj = Object.new
+ evil = Object.new
+ evil.define_singleton_method(:inspect) do
+ obj.instance_variables.each { |v| obj.remove_instance_variable(v) }
+ "evil"
+ end
+ obj.instance_variable_set(:@evil, evil)
+ 10.times { |i| obj.instance_variable_set(:"@v#{i}", 0) }
+ # Buffered iteration: inspect sees a snapshot of the original ivars
+ result = obj.inspect
+ assert_include result, "@evil=evil"
+ 10.times { |i| assert_include result, "@v#{i}=0" }
+ end
+
+ def test_inspect_mutating_ivar_complex
+ # Force complex by creating many shape variations on the same class
+ c = Class.new
+ 50.times do |i|
+ o = c.new
+ o.instance_variable_set(:"@unique_#{i}", 0)
+ end
+
+ obj = c.new
+ evil = Object.new
+ evil.define_singleton_method(:inspect) do
+ obj.instance_variables.each { |v| obj.remove_instance_variable(v) }
+ ""
+ end
+ obj.instance_variable_set(:@evil, evil)
+ 10.times { |i| obj.instance_variable_set(:"@v#{i}", 0) }
+ # complex objects use st_foreach which handles mutation gracefully
+ obj.inspect
+ end
+
+ def test_inspect_complex
+ kernel_inspect = Kernel.instance_method(:inspect)
+
+ klasses = [
+ Class.new,
+ Class.new(String),
+ Class.new(Array),
+ Class.new(Hash),
+ Struct.new(:x),
+ Class.new(Thread::Mutex),
+ # It's very difficult to get a complex T_CLASS, so that isn't tested here
+ ]
+
+ klasses.each_with_index do |klass, idx|
+ 8.times do |i|
+ klass.new.instance_variable_set(:"@sib_#{rand(999999)}", 1)
+ end
+
+ obj = klass.new
+ obj.instance_variable_set(:@a, 1)
+ obj.instance_variable_set(:@b, 2)
+
+ s = kernel_inspect.bind_call(obj)
+ assert_include(s, "@a=1")
+ assert_include(s, "@b=2")
+ end
end
def test_singleton_methods
@@ -1009,6 +1090,47 @@ class TestObject < Test::Unit::TestCase
assert_predicate(ys, :frozen?, '[Bug #19169]')
end
+ def test_singleton_class_of_singleton_class_freeze
+ x = Object.new
+ xs = x.singleton_class
+ xxs = xs.singleton_class
+ xxxs = xxs.singleton_class
+ x.freeze
+ assert_predicate(xs, :frozen?, '[Bug #20319]')
+ assert_predicate(xxs, :frozen?, '[Bug #20319]')
+ assert_predicate(xxxs, :frozen?, '[Bug #20319]')
+
+ y = Object.new
+ ys = y.singleton_class
+ ys.prepend(Module.new)
+ yys = ys.singleton_class
+ yys.prepend(Module.new)
+ yyys = yys.singleton_class
+ yyys.prepend(Module.new)
+ y.freeze
+ assert_predicate(ys, :frozen?, '[Bug #20319]')
+ assert_predicate(yys, :frozen?, '[Bug #20319]')
+ assert_predicate(yyys, :frozen?, '[Bug #20319]')
+
+ c = Class.new
+ cs = c.singleton_class
+ ccs = cs.singleton_class
+ cccs = ccs.singleton_class
+ d = Class.new(c)
+ ds = d.singleton_class
+ dds = ds.singleton_class
+ ddds = dds.singleton_class
+ d.freeze
+ assert_predicate(d, :frozen?, '[Bug #20319]')
+ assert_predicate(ds, :frozen?, '[Bug #20319]')
+ assert_predicate(dds, :frozen?, '[Bug #20319]')
+ assert_predicate(ddds, :frozen?, '[Bug #20319]')
+ assert_not_predicate(c, :frozen?, '[Bug #20319]')
+ assert_not_predicate(cs, :frozen?, '[Bug #20319]')
+ assert_not_predicate(ccs, :frozen?, '[Bug #20319]')
+ assert_not_predicate(cccs, :frozen?, '[Bug #20319]')
+ end
+
def test_redef_method_missing
bug5473 = '[ruby-core:40287]'
['ArgumentError.new("bug5473")', 'ArgumentError, "bug5473"', '"bug5473"'].each do |code|
p_pentomino.rb?h=v2_0_0_preview1&id2=3ed1979de25fad04b2b74bd4e4de13d7edd94b3d'>benchmark/bm_app_pentomino.rb259
-rw-r--r--benchmark/bm_app_raise.rb8
-rw-r--r--benchmark/bm_app_strconcat.rb5
-rw-r--r--benchmark/bm_app_tak.rb13
-rw-r--r--benchmark/bm_app_tarai.rb10
-rw-r--r--benchmark/bm_app_uri.rb8
-rw-r--r--benchmark/bm_io_file_create.rb13
-rw-r--r--benchmark/bm_io_file_read.rb15
-rw-r--r--benchmark/bm_io_file_write.rb14
-rw-r--r--benchmark/bm_io_select.rb9
-rw-r--r--benchmark/bm_io_select2.rb22
-rw-r--r--benchmark/bm_io_select3.rb21
-rw-r--r--benchmark/bm_loop_for.rb3
-rw-r--r--benchmark/bm_loop_generator.rb14
-rw-r--r--benchmark/bm_loop_times.rb1
-rw-r--r--benchmark/bm_loop_whileloop.rb4
-rw-r--r--benchmark/bm_loop_whileloop2.rb4
-rw-r--r--benchmark/bm_so_ackermann.rb19
-rw-r--r--benchmark/bm_so_array.rb23
-rw-r--r--benchmark/bm_so_binary_trees.rb57
-rw-r--r--benchmark/bm_so_concatenate.rb18
-rw-r--r--benchmark/bm_so_count_words.rb19
-rw-r--r--benchmark/bm_so_exception.rb61
-rw-r--r--benchmark/bm_so_fannkuch.rb45
-rw-r--r--benchmark/bm_so_fasta.rb81
-rw-r--r--benchmark/bm_so_k_nucleotide.rb48
-rw-r--r--benchmark/bm_so_lists.rb47
-rw-r--r--benchmark/bm_so_mandelbrot.rb57
-rw-r--r--benchmark/bm_so_matrix.rb48
-rw-r--r--benchmark/bm_so_meteor_contest.rb564
-rw-r--r--benchmark/bm_so_nbody.rb148
-rw-r--r--benchmark/bm_so_nested_loop.rb24
-rw-r--r--benchmark/bm_so_nsieve.rb35
-rw-r--r--benchmark/bm_so_nsieve_bits.rb42
-rw-r--r--benchmark/bm_so_object.rb56
-rw-r--r--benchmark/bm_so_partial_sums.rb31
-rw-r--r--benchmark/bm_so_pidigits.rb92
-rw-r--r--benchmark/bm_so_random.rb20
-rw-r--r--benchmark/bm_so_reverse_complement.rb30
-rw-r--r--benchmark/bm_so_sieve.rb24
-rw-r--r--benchmark/bm_so_spectralnorm.rb50
-rw-r--r--benchmark/bm_vm1_attr_ivar.rb14
-rw-r--r--benchmark/bm_vm1_attr_ivar_set.rb14
-rw-r--r--benchmark/bm_vm1_block.rb10
-rw-r--r--benchmark/bm_vm1_const.rb8
-rw-r--r--benchmark/bm_vm1_ensure.rb11
-rw-r--r--benchmark/bm_vm1_float_simple.rb7
-rw-r--r--benchmark/bm_vm1_ivar.rb8
-rw-r--r--benchmark/bm_vm1_ivar_set.rb6
-rw-r--r--benchmark/bm_vm1_length.rb9
-rw-r--r--benchmark/bm_vm1_lvar_init.rb18
-rw-r--r--benchmark/bm_vm1_lvar_set.rb5
-rw-r--r--benchmark/bm_vm1_neq.rb8
-rw-r--r--benchmark/bm_vm1_not.rb7
-rw-r--r--benchmark/bm_vm1_rescue.rb7
-rw-r--r--benchmark/bm_vm1_simplereturn.rb9
-rw-r--r--benchmark/bm_vm1_swap.rb8
-rw-r--r--benchmark/bm_vm1_yield.rb10
-rw-r--r--benchmark/bm_vm2_array.rb5
-rw-r--r--benchmark/bm_vm2_bigarray.rb106
-rw-r--r--benchmark/bm_vm2_bighash.rb5
-rw-r--r--benchmark/bm_vm2_case.rb14
-rw-r--r--benchmark/bm_vm2_defined_method.rb9
-rw-r--r--benchmark/bm_vm2_dstr.rb6
-rw-r--r--benchmark/bm_vm2_eval.rb6
-rw-r--r--benchmark/bm_vm2_method.rb9
-rw-r--r--benchmark/bm_vm2_method_missing.rb12
-rw-r--r--benchmark/bm_vm2_method_with_block.rb9
-rw-r--r--benchmark/bm_vm2_mutex.rb9
-rw-r--r--benchmark/bm_vm2_poly_method.rb20
-rw-r--r--benchmark/bm_vm2_poly_method_ov.rb20
-rw-r--r--benchmark/bm_vm2_proc.rb14
-rw-r--r--benchmark/bm_vm2_raise1.rb18
-rw-r--r--benchmark/bm_vm2_raise2.rb18
-rw-r--r--benchmark/bm_vm2_regexp.rb6
-rw-r--r--benchmark/bm_vm2_send.rb12
-rw-r--r--benchmark/bm_vm2_super.rb20
-rw-r--r--benchmark/bm_vm2_unif1.rb8
-rw-r--r--benchmark/bm_vm2_zsuper.rb20
-rw-r--r--benchmark/bm_vm3_backtrace.rb22
-rw-r--r--benchmark/bm_vm3_clearmethodcache.rb8
-rwxr-xr-xbenchmark/bm_vm3_gc.rb7
-rw-r--r--benchmark/bm_vm_thread_alive_check1.rb6
-rw-r--r--benchmark/bm_vm_thread_create_join.rb6
-rw-r--r--benchmark/bm_vm_thread_mutex1.rb21
-rw-r--r--benchmark/bm_vm_thread_mutex2.rb21
-rw-r--r--benchmark/bm_vm_thread_mutex3.rb20
-rw-r--r--benchmark/bm_vm_thread_pass.rb15
-rw-r--r--benchmark/bm_vm_thread_pass_flood.rb8
-rw-r--r--benchmark/bm_vm_thread_pipe.rb17
-rw-r--r--benchmark/driver.rb298
-rw-r--r--benchmark/make_fasta_output.rb19
-rw-r--r--benchmark/other-lang/ack.pl11
-rw-r--r--benchmark/other-lang/ack.py16
-rw-r--r--benchmark/other-lang/ack.rb12
-rw-r--r--benchmark/other-lang/ack.scm7
-rw-r--r--benchmark/other-lang/eval.rb66
-rw-r--r--benchmark/other-lang/fact.pl13
-rw-r--r--benchmark/other-lang/fact.py18
-rw-r--r--benchmark/other-lang/fact.rb13
-rw-r--r--benchmark/other-lang/fact.scm8
-rw-r--r--benchmark/other-lang/fib.pl11
-rw-r--r--benchmark/other-lang/fib.py7
-rw-r--r--benchmark/other-lang/fib.rb9
-rw-r--r--benchmark/other-lang/fib.scm7
-rw-r--r--benchmark/other-lang/loop.pl3
-rw-r--r--benchmark/other-lang/loop.py2
-rw-r--r--benchmark/other-lang/loop.rb4
-rw-r--r--benchmark/other-lang/loop.scm1
-rw-r--r--benchmark/other-lang/loop2.rb1
-rw-r--r--benchmark/other-lang/tak.pl11
-rw-r--r--benchmark/other-lang/tak.py8
-rw-r--r--benchmark/other-lang/tak.rb13
-rw-r--r--benchmark/other-lang/tak.scm10
-rw-r--r--benchmark/prepare_so_count_words.rb15
-rw-r--r--benchmark/prepare_so_k_nucleotide.rb2
-rw-r--r--benchmark/prepare_so_reverse_complement.rb2
-rw-r--r--benchmark/report.rb79
-rw-r--r--benchmark/run.rb127
-rw-r--r--benchmark/runc.rb27
-rw-r--r--benchmark/wc.input.base25
-rw-r--r--bignum.c3645
-rwxr-xr-xbin/erb155
-rwxr-xr-xbin/gem25
-rwxr-xr-xbin/irb20
-rwxr-xr-xbin/rake32
-rwxr-xr-xbin/rdoc42
-rwxr-xr-xbin/ri12
-rwxr-xr-xbin/testrb10
-rw-r--r--bootstraptest/pending.rb39
-rwxr-xr-xbootstraptest/runner.rb474
-rw-r--r--bootstraptest/test_attr.rb36
-rw-r--r--bootstraptest/test_autoload.rb110
-rw-r--r--bootstraptest/test_block.rb599
-rw-r--r--bootstraptest/test_class.rb159
-rw-r--r--bootstraptest/test_eval.rb324
-rw-r--r--bootstraptest/test_exception.rb432
-rw-r--r--bootstraptest/test_finalizer.rb8
-rw-r--r--bootstraptest/test_flip.rb1
-rw-r--r--bootstraptest/test_flow.rb551
-rw-r--r--bootstraptest/test_fork.rb69
-rw-r--r--bootstraptest/test_gc.rb34
-rw-r--r--bootstraptest/test_io.rb106
-rw-r--r--bootstraptest/test_jump.rb308
-rw-r--r--bootstraptest/test_literal.rb224
-rw-r--r--bootstraptest/test_load.rb27
-rw-r--r--bootstraptest/test_marshal.rb5
-rw-r--r--bootstraptest/test_massign.rb183
-rw-r--r--bootstraptest/test_method.rb1206
-rw-r--r--bootstraptest/test_objectspace.rb46
-rw-r--r--bootstraptest/test_proc.rb458
-rw-r--r--bootstraptest/test_struct.rb5
-rw-r--r--bootstraptest/test_syntax.rb902
-rw-r--r--bootstraptest/test_thread.rb454
-rw-r--r--class.c1644
-rw-r--r--common.mk1015
-rw-r--r--compar.c172
-rw-r--r--compile.c5756
-rw-r--r--complex.c2030
-rw-r--r--config.guess1116
-rw-r--r--config.sub1228
-rw-r--r--configure.in3625
-rw-r--r--constant.h36
-rw-r--r--cont.c1572
-rw-r--r--cygwin/GNUmakefile.in105
-rw-r--r--debug.c162
-rw-r--r--debug.h41
-rw-r--r--defines.h84
-rw-r--r--defs/default_gems5
-rw-r--r--defs/keywords53
-rw-r--r--defs/known_errors.def145
-rw-r--r--defs/lex.c.src53
-rw-r--r--defs/opt_insn_unif.def29
-rw-r--r--defs/opt_operand.def59
-rw-r--r--dir.c2271
-rw-r--r--djgpp/README.djgpp21
-rw-r--r--djgpp/config.hin72
-rw-r--r--djgpp/config.sed80
-rw-r--r--djgpp/configure.bat21
-rw-r--r--djgpp/mkver.sed1
-rw-r--r--dln.c853
-rw-r--r--dln.h37
-rw-r--r--dln_find.c312
-rw-r--r--dmydln.c9
-rw-r--r--dmyencoding.c2
-rw-r--r--dmyext.c7
-rw-r--r--dmyversion.c2
-rw-r--r--doc/ChangeLog-1.8.024350
-rw-r--r--doc/ChangeLog-1.9.392772
-rw-r--r--doc/ChangeLog-YARV6917
-rw-r--r--doc/NEWS-1.8.7648
-rw-r--r--doc/NEWS-1.9.1422
-rw-r--r--doc/NEWS-1.9.2499
-rw-r--r--doc/NEWS-1.9.3304
-rw-r--r--doc/etc.rd75
-rw-r--r--doc/etc.rd.ja75
-rw-r--r--doc/forwardable.rd83
-rw-r--r--doc/forwardable.rd.ja80
-rw-r--r--doc/images/boottime-classes.pngbin0 -> 28677 bytes-rw-r--r--doc/irb/irb-tools.rd.ja184
-rw-r--r--doc/irb/irb.rd391
-rw-r--r--doc/irb/irb.rd.ja412
-rw-r--r--doc/pty/README84
-rw-r--r--doc/pty/README.expect (renamed from ext/pty/README.expect)0
-rw-r--r--doc/pty/README.expect.ja21
-rw-r--r--doc/pty/README.ja76
-rw-r--r--doc/rake/CHANGES440
-rw-r--r--doc/rake/README196
-rw-r--r--doc/rake/command_line_usage.rdoc102
-rw-r--r--doc/rake/example/Rakefile138
-rw-r--r--doc/rake/example/Rakefile235
-rw-r--r--doc/rake/example/a.c6
-rw-r--r--doc/rake/example/b.c6
-rw-r--r--doc/rake/example/main.c11
-rw-r--r--doc/rake/glossary.rdoc51
-rw-r--r--doc/rake/jamis.rb591
-rw-r--r--doc/rake/proto_rake.rdoc127
-rw-r--r--doc/rake/rakefile.rdoc534
-rw-r--r--doc/rake/rational.rdoc151
-rw-r--r--doc/rake/release_notes/rake-0.8.7.rdoc55
-rw-r--r--doc/re.rdoc653
-rw-r--r--doc/rubygems/ChangeLog5689
-rw-r--r--doc/rubygems/History.txt852
-rw-r--r--doc/rubygems/LICENSE.txt53
-rw-r--r--doc/rubygems/README41
-rw-r--r--doc/shell.rd347
-rw-r--r--doc/shell.rd.ja335
-rw-r--r--enc/Makefile.in81
-rw-r--r--enc/ascii.c96
-rw-r--r--enc/big5.c373
-rw-r--r--enc/cp949.c221
-rw-r--r--enc/depend157
-rw-r--r--enc/emacs_mule.c341
-rw-r--r--enc/encdb.c29
-rw-r--r--enc/encinit.c.erb26
-rw-r--r--enc/euc_jp.c644
-rw-r--r--enc/euc_kr.c194
-rw-r--r--enc/euc_tw.c227
-rw-r--r--enc/gb18030.c603
-rw-r--r--enc/gb2312.c13
-rw-r--r--enc/gbk.c224
-rw-r--r--enc/iso_2022_jp.h47
-rw-r--r--enc/iso_8859_1.c289
-rw-r--r--enc/iso_8859_10.c246
-rw-r--r--enc/iso_8859_11.c113
-rw-r--r--enc/iso_8859_13.c245
-rw-r--r--enc/iso_8859_14.c248
-rw-r--r--enc/iso_8859_15.c242
-rw-r--r--enc/iso_8859_16.c244
-rw-r--r--enc/iso_8859_2.c254
-rw-r--r--enc/iso_8859_3.c242
-rw-r--r--enc/iso_8859_4.c244
-rw-r--r--enc/iso_8859_5.c232
-rw-r--r--enc/iso_8859_6.c109
-rw-r--r--enc/iso_8859_7.c239
-rw-r--r--enc/iso_8859_8.c109
-rw-r--r--enc/iso_8859_9.c245
-rw-r--r--enc/koi8_r.c221
-rw-r--r--enc/koi8_u.c223
-rwxr-xr-xenc/make_encmake.rb136
-rw-r--r--enc/mktable.c1162
-rw-r--r--enc/prelude.rb6
-rw-r--r--enc/shift_jis.c614
-rw-r--r--enc/trans/CP/CP932UDA%UCS.src1912
-rw-r--r--enc/trans/CP/CP932VDC@IBM%UCS.src420
-rw-r--r--enc/trans/CP/CP932VDC@NEC_IBM%UCS.src406
-rw-r--r--enc/trans/CP/UCS%CP932UDA.src1912
-rw-r--r--enc/trans/CP/UCS%CP932VDC@IBM.src420
-rw-r--r--enc/trans/CP/UCS%CP932VDC@NEC_IBM.src406
-rw-r--r--enc/trans/EMOJI/EMOJI_ISO-2022-JP-KDDI%UCS.src658
-rw-r--r--enc/trans/EMOJI/EMOJI_SHIFT_JIS-DOCOMO%UCS.src293
-rw-r--r--enc/trans/EMOJI/EMOJI_SHIFT_JIS-KDDI%UCS.src658
-rw-r--r--enc/trans/EMOJI/EMOJI_SHIFT_JIS-KDDI-UNDOC%UCS.src658
-rw-r--r--enc/trans/EMOJI/EMOJI_SHIFT_JIS-SOFTBANK%UCS.src496
-rw-r--r--enc/trans/EMOJI/UCS%EMOJI_ISO-2022-JP-KDDI-UNDOC.src658
-rw-r--r--enc/trans/EMOJI/UCS%EMOJI_ISO-2022-JP-KDDI.src658
-rw-r--r--enc/trans/EMOJI/UCS%EMOJI_SHIFT_JIS-DOCOMO.src293
-rw-r--r--enc/trans/EMOJI/UCS%EMOJI_SHIFT_JIS-KDDI-UNDOC.src658
-rw-r--r--enc/trans/EMOJI/UCS%EMOJI_SHIFT_JIS-KDDI.src658
-rw-r--r--enc/trans/EMOJI/UCS%EMOJI_SHIFT_JIS-SOFTBANK.src496
-rw-r--r--enc/trans/GB/GB12345%UCS.src7618
-rw-r--r--enc/trans/GB/GB2312%UCS.src7535
-rw-r--r--enc/trans/GB/UCS%GB12345.src7620
-rw-r--r--enc/trans/GB/UCS%GB2312.src7531
-rw-r--r--enc/trans/JIS/JISX0201-KANA%UCS.src127
-rw-r--r--enc/trans/JIS/JISX0208@1990%UCS.src6972
-rw-r--r--enc/trans/JIS/JISX0208@MS%UCS.src6893
-rw-r--r--enc/trans/JIS/JISX0208UDC%UCS.src954
-rw-r--r--enc/trans/JIS/JISX0208VDC@NEC%UCS.src97
-rw-r--r--enc/trans/JIS/JISX0212%UCS.src6167
-rw-r--r--enc/trans/JIS/JISX0212@MS%UCS.src6081
-rw-r--r--enc/trans/JIS/JISX0212UDC%UCS.src954
-rw-r--r--enc/trans/JIS/JISX0212VDC@IBM%UCS.src120
-rw-r--r--enc/trans/JIS/JISX0213-1%UCS@BMP.src1926
-rw-r--r--enc/trans/JIS/JISX0213-1%UCS@SIP.src60
-rw-r--r--enc/trans/JIS/JISX0213-2%UCS@BMP.src2193
-rw-r--r--enc/trans/JIS/JISX0213-2%UCS@SIP.src311
-rw-r--r--enc/trans/JIS/UCS%JISX0201-KANA.src127
-rw-r--r--enc/trans/JIS/UCS%JISX0208@1990.src6974
-rw-r--r--enc/trans/JIS/UCS%JISX0208@MS.src6894
-rw-r--r--enc/trans/JIS/UCS%JISX0208UDC.src955
-rw-r--r--enc/trans/JIS/UCS%JISX0208VDC@NEC.src98
-rw-r--r--enc/trans/JIS/UCS%JISX0212.src6170
-rw-r--r--enc/trans/JIS/UCS%JISX0212@MS.src6082
-rw-r--r--enc/trans/JIS/UCS%JISX0212UDC.src955
-rw-r--r--enc/trans/JIS/UCS%JISX0212VDC@IBM.src121
-rw-r--r--enc/trans/JIS/UCS@BMP%JISX0213-1.src1922
-rw-r--r--enc/trans/JIS/UCS@BMP%JISX0213-2.src2189
-rw-r--r--enc/trans/JIS/UCS@SIP%JISX0213-1.src56
-rw-r--r--enc/trans/JIS/UCS@SIP%JISX0213-2.src307
-rw-r--r--enc/trans/big5-hkscs-tbl.rb37302
-rw-r--r--enc/trans/big5-uao-tbl.rb19784
-rw-r--r--enc/trans/big5.trans32
-rw-r--r--enc/trans/chinese.trans31
-rw-r--r--enc/trans/cp850-tbl.rb130
-rw-r--r--enc/trans/cp852-tbl.rb130
-rw-r--r--enc/trans/cp855-tbl.rb130
-rw-r--r--enc/trans/cp949-tbl.rb8831
-rw-r--r--enc/trans/emoji-exchange-tbl.rb8407
-rw-r--r--enc/trans/emoji.trans36
-rw-r--r--enc/trans/emoji_iso2022_kddi.trans216
-rw-r--r--enc/trans/emoji_sjis_docomo.trans32
-rw-r--r--enc/trans/emoji_sjis_kddi.trans33
-rw-r--r--enc/trans/emoji_sjis_softbank.trans32
-rw-r--r--enc/trans/escape.trans93
-rw-r--r--enc/trans/euckr-tbl.rb8228
-rw-r--r--enc/trans/gb18030-tbl.rb63362
-rw-r--r--enc/trans/gb18030.trans183
-rw-r--r--enc/trans/gbk-tbl.rb21794
-rw-r--r--enc/trans/gbk.trans15
-rw-r--r--enc/trans/ibm437-tbl.rb130
-rw-r--r--enc/trans/ibm737-tbl.rb130
-rw-r--r--enc/trans/ibm775-tbl.rb130
-rw-r--r--enc/trans/ibm852-tbl.rb130
-rw-r--r--enc/trans/ibm855-tbl.rb130
-rw-r--r--enc/trans/ibm857-tbl.rb127
-rw-r--r--enc/trans/ibm860-tbl.rb130
-rw-r--r--enc/trans/ibm861-tbl.rb130
-rw-r--r--enc/trans/ibm862-tbl.rb130
-rw-r--r--enc/trans/ibm863-tbl.rb130
-rw-r--r--enc/trans/ibm865-tbl.rb130
-rw-r--r--enc/trans/ibm866-tbl.rb130
-rw-r--r--enc/trans/ibm869-tbl.rb121
-rw-r--r--enc/trans/iso-8859-1-tbl.rb98
-rw-r--r--enc/trans/iso-8859-10-tbl.rb98
-rw-r--r--enc/trans/iso-8859-11-tbl.rb90
-rw-r--r--enc/trans/iso-8859-13-tbl.rb98
-rw-r--r--enc/trans/iso-8859-14-tbl.rb98
-rw-r--r--enc/trans/iso-8859-15-tbl.rb98
-rw-r--r--enc/trans/iso-8859-16-tbl.rb98
-rw-r--r--enc/trans/iso-8859-2-tbl.rb98
-rw-r--r--enc/trans/iso-8859-3-tbl.rb91
-rw-r--r--enc/trans/iso-8859-4-tbl.rb98
-rw-r--r--enc/trans/iso-8859-5-tbl.rb98
-rw-r--r--enc/trans/iso-8859-6-tbl.rb53
-rw-r--r--enc/trans/iso-8859-7-tbl.rb95
-rw-r--r--enc/trans/iso-8859-8-tbl.rb62
-rw-r--r--enc/trans/iso-8859-9-tbl.rb98
-rw-r--r--enc/trans/iso2022.trans567
-rw-r--r--enc/trans/japanese.trans97
-rw-r--r--enc/trans/japanese_euc.trans57
-rw-r--r--enc/trans/japanese_sjis.trans33
-rw-r--r--enc/trans/koi8-r-tbl.rb130
-rw-r--r--enc/trans/koi8-u-tbl.rb130
-rw-r--r--enc/trans/korean.trans18
-rw-r--r--enc/trans/maccroatian-tbl.rb129
-rw-r--r--enc/trans/maccyrillic-tbl.rb130
-rw-r--r--enc/trans/macgreek-tbl.rb129
-rw-r--r--enc/trans/maciceland-tbl.rb129
-rw-r--r--enc/trans/macroman-tbl.rb129
-rw-r--r--enc/trans/macromania-tbl.rb129
-rw-r--r--enc/trans/macturkish-tbl.rb128
-rw-r--r--enc/trans/macukraine-tbl.rb130
-rw-r--r--enc/trans/newline.trans135
-rw-r--r--enc/trans/single_byte.trans91
-rw-r--r--enc/trans/tis-620-tbl.rb89
-rw-r--r--enc/trans/transdb.c18
-rw-r--r--enc/trans/ucm/glibc-BIG5-2.3.3.ucm14087
-rw-r--r--enc/trans/ucm/glibc-BIG5HKSCS-2.3.3.ucm18332
-rw-r--r--enc/trans/ucm/windows-950-2000.ucm20379
-rw-r--r--enc/trans/ucm/windows-950_hkscs-2001.ucm23446
-rw-r--r--enc/trans/utf8_mac-tbl.rb945
-rw-r--r--enc/trans/utf8_mac.trans241
-rw-r--r--enc/trans/utf_16_32.trans556
-rw-r--r--enc/trans/windows-1250-tbl.rb125
-rw-r--r--enc/trans/windows-1251-tbl.rb129
-rw-r--r--enc/trans/windows-1252-tbl.rb125
-rw-r--r--enc/trans/windows-1253-tbl.rb113
-rw-r--r--enc/trans/windows-1254-tbl.rb123
-rw-r--r--enc/trans/windows-1255-tbl.rb141
-rw-r--r--enc/trans/windows-1256-tbl.rb130
-rw-r--r--enc/trans/windows-1257-tbl.rb118
-rw-r--r--enc/trans/windows-874-tbl.rb99
-rw-r--r--enc/unicode.c680
-rw-r--r--enc/unicode/casefold.h2238
-rw-r--r--enc/unicode/name2ctype.h28722
-rw-r--r--enc/unicode/name2ctype.h.blt28722
-rw-r--r--enc/unicode/name2ctype.kwd26550
-rw-r--r--enc/unicode/name2ctype.src26550
-rw-r--r--enc/us_ascii.c33
-rw-r--r--enc/utf_16_32.h5
-rw-r--r--enc/utf_16be.c256
-rw-r--r--enc/utf_16le.c248
-rw-r--r--enc/utf_32be.c193
-rw-r--r--enc/utf_32le.c192
-rw-r--r--enc/utf_7.h5
-rw-r--r--enc/utf_8.c457
-rw-r--r--enc/windows_1251.c210
-rw-r--r--enc/windows_31j.c80
-rw-r--r--enc/x_emoji.h26
-rw-r--r--encoding.c1906
-rw-r--r--enum.c2677
-rw-r--r--enumerator.c1815
-rw-r--r--env.h60
-rw-r--r--error.c2566
-rw-r--r--eval.c9260
-rw-r--r--eval_error.c298
-rw-r--r--eval_intern.h236
-rw-r--r--eval_jump.c146
-rw-r--r--ext/-test-/array/resize/extconf.rb1
-rw-r--r--ext/-test-/array/resize/resize.c14
-rw-r--r--ext/-test-/bug-3571/bug.c23
-rw-r--r--ext/-test-/bug-3571/extconf.rb1
-rw-r--r--ext/-test-/bug-3662/bug.c16
-rw-r--r--ext/-test-/bug-3662/extconf.rb1
-rw-r--r--ext/-test-/bug-5832/bug.c14
-rw-r--r--ext/-test-/bug-5832/extconf.rb1
-rw-r--r--ext/-test-/exception/enc_raise.c15
-rw-r--r--ext/-test-/exception/extconf.rb6
-rw-r--r--ext/-test-/exception/init.c11
-rw-r--r--ext/-test-/funcall/extconf.rb2
-rw-r--r--ext/-test-/funcall/passing_block.c30
-rw-r--r--ext/-test-/iter/break.c16
-rw-r--r--ext/-test-/iter/extconf.rb1
-rw-r--r--ext/-test-/load/dot.dot/dot.dot.c1
-rw-r--r--ext/-test-/load/dot.dot/extconf.rb1
-rw-r--r--ext/-test-/marshal/compat/extconf.rb1
-rw-r--r--ext/-test-/marshal/compat/usrcompat.c32
-rw-r--r--ext/-test-/marshal/usr/extconf.rb1
-rw-r--r--ext/-test-/marshal/usr/usrmarshal.c35
-rw-r--r--ext/-test-/num2int/depend1
-rw-r--r--ext/-test-/num2int/extconf.rb1
-rw-r--r--ext/-test-/num2int/num2int.c120
-rw-r--r--ext/-test-/old_thread_select/depend2
-rw-r--r--ext/-test-/old_thread_select/extconf.rb4
-rw-r--r--ext/-test-/old_thread_select/old_thread_select.c75
-rw-r--r--ext/-test-/path_to_class/extconf.rb6
-rw-r--r--ext/-test-/path_to_class/path_to_class.c15
-rw-r--r--ext/-test-/printf/extconf.rb1
-rw-r--r--ext/-test-/printf/printf.c31
-rw-r--r--ext/-test-/st/numhash/extconf.rb1
-rw-r--r--ext/-test-/st/numhash/numhash.c120
-rw-r--r--ext/-test-/st/update/extconf.rb1
-rw-r--r--ext/-test-/st/update/update.c34
-rw-r--r--ext/-test-/string/coderange.c30
-rw-r--r--ext/-test-/string/cstr.c20
-rw-r--r--ext/-test-/string/ellipsize.c13
-rw-r--r--ext/-test-/string/enc_associate.c14
-rw-r--r--ext/-test-/string/enc_str_buf_cat.c14
-rw-r--r--ext/-test-/string/extconf.rb6
-rw-r--r--ext/-test-/string/init.c11
-rw-r--r--ext/-test-/string/modify.c22
-rw-r--r--ext/-test-/string/qsort.c61
-rw-r--r--ext/-test-/string/set_len.c14
-rw-r--r--ext/-test-/symbol/extconf.rb6
-rw-r--r--ext/-test-/symbol/init.c11
-rw-r--r--ext/-test-/symbol/intern.c14
-rw-r--r--ext/-test-/typeddata/extconf.rb1
-rw-r--r--ext/-test-/typeddata/typeddata.c20
-rw-r--r--ext/-test-/wait_for_single_fd/depend2
-rw-r--r--ext/-test-/wait_for_single_fd/extconf.rb1
-rw-r--r--ext/-test-/wait_for_single_fd/wait_for_single_fd.c30
-rw-r--r--ext/-test-/win32/dln/dlntest.c17
-rw-r--r--ext/-test-/win32/dln/extconf.rb36
-rw-r--r--ext/-test-/win32/dln/libdlntest.c4
-rw-r--r--ext/-test-/win32/dln/libdlntest.def2
-rw-r--r--ext/-test-/win32/fd_setsize/depend2
-rw-r--r--ext/-test-/win32/fd_setsize/extconf.rb3
-rw-r--r--ext/-test-/win32/fd_setsize/fd_setsize.c55
-rw-r--r--ext/.cvsignore1
-rw-r--r--ext/.document91
-rw-r--r--ext/Setup25
-rw-r--r--ext/Setup.atheos31
-rw-r--r--ext/Setup.dj15
-rw-r--r--ext/Setup.emx19
-rw-r--r--ext/Setup.nacl49
-rw-r--r--ext/Setup.nt24
-rw-r--r--ext/Setup.x6812
-rw-r--r--ext/Win32API/MANIFEST7
-rw-r--r--ext/Win32API/Win32API.c313
-rw-r--r--ext/Win32API/depend1
-rw-r--r--ext/Win32API/extconf.rb7
-rw-r--r--ext/Win32API/getch.rb5
-rw-r--r--ext/Win32API/point.rb18
-rw-r--r--ext/aix_mksym.rb33
-rw-r--r--ext/bigdecimal/README60
-rw-r--r--ext/bigdecimal/bigdecimal.c5956
-rw-r--r--ext/bigdecimal/bigdecimal.gemspec30
-rw-r--r--ext/bigdecimal/bigdecimal.h291
-rw-r--r--ext/bigdecimal/depend1
-rw-r--r--ext/bigdecimal/extconf.rb6
-rw-r--r--ext/bigdecimal/lib/bigdecimal/jacobian.rb88
-rw-r--r--ext/bigdecimal/lib/bigdecimal/ludcmp.rb88
-rw-r--r--ext/bigdecimal/lib/bigdecimal/math.rb205
-rw-r--r--ext/bigdecimal/lib/bigdecimal/newton.rb78
-rw-r--r--ext/bigdecimal/lib/bigdecimal/util.rb105
-rw-r--r--ext/bigdecimal/sample/linear.rb71
-rw-r--r--ext/bigdecimal/sample/nlsolve.rb38
-rw-r--r--ext/bigdecimal/sample/pi.rb20
-rw-r--r--ext/configsub.rb32
-rw-r--r--ext/continuation/continuation.c8
-rw-r--r--ext/continuation/extconf.rb3
-rw-r--r--ext/coverage/coverage.c109
-rw-r--r--ext/coverage/extconf.rb3
-rw-r--r--ext/curses/.cvsignore1
-rw-r--r--ext/curses/MANIFEST7
-rw-r--r--ext/curses/curses.c4131
-rw-r--r--ext/curses/depend2
-rw-r--r--ext/curses/extconf.rb119
-rw-r--r--ext/curses/hello.rb2
-rw-r--r--ext/curses/mouse.rb53
-rw-r--r--ext/curses/rain.rb2
-rw-r--r--ext/curses/view.rb12
-rw-r--r--ext/curses/view2.rb149
-rw-r--r--ext/date/date_core.c9804
-rw-r--r--ext/date/date_parse.c2990
-rw-r--r--ext/date/date_strftime.c629
-rw-r--r--ext/date/date_strptime.c699
-rw-r--r--ext/date/date_tmx.h56
-rw-r--r--ext/date/depend3
-rw-r--r--ext/date/extconf.rb2
-rw-r--r--ext/date/lib/date.rb61
-rw-r--r--ext/date/lib/date/format.rb1
-rw-r--r--ext/dbm/.cvsignore1
-rw-r--r--ext/dbm/MANIFEST4
-rw-r--r--ext/dbm/dbm.c958
-rw-r--r--ext/dbm/extconf.rb257
-rw-r--r--ext/digest/bubblebabble/bubblebabble.c142
-rw-r--r--ext/digest/bubblebabble/depend3
-rw-r--r--ext/digest/bubblebabble/extconf.rb6
-rw-r--r--ext/digest/defs.h19
-rw-r--r--ext/digest/depend2
-rw-r--r--ext/digest/digest.c708
-rw-r--r--ext/digest/digest.h32
-rw-r--r--ext/digest/extconf.rb10
-rw-r--r--ext/digest/lib/digest.rb88
-rw-r--r--ext/digest/lib/digest/hmac.rb302
-rw-r--r--ext/digest/md5/depend6
-rw-r--r--ext/digest/md5/extconf.rb27
-rw-r--r--ext/digest/md5/md5.c422
-rw-r--r--ext/digest/md5/md5.h80
-rw-r--r--ext/digest/md5/md5init.c43
-rw-r--r--ext/digest/md5/md5ossl.c9
-rw-r--r--ext/digest/md5/md5ossl.h13
-rw-r--r--ext/digest/rmd160/depend6
-rw-r--r--ext/digest/rmd160/extconf.rb26
-rw-r--r--ext/digest/rmd160/rmd160.c461
-rw-r--r--ext/digest/rmd160/rmd160.h56
-rw-r--r--ext/digest/rmd160/rmd160init.c43
-rw-r--r--ext/digest/rmd160/rmd160ossl.c8
-rw-r--r--ext/digest/rmd160/rmd160ossl.h19
-rw-r--r--ext/digest/sha1/depend6
-rw-r--r--ext/digest/sha1/extconf.rb26
-rw-r--r--ext/digest/sha1/sha1.c269
-rw-r--r--ext/digest/sha1/sha1.h39
-rw-r--r--ext/digest/sha1/sha1init.c43
-rw-r--r--ext/digest/sha1/sha1ossl.c10
-rw-r--r--ext/digest/sha1/sha1ossl.h20
-rw-r--r--ext/digest/sha2/depend6
-rw-r--r--ext/digest/sha2/extconf.rb32
-rw-r--r--ext/digest/sha2/lib/sha2.rb107
-rw-r--r--ext/digest/sha2/sha2.c1072
-rw-r--r--ext/digest/sha2/sha2.h225
-rw-r--r--ext/digest/sha2/sha2init.c56
-rw-r--r--ext/digest/sha2/sha2ossl.c13
-rw-r--r--ext/digest/sha2/sha2ossl.h17
-rw-r--r--ext/digest/test.sh30
-rw-r--r--ext/dl/callback/depend15
-rw-r--r--ext/dl/callback/extconf.rb14
-rw-r--r--ext/dl/callback/mkcallback.rb242
-rw-r--r--ext/dl/cfunc.c675
-rw-r--r--ext/dl/cptr.c673
-rw-r--r--ext/dl/depend7
-rw-r--r--ext/dl/dl.c573
-rw-r--r--ext/dl/dl.h217
-rw-r--r--ext/dl/extconf.rb43
-rw-r--r--ext/dl/handle.c430
-rw-r--r--ext/dl/lib/dl.rb13
-rw-r--r--ext/dl/lib/dl/callback.rb112
-rw-r--r--ext/dl/lib/dl/cparser.rb156
-rw-r--r--ext/dl/lib/dl/func.rb190
-rw-r--r--ext/dl/lib/dl/import.rb260
-rw-r--r--ext/dl/lib/dl/pack.rb128
-rw-r--r--ext/dl/lib/dl/stack.rb116
-rw-r--r--ext/dl/lib/dl/struct.rb236
-rw-r--r--ext/dl/lib/dl/types.rb71
-rw-r--r--ext/dl/lib/dl/value.rb114
-rw-r--r--ext/dl/win32/extconf.rb3
-rw-r--r--ext/dl/win32/lib/Win32API.rb30
-rw-r--r--ext/dl/win32/lib/win32/registry.rb845
-rw-r--r--ext/dl/win32/lib/win32/resolv.rb379
-rw-r--r--ext/dl/win32/lib/win32/sspi.rb330
-rw-r--r--ext/etc/.cvsignore1
-rw-r--r--ext/etc/MANIFEST6
-rw-r--r--ext/etc/depend2
-rw-r--r--ext/etc/etc.c597
-rw-r--r--ext/etc/etc.txt72
-rw-r--r--ext/etc/etc.txt.jp72
-rw-r--r--ext/etc/extconf.rb45
-rwxr-xr-xext/extmk.rb716
-rw-r--r--ext/extmk.rb.in755
-rw-r--r--ext/fcntl/.cvsignore1
-rw-r--r--ext/fcntl/MANIFEST3
-rw-r--r--ext/fcntl/extconf.rb2
-rw-r--r--ext/fcntl/fcntl.c84
-rw-r--r--ext/fiber/extconf.rb3
-rw-r--r--ext/fiber/fiber.c8
-rw-r--r--ext/fiddle/closure.c307
-rw-r--r--ext/fiddle/closure.h8
-rw-r--r--ext/fiddle/conversions.c141
-rw-r--r--ext/fiddle/conversions.h44
-rw-r--r--ext/fiddle/extconf.rb38
-rw-r--r--ext/fiddle/fiddle.c149
-rw-r--r--ext/fiddle/fiddle.h103
-rw-r--r--ext/fiddle/function.c217
-rw-r--r--ext/fiddle/function.h8
-rw-r--r--ext/fiddle/lib/fiddle.rb34
-rw-r--r--ext/fiddle/lib/fiddle/closure.rb48
-rw-r--r--ext/fiddle/lib/fiddle/function.rb6
-rw-r--r--ext/gdbm/.cvsignore1
-rw-r--r--ext/gdbm/MANIFEST5
-rw-r--r--ext/gdbm/gdbm.c1330
-rw-r--r--ext/io/console/console.c762
-rw-r--r--ext/io/console/extconf.rb20
-rw-r--r--ext/io/console/io-console.gemspec16
-rw-r--r--ext/io/console/lib/console/size.rb20
-rw-r--r--ext/io/nonblock/extconf.rb8
-rw-r--r--ext/io/nonblock/nonblock.c114
-rw-r--r--ext/io/wait/extconf.rb18
-rw-r--r--ext/io/wait/wait.c145
-rw-r--r--ext/json/extconf.rb3
-rw-r--r--ext/json/fbuffer/fbuffer.h164
-rw-r--r--ext/json/generator/depend1
-rw-r--r--ext/json/generator/extconf.rb4
-rw-r--r--ext/json/generator/generator.c1393
-rw-r--r--ext/json/generator/generator.h162
-rw-r--r--ext/json/lib/json.rb62
-rw-r--r--ext/json/lib/json/add/bigdecimal.rb21
-rw-r--r--ext/json/lib/json/add/complex.rb22
-rw-r--r--ext/json/lib/json/add/core.rb11
-rw-r--r--ext/json/lib/json/add/date.rb34
-rw-r--r--ext/json/lib/json/add/date_time.rb50
-rw-r--r--ext/json/lib/json/add/exception.rb31
-rw-r--r--ext/json/lib/json/add/ostruct.rb31
-rw-r--r--ext/json/lib/json/add/range.rb29
-rw-r--r--ext/json/lib/json/add/rational.rb22
-rw-r--r--ext/json/lib/json/add/regexp.rb30
-rw-r--r--ext/json/lib/json/add/struct.rb30
-rw-r--r--ext/json/lib/json/add/symbol.rb25
-rw-r--r--ext/json/lib/json/add/time.rb35
-rw-r--r--ext/json/lib/json/common.rb471
-rw-r--r--ext/json/lib/json/ext.rb21
-rw-r--r--ext/json/lib/json/generic_object.rb39
-rw-r--r--ext/json/lib/json/version.rb8
-rw-r--r--ext/json/parser/depend1
-rw-r--r--ext/json/parser/extconf.rb3
-rw-r--r--ext/json/parser/parser.c2204
-rw-r--r--ext/json/parser/parser.h77
-rw-r--r--ext/json/parser/parser.rl927
-rw-r--r--ext/json/parser/prereq.mk9
-rw-r--r--ext/mathn/complex/complex.c7
-rw-r--r--ext/mathn/complex/extconf.rb3
-rw-r--r--ext/mathn/rational/extconf.rb3
-rw-r--r--ext/mathn/rational/rational.c7
-rw-r--r--ext/md5/.cvsignore1
-rw-r--r--ext/md5/MANIFEST8
-rw-r--r--ext/md5/depend2
-rw-r--r--ext/md5/extconf.rb3
-rw-r--r--ext/md5/md5.h86
-rw-r--r--ext/md5/md5.txt49
-rw-r--r--ext/md5/md5.txt.jp49
-rw-r--r--ext/md5/md5c.c337
-rw-r--r--ext/md5/md5init.c114
-rw-r--r--ext/nkf/.cvsignore1
-rw-r--r--ext/nkf/MANIFEST7
-rw-r--r--ext/nkf/depend5
-rw-r--r--ext/nkf/lib/kconv.rb287
-rw-r--r--ext/nkf/nkf-utf8/config.h51
-rw-r--r--ext/nkf/nkf-utf8/nkf.c6728
-rw-r--r--ext/nkf/nkf-utf8/nkf.h192
-rw-r--r--ext/nkf/nkf-utf8/utf8tbl.c8754
-rw-r--r--ext/nkf/nkf-utf8/utf8tbl.h61
-rw-r--r--ext/nkf/nkf.c613
-rw-r--r--ext/nkf/nkf1.7/nkf.c1900
-rw-r--r--ext/nkf/test.rb318
-rw-r--r--ext/objspace/depend3
-rw-r--r--ext/objspace/extconf.rb2
-rw-r--r--ext/objspace/objspace.c800
-rw-r--r--ext/openssl/deprecation.rb21
-rw-r--r--ext/openssl/extconf.rb155
-rw-r--r--ext/openssl/lib/openssl.rb24
-rw-r--r--ext/openssl/lib/openssl/bn.rb35
-rw-r--r--ext/openssl/lib/openssl/buffering.rb449
-rw-r--r--ext/openssl/lib/openssl/cipher.rb65
-rw-r--r--ext/openssl/lib/openssl/config.rb313
-rw-r--r--ext/openssl/lib/openssl/digest.rb89
-rw-r--r--ext/openssl/lib/openssl/ssl.rb187
-rw-r--r--ext/openssl/lib/openssl/x509.rb162
-rw-r--r--ext/openssl/openssl_missing.c356
-rw-r--r--ext/openssl/openssl_missing.h198
-rw-r--r--ext/openssl/ossl.c1011
-rw-r--r--ext/openssl/ossl.h247
-rw-r--r--ext/openssl/ossl_asn1.c1951
-rw-r--r--ext/openssl/ossl_asn1.h59
-rw-r--r--ext/openssl/ossl_bio.c87
-rw-r--r--ext/openssl/ossl_bio.h21
-rw-r--r--ext/openssl/ossl_bn.c854
-rw-r--r--ext/openssl/ossl_bn.h25
-rw-r--r--ext/openssl/ossl_cipher.c754
-rw-r--r--ext/openssl/ossl_cipher.h22
-rw-r--r--ext/openssl/ossl_config.c74
-rw-r--r--ext/openssl/ossl_config.h22
-rw-r--r--ext/openssl/ossl_digest.c438
-rw-r--r--ext/openssl/ossl_digest.h22
-rw-r--r--ext/openssl/ossl_engine.c433
-rw-r--r--ext/openssl/ossl_engine.h20
-rw-r--r--ext/openssl/ossl_hmac.c270
-rw-r--r--ext/openssl/ossl_hmac.h19
-rw-r--r--ext/openssl/ossl_ns_spki.c389
-rw-r--r--ext/openssl/ossl_ns_spki.h21
-rw-r--r--ext/openssl/ossl_ocsp.c786
-rw-r--r--ext/openssl/ossl_ocsp.h24
-rw-r--r--ext/openssl/ossl_pkcs12.c212
-rw-r--r--ext/openssl/ossl_pkcs12.h15
-rw-r--r--ext/openssl/ossl_pkcs5.c189
-rw-r--r--ext/openssl/ossl_pkcs5.h6
-rw-r--r--ext/openssl/ossl_pkcs7.c1046
-rw-r--r--ext/openssl/ossl_pkcs7.h22
-rw-r--r--ext/openssl/ossl_pkey.c436
-rw-r--r--ext/openssl/ossl_pkey.h151
-rw-r--r--ext/openssl/ossl_pkey_dh.c665
-rw-r--r--ext/openssl/ossl_pkey_dsa.c621
-rw-r--r--ext/openssl/ossl_pkey_ec.c1677
-rw-r--r--ext/openssl/ossl_pkey_rsa.c700
-rw-r--r--ext/openssl/ossl_rand.c202
-rw-r--r--ext/openssl/ossl_rand.h20
-rw-r--r--ext/openssl/ossl_ssl.c2223
-rw-r--r--ext/openssl/ossl_ssl.h36
-rw-r--r--ext/openssl/ossl_ssl_session.c323
-rw-r--r--ext/openssl/ossl_version.h16
-rw-r--r--ext/openssl/ossl_x509.c104
-rw-r--r--ext/openssl/ossl_x509.h114
-rw-r--r--ext/openssl/ossl_x509attr.c275
-rw-r--r--ext/openssl/ossl_x509cert.c866
-rw-r--r--ext/openssl/ossl_x509crl.c537
-rw-r--r--ext/openssl/ossl_x509ext.c471
-rw-r--r--ext/openssl/ossl_x509name.c419
-rw-r--r--ext/openssl/ossl_x509req.c468
-rw-r--r--ext/openssl/ossl_x509revoked.c229
-rw-r--r--ext/openssl/ossl_x509store.c677
-rw-r--r--ext/openssl/ruby_missing.h28
-rw-r--r--ext/pathname/extconf.rb2
-rw-r--r--ext/pathname/lib/pathname.rb571
-rw-r--r--ext/pathname/pathname.c1385
-rw-r--r--ext/psych/emitter.c538
-rw-r--r--ext/psych/emitter.h8
-rw-r--r--ext/psych/extconf.rb16
-rw-r--r--ext/psych/lib/psych.rb333
-rw-r--r--ext/psych/lib/psych/coder.rb94
-rw-r--r--ext/psych/lib/psych/core_ext.rb42
-rw-r--r--ext/psych/lib/psych/deprecated.rb83
-rw-r--r--ext/psych/lib/psych/handler.rb249
-rw-r--r--ext/psych/lib/psych/handlers/document_stream.rb22
-rw-r--r--ext/psych/lib/psych/handlers/recorder.rb39
-rw-r--r--ext/psych/lib/psych/json/ruby_events.rb19
-rw-r--r--ext/psych/lib/psych/json/stream.rb15
-rw-r--r--ext/psych/lib/psych/json/tree_builder.rb12
-rw-r--r--ext/psych/lib/psych/json/yaml_events.rb29
-rw-r--r--ext/psych/lib/psych/nodes.rb77
-rw-r--r--ext/psych/lib/psych/nodes/alias.rb18
-rw-r--r--ext/psych/lib/psych/nodes/document.rb60
-rw-r--r--ext/psych/lib/psych/nodes/mapping.rb56
-rw-r--r--ext/psych/lib/psych/nodes/node.rb53
-rw-r--r--ext/psych/lib/psych/nodes/scalar.rb67
-rw-r--r--ext/psych/lib/psych/nodes/sequence.rb81
-rw-r--r--ext/psych/lib/psych/nodes/stream.rb37
-rw-r--r--ext/psych/lib/psych/omap.rb4
-rw-r--r--ext/psych/lib/psych/parser.rb51
-rw-r--r--ext/psych/lib/psych/scalar_scanner.rb136
-rw-r--r--ext/psych/lib/psych/set.rb4
-rw-r--r--ext/psych/lib/psych/stream.rb36
-rw-r--r--ext/psych/lib/psych/streaming.rb22
-rw-r--r--ext/psych/lib/psych/syntax_error.rb22
-rw-r--r--ext/psych/lib/psych/tree_builder.rb96
-rw-r--r--ext/psych/lib/psych/visitors.rb6
-rw-r--r--ext/psych/lib/psych/visitors/depth_first.rb26
-rw-r--r--ext/psych/lib/psych/visitors/emitter.rb51
-rw-r--r--ext/psych/lib/psych/visitors/json_tree.rb21
-rw-r--r--ext/psych/lib/psych/visitors/to_ruby.rb330
-rw-r--r--ext/psych/lib/psych/visitors/visitor.rb19
-rw-r--r--ext/psych/lib/psych/visitors/yaml_tree.rb455
-rw-r--r--ext/psych/parser.c579
-rw-r--r--ext/psych/parser.h6
-rw-r--r--ext/psych/psych.c34
-rw-r--r--ext/psych/psych.gemspec24
-rw-r--r--ext/psych/psych.h20
-rw-r--r--ext/psych/to_ruby.c41
-rw-r--r--ext/psych/to_ruby.h8
-rw-r--r--ext/psych/yaml_tree.c24
-rw-r--r--ext/psych/yaml_tree.h8
-rw-r--r--ext/pty/.cvsignore1
-rw-r--r--ext/pty/MANIFEST12
-rw-r--r--ext/pty/README93
-rw-r--r--ext/pty/README.expect.jp21
-rw-r--r--ext/pty/README.jp89
-rw-r--r--ext/pty/depend2
-rw-r--r--ext/pty/expect_sample.rb56
-rw-r--r--ext/pty/extconf.rb13
-rw-r--r--ext/pty/lib/expect.rb25
-rw-r--r--ext/pty/pty.c931
-rw-r--r--ext/pty/script.rb38
-rw-r--r--ext/pty/shl.rb96
-rw-r--r--ext/racc/cparse/README10
-rw-r--r--ext/racc/cparse/cparse.c831
-rw-r--r--ext/racc/cparse/depend1
-rw-r--r--ext/racc/cparse/extconf.rb5
-rw-r--r--ext/readline/.cvsignore1
-rw-r--r--ext/readline/MANIFEST5
-rw-r--r--ext/readline/README61
-rw-r--r--ext/readline/README.ja437
-rw-r--r--ext/readline/extconf.rb101
-rw-r--r--ext/readline/readline.c1841
-rw-r--r--ext/ripper/README30
-rw-r--r--ext/ripper/depend49
-rw-r--r--ext/ripper/eventids2.c287
-rw-r--r--ext/ripper/extconf.rb21
-rw-r--r--ext/ripper/lib/ripper.rb73
-rw-r--r--ext/ripper/lib/ripper/core.rb70
-rw-r--r--ext/ripper/lib/ripper/filter.rb77
-rw-r--r--ext/ripper/lib/ripper/lexer.rb182
-rw-r--r--ext/ripper/lib/ripper/sexp.rb114
-rwxr-xr-xext/ripper/tools/generate-param-macros.rb14
-rwxr-xr-xext/ripper/tools/generate.rb154
-rwxr-xr-xext/ripper/tools/preproc.rb91
-rwxr-xr-xext/ripper/tools/strip.rb12
-rw-r--r--ext/sdbm/.cvsignore1
-rw-r--r--ext/sdbm/MANIFEST6
-rw-r--r--ext/sdbm/_sdbm.c248
-rw-r--r--ext/sdbm/depend4
-rw-r--r--ext/sdbm/extconf.rb1
-rw-r--r--ext/sdbm/init.c928
-rw-r--r--ext/sdbm/sdbm.h10
-rw-r--r--ext/socket/.cvsignore1
-rw-r--r--ext/socket/.document16
-rw-r--r--ext/socket/MANIFEST8
-rw-r--r--ext/socket/addrinfo.h54
-rw-r--r--ext/socket/ancdata.c1828
-rw-r--r--ext/socket/basicsocket.c773
-rw-r--r--ext/socket/constants.c145
-rw-r--r--ext/socket/depend28
-rw-r--r--ext/socket/extconf.rb524
-rw-r--r--ext/socket/getaddrinfo.c117
-rw-r--r--ext/socket/getnameinfo.c58
-rw-r--r--ext/socket/init.c616
-rw-r--r--ext/socket/ipsocket.c308
-rw-r--r--ext/socket/lib/socket.rb845
-rw-r--r--ext/socket/mkconstants.rb705
-rw-r--r--ext/socket/option.c924
-rw-r--r--ext/socket/raddrinfo.c2245
-rw-r--r--ext/socket/rubysocket.h314
-rw-r--r--ext/socket/socket.c3671
-rw-r--r--ext/socket/sockport.h18
-rw-r--r--ext/socket/sockssocket.c71
-rw-r--r--ext/socket/tcpserver.c171
-rw-r--r--ext/socket/tcpsocket.c82
-rw-r--r--ext/socket/udpsocket.c265
-rw-r--r--ext/socket/unixserver.c155
-rw-r--r--ext/socket/unixsocket.c516
-rw-r--r--ext/stringio/README18
-rw-r--r--ext/stringio/depend3
-rw-r--r--ext/stringio/extconf.rb2
-rw-r--r--ext/stringio/stringio.c1516
-rw-r--r--ext/strscan/depend2
-rw-r--r--ext/strscan/extconf.rb3
-rw-r--r--ext/strscan/strscan.c1331
-rw-r--r--ext/syslog/depend2
-rw-r--r--ext/syslog/extconf.rb10
-rw-r--r--ext/syslog/lib/syslog/logger.rb194
-rw-r--r--ext/syslog/syslog.c595
-rw-r--r--ext/syslog/syslog.txt124
-rw-r--r--ext/tcltklib/.cvsignore1
-rw-r--r--ext/tcltklib/MANIFEST16
-rw-r--r--ext/tcltklib/MANUAL.euc124
-rw-r--r--ext/tcltklib/README.euc133
-rw-r--r--ext/tcltklib/depend2
-rw-r--r--ext/tcltklib/extconf.rb71
-rw-r--r--ext/tcltklib/lib/tcltk.rb367
-rw-r--r--ext/tcltklib/sample/sample0.rb39
-rw-r--r--ext/tcltklib/sample/sample1.rb634
-rw-r--r--ext/tcltklib/sample/sample2.rb449
-rw-r--r--ext/tcltklib/stubs.c86
-rw-r--r--ext/tcltklib/tcltklib.c527
-rw-r--r--ext/tk/.cvsignore1
-rw-r--r--ext/tk/ChangeLog.tkextlib949
-rw-r--r--ext/tk/MANIFEST25
-rw-r--r--ext/tk/MANUAL_tcltklib.eng473
-rw-r--r--ext/tk/MANUAL_tcltklib.eucj584
-rw-r--r--ext/tk/README.1st19
-rw-r--r--ext/tk/README.ActiveTcl62
-rw-r--r--ext/tk/README.fork34
-rw-r--r--ext/tk/README.macosx-aqua67
-rw-r--r--ext/tk/README.tcltklib152
-rw-r--r--ext/tk/config_list.in41
-rw-r--r--ext/tk/depend3
-rw-r--r--ext/tk/extconf.rb2035
-rw-r--r--ext/tk/lib/README30
-rw-r--r--ext/tk/lib/multi-tk.rb3754
-rw-r--r--ext/tk/lib/remote-tk.rb530
-rw-r--r--ext/tk/lib/tcltk.rb367
-rw-r--r--ext/tk/lib/tk.rb7441
-rw-r--r--ext/tk/lib/tk/after.rb6
-rw-r--r--ext/tk/lib/tk/autoload.rb760
-rw-r--r--ext/tk/lib/tk/bgerror.rb29
-rw-r--r--ext/tk/lib/tk/bindtag.rb138
-rw-r--r--ext/tk/lib/tk/busy.rb118
-rw-r--r--ext/tk/lib/tk/button.rb31
-rw-r--r--ext/tk/lib/tk/canvas.rb841
-rw-r--r--ext/tk/lib/tk/canvastag.rb459
-rw-r--r--ext/tk/lib/tk/checkbutton.rb32
-rw-r--r--ext/tk/lib/tk/clipboard.rb75
-rw-r--r--ext/tk/lib/tk/clock.rb71
-rw-r--r--ext/tk/lib/tk/composite.rb484
-rw-r--r--ext/tk/lib/tk/console.rb52
-rw-r--r--ext/tk/lib/tk/dialog.rb326
-rw-r--r--ext/tk/lib/tk/encodedstr.rb187
-rw-r--r--ext/tk/lib/tk/entry.rb120
-rw-r--r--ext/tk/lib/tk/event.rb562
-rw-r--r--ext/tk/lib/tk/font.rb2351
-rw-r--r--ext/tk/lib/tk/fontchooser.rb176
-rw-r--r--ext/tk/lib/tk/frame.rb132
-rw-r--r--ext/tk/lib/tk/grid.rb279
-rw-r--r--ext/tk/lib/tk/image.rb395
-rw-r--r--ext/tk/lib/tk/itemconfig.rb1222
-rw-r--r--ext/tk/lib/tk/itemfont.rb327
-rw-r--r--ext/tk/lib/tk/kinput.rb71
-rw-r--r--ext/tk/lib/tk/label.rb22
-rw-r--r--ext/tk/lib/tk/labelframe.rb31
-rw-r--r--ext/tk/lib/tk/listbox.rb284
-rw-r--r--ext/tk/lib/tk/macpkg.rb80
-rw-r--r--ext/tk/lib/tk/menu.rb718
-rw-r--r--ext/tk/lib/tk/menubar.rb137
-rw-r--r--ext/tk/lib/tk/menuspec.rb456
-rw-r--r--ext/tk/lib/tk/message.rb24
-rw-r--r--ext/tk/lib/tk/mngfocus.rb33
-rw-r--r--ext/tk/lib/tk/msgcat.rb296
-rw-r--r--ext/tk/lib/tk/namespace.rb551
-rw-r--r--ext/tk/lib/tk/optiondb.rb377
-rw-r--r--ext/tk/lib/tk/optionobj.rb212
-rw-r--r--ext/tk/lib/tk/pack.rb107
-rw-r--r--ext/tk/lib/tk/package.rb143
-rw-r--r--ext/tk/lib/tk/palette.rb55
-rw-r--r--ext/tk/lib/tk/panedwindow.rb260
-rw-r--r--ext/tk/lib/tk/place.rb128
-rw-r--r--ext/tk/lib/tk/radiobutton.rb73
-rw-r--r--ext/tk/lib/tk/root.rb95
-rw-r--r--ext/tk/lib/tk/scale.rb112
-rw-r--r--ext/tk/lib/tk/scrollable.rb82
-rw-r--r--ext/tk/lib/tk/scrollbar.rb183
-rw-r--r--ext/tk/lib/tk/scrollbox.rb39
-rw-r--r--ext/tk/lib/tk/selection.rb86
-rw-r--r--ext/tk/lib/tk/spinbox.rb144
-rw-r--r--ext/tk/lib/tk/tagfont.rb43
-rw-r--r--ext/tk/lib/tk/text.rb1604
-rw-r--r--ext/tk/lib/tk/textimage.rb88
-rw-r--r--ext/tk/lib/tk/textmark.rb204
-rw-r--r--ext/tk/lib/tk/texttag.rb321
-rw-r--r--ext/tk/lib/tk/textwindow.rb154
-rw-r--r--ext/tk/lib/tk/timer.rb669
-rw-r--r--ext/tk/lib/tk/toplevel.rb264
-rw-r--r--ext/tk/lib/tk/ttk_selector.rb98
-rw-r--r--ext/tk/lib/tk/txtwin_abst.rb39
-rw-r--r--ext/tk/lib/tk/validation.rb397
-rw-r--r--ext/tk/lib/tk/variable.rb1799
-rw-r--r--ext/tk/lib/tk/virtevent.rb139
-rw-r--r--ext/tk/lib/tk/winfo.rb392
-rw-r--r--ext/tk/lib/tk/winpkg.rb156
-rw-r--r--ext/tk/lib/tk/wm.rb552
-rw-r--r--ext/tk/lib/tk/xim.rb122
-rw-r--r--ext/tk/lib/tkafter.rb316
-rw-r--r--ext/tk/lib/tkbgerror.rb17
-rw-r--r--ext/tk/lib/tkcanvas.rb943
-rw-r--r--ext/tk/lib/tkclass.rb15
-rw-r--r--ext/tk/lib/tkconsole.rb4
-rw-r--r--ext/tk/lib/tkdialog.rb141
-rw-r--r--ext/tk/lib/tkentry.rb215
-rw-r--r--ext/tk/lib/tkextlib/ICONS.rb13
-rw-r--r--ext/tk/lib/tkextlib/ICONS/icons.rb129
-rw-r--r--ext/tk/lib/tkextlib/ICONS/setup.rb8
-rw-r--r--ext/tk/lib/tkextlib/SUPPORT_STATUS198
-rw-r--r--ext/tk/lib/tkextlib/blt.rb189
-rw-r--r--ext/tk/lib/tkextlib/blt/barchart.rb79
-rw-r--r--ext/tk/lib/tkextlib/blt/bitmap.rb112
-rw-r--r--ext/tk/lib/tkextlib/blt/busy.rb83
-rw-r--r--ext/tk/lib/tkextlib/blt/component.rb2218
-rw-r--r--ext/tk/lib/tkextlib/blt/container.rb28
-rw-r--r--ext/tk/lib/tkextlib/blt/cutbuffer.rb23
-rw-r--r--ext/tk/lib/tkextlib/blt/dragdrop.rb269
-rw-r--r--ext/tk/lib/tkextlib/blt/eps.rb32
-rw-r--r--ext/tk/lib/tkextlib/blt/graph.rb67
-rw-r--r--ext/tk/lib/tkextlib/blt/htext.rb112
-rw-r--r--ext/tk/lib/tkextlib/blt/setup.rb8
-rw-r--r--ext/tk/lib/tkextlib/blt/spline.rb23
-rw-r--r--ext/tk/lib/tkextlib/blt/stripchart.rb74
-rw-r--r--ext/tk/lib/tkextlib/blt/table.rb412
-rw-r--r--ext/tk/lib/tkextlib/blt/tabnotebook.rb110
-rw-r--r--ext/tk/lib/tkextlib/blt/tabset.rb504
-rw-r--r--ext/tk/lib/tkextlib/blt/ted.rb68
-rw-r--r--ext/tk/lib/tkextlib/blt/tile.rb25
-rw-r--r--ext/tk/lib/tkextlib/blt/tile/button.rb16
-rw-r--r--ext/tk/lib/tkextlib/blt/tile/checkbutton.rb17
-rw-r--r--ext/tk/lib/tkextlib/blt/tile/frame.rb16
-rw-r--r--ext/tk/lib/tkextlib/blt/tile/label.rb16
-rw-r--r--ext/tk/lib/tkextlib/blt/tile/radiobutton.rb17
-rw-r--r--ext/tk/lib/tkextlib/blt/tile/scrollbar.rb16
-rw-r--r--ext/tk/lib/tkextlib/blt/tile/toplevel.rb16
-rw-r--r--ext/tk/lib/tkextlib/blt/tree.rb1058
-rw-r--r--ext/tk/lib/tkextlib/blt/treeview.rb1287
-rw-r--r--ext/tk/lib/tkextlib/blt/unix_dnd.rb141
-rw-r--r--ext/tk/lib/tkextlib/blt/vector.rb256
-rw-r--r--ext/tk/lib/tkextlib/blt/watch.rb175
-rw-r--r--ext/tk/lib/tkextlib/blt/win_printer.rb61
-rw-r--r--ext/tk/lib/tkextlib/blt/winop.rb107
-rw-r--r--ext/tk/lib/tkextlib/bwidget.rb153
-rw-r--r--ext/tk/lib/tkextlib/bwidget/arrowbutton.rb21
-rw-r--r--ext/tk/lib/tkextlib/bwidget/bitmap.rb21
-rw-r--r--ext/tk/lib/tkextlib/bwidget/button.rb31
-rw-r--r--ext/tk/lib/tkextlib/bwidget/buttonbox.rb90
-rw-r--r--ext/tk/lib/tkextlib/bwidget/combobox.rb62
-rw-r--r--ext/tk/lib/tkextlib/bwidget/dialog.rb194
-rw-r--r--ext/tk/lib/tkextlib/bwidget/dragsite.rb31
-rw-r--r--ext/tk/lib/tkextlib/bwidget/dropsite.rb39
-rw-r--r--ext/tk/lib/tkextlib/bwidget/dynamichelp.rb63
-rw-r--r--ext/tk/lib/tkextlib/bwidget/entry.rb43
-rw-r--r--ext/tk/lib/tkextlib/bwidget/label.rb41
-rw-r--r--ext/tk/lib/tkextlib/bwidget/labelentry.rb80
-rw-r--r--ext/tk/lib/tkextlib/bwidget/labelframe.rb52
-rw-r--r--ext/tk/lib/tkextlib/bwidget/listbox.rb361
-rw-r--r--ext/tk/lib/tkextlib/bwidget/mainframe.rb132
-rw-r--r--ext/tk/lib/tkextlib/bwidget/messagedlg.rb192
-rw-r--r--ext/tk/lib/tkextlib/bwidget/notebook.rb166
-rw-r--r--ext/tk/lib/tkextlib/bwidget/pagesmanager.rb73
-rw-r--r--ext/tk/lib/tkextlib/bwidget/panedwindow.rb42
-rw-r--r--ext/tk/lib/tkextlib/bwidget/panelframe.rb67
-rw-r--r--ext/tk/lib/tkextlib/bwidget/passwddlg.rb44
-rw-r--r--ext/tk/lib/tkextlib/bwidget/progressbar.rb20
-rw-r--r--ext/tk/lib/tkextlib/bwidget/progressdlg.rb58
-rw-r--r--ext/tk/lib/tkextlib/bwidget/scrollableframe.rb40
-rw-r--r--ext/tk/lib/tkextlib/bwidget/scrolledwindow.rb48
-rw-r--r--ext/tk/lib/tkextlib/bwidget/scrollview.rb25
-rw-r--r--ext/tk/lib/tkextlib/bwidget/selectcolor.rb73
-rw-r--r--ext/tk/lib/tkextlib/bwidget/selectfont.rb91
-rw-r--r--ext/tk/lib/tkextlib/bwidget/separator.rb20
-rw-r--r--ext/tk/lib/tkextlib/bwidget/setup.rb8
-rw-r--r--ext/tk/lib/tkextlib/bwidget/spinbox.rb98
-rw-r--r--ext/tk/lib/tkextlib/bwidget/statusbar.rb62
-rw-r--r--ext/tk/lib/tkextlib/bwidget/titleframe.rb33
-rw-r--r--ext/tk/lib/tkextlib/bwidget/tree.rb500
-rw-r--r--ext/tk/lib/tkextlib/bwidget/widget.rb129
-rw-r--r--ext/tk/lib/tkextlib/itcl.rb13
-rw-r--r--ext/tk/lib/tkextlib/itcl/incr_tcl.rb178
-rw-r--r--ext/tk/lib/tkextlib/itcl/setup.rb13
-rw-r--r--ext/tk/lib/tkextlib/itk.rb13
-rw-r--r--ext/tk/lib/tkextlib/itk/incr_tk.rb446
-rw-r--r--ext/tk/lib/tkextlib/itk/setup.rb13
-rw-r--r--ext/tk/lib/tkextlib/iwidgets.rb94
-rw-r--r--ext/tk/lib/tkextlib/iwidgets/buttonbox.rb121
-rw-r--r--ext/tk/lib/tkextlib/iwidgets/calendar.rb125
-rw-r--r--ext/tk/lib/tkextlib/iwidgets/canvasprintbox.rb53
-rw-r--r--ext/tk/lib/tkextlib/iwidgets/canvasprintdialog.rb38
-rw-r--r--ext/tk/lib/tkextlib/iwidgets/checkbox.rb130
-rw-r--r--ext/tk/lib/tkextlib/iwidgets/combobox.rb104
-rw-r--r--ext/tk/lib/tkextlib/iwidgets/dateentry.rb20
-rw-r--r--ext/tk/lib/tkextlib/iwidgets/datefield.rb58
-rw-r--r--ext/tk/lib/tkextlib/iwidgets/dialog.rb20
-rw-r--r--ext/tk/lib/tkextlib/iwidgets/dialogshell.rb121
-rw-r--r--ext/tk/lib/tkextlib/iwidgets/disjointlistbox.rb50
-rw-r--r--ext/tk/lib/tkextlib/iwidgets/entryfield.rb185
-rw-r--r--ext/tk/lib/tkextlib/iwidgets/extbutton.rb40
-rw-r--r--ext/tk/lib/tkextlib/iwidgets/extfileselectionbox.rb46
-rw-r--r--ext/tk/lib/tkextlib/iwidgets/extfileselectiondialog.rb33
-rw-r--r--ext/tk/lib/tkextlib/iwidgets/feedback.rb35
-rw-r--r--ext/tk/lib/tkextlib/iwidgets/fileselectionbox.rb46
-rw-r--r--ext/tk/lib/tkextlib/iwidgets/fileselectiondialog.rb33
-rw-r--r--ext/tk/lib/tkextlib/iwidgets/finddialog.rb42
-rw-r--r--ext/tk/lib/tkextlib/iwidgets/hierarchy.rb365
-rw-r--r--ext/tk/lib/tkextlib/iwidgets/hyperhelp.rb50
-rw-r--r--ext/tk/lib/tkextlib/iwidgets/labeledframe.rb39
-rw-r--r--ext/tk/lib/tkextlib/iwidgets/labeledwidget.rb45
-rw-r--r--ext/tk/lib/tkextlib/iwidgets/mainwindow.rb67
-rw-r--r--ext/tk/lib/tkextlib/iwidgets/menubar.rb212
-rw-r--r--ext/tk/lib/tkextlib/iwidgets/messagebox.rb93
-rw-r--r--ext/tk/lib/tkextlib/iwidgets/messagedialog.rb20
-rw-r--r--ext/tk/lib/tkextlib/iwidgets/notebook.rb175
-rw-r--r--ext/tk/lib/tkextlib/iwidgets/optionmenu.rb92
-rw-r--r--ext/tk/lib/tkextlib/iwidgets/panedwindow.rb134
-rw-r--r--ext/tk/lib/tkextlib/iwidgets/promptdialog.rb131
-rw-r--r--ext/tk/lib/tkextlib/iwidgets/pushbutton.rb35
-rw-r--r--ext/tk/lib/tkextlib/iwidgets/radiobox.rb121
-rw-r--r--ext/tk/lib/tkextlib/iwidgets/scopedobject.rb24
-rw-r--r--ext/tk/lib/tkextlib/iwidgets/scrolledcanvas.rb353
-rw-r--r--ext/tk/lib/tkextlib/iwidgets/scrolledframe.rb59
-rw-r--r--ext/tk/lib/tkextlib/iwidgets/scrolledhtml.rb58
-rw-r--r--ext/tk/lib/tkextlib/iwidgets/scrolledlistbox.rb207
-rw-r--r--ext/tk/lib/tkextlib/iwidgets/scrolledtext.rb568
-rw-r--r--ext/tk/lib/tkextlib/iwidgets/scrolledwidget.rb20
-rw-r--r--ext/tk/lib/tkextlib/iwidgets/selectionbox.rb102
-rw-r--r--ext/tk/lib/tkextlib/iwidgets/selectiondialog.rb92
-rw-r--r--ext/tk/lib/tkextlib/iwidgets/setup.rb8
-rw-r--r--ext/tk/lib/tkextlib/iwidgets/shell.rb38
-rw-r--r--ext/tk/lib/tkextlib/iwidgets/spindate.rb48
-rw-r--r--ext/tk/lib/tkextlib/iwidgets/spinint.rb30
-rw-r--r--ext/tk/lib/tkextlib/iwidgets/spinner.rb169
-rw-r--r--ext/tk/lib/tkextlib/iwidgets/spintime.rb48
-rw-r--r--ext/tk/lib/tkextlib/iwidgets/tabnotebook.rb181
-rw-r--r--ext/tk/lib/tkextlib/iwidgets/tabset.rb145
-rw-r--r--ext/tk/lib/tkextlib/iwidgets/timeentry.rb25
-rw-r--r--ext/tk/lib/tkextlib/iwidgets/timefield.rb58
-rw-r--r--ext/tk/lib/tkextlib/iwidgets/toolbar.rb112
-rw-r--r--ext/tk/lib/tkextlib/iwidgets/watch.rb56
-rwxr-xr-xext/tk/lib/tkextlib/pkg_checker.rb184
-rw-r--r--ext/tk/lib/tkextlib/setup.rb8
-rw-r--r--ext/tk/lib/tkextlib/tcllib.rb105
-rw-r--r--ext/tk/lib/tkextlib/tcllib/README135
-rw-r--r--ext/tk/lib/tkextlib/tcllib/autoscroll.rb158
-rw-r--r--ext/tk/lib/tkextlib/tcllib/calendar.rb55
-rw-r--r--ext/tk/lib/tkextlib/tcllib/canvas_sqmap.rb36
-rw-r--r--ext/tk/lib/tkextlib/tcllib/canvas_zoom.rb21
-rw-r--r--ext/tk/lib/tkextlib/tcllib/chatwidget.rb151
-rw-r--r--ext/tk/lib/tkextlib/tcllib/crosshair.rb117
-rw-r--r--ext/tk/lib/tkextlib/tcllib/ctext.rb160
-rw-r--r--ext/tk/lib/tkextlib/tcllib/cursor.rb97
-rw-r--r--ext/tk/lib/tkextlib/tcllib/dateentry.rb62
-rw-r--r--ext/tk/lib/tkextlib/tcllib/datefield.rb57
-rw-r--r--ext/tk/lib/tkextlib/tcllib/diagrams.rb224
-rw-r--r--ext/tk/lib/tkextlib/tcllib/dialog.rb84
-rw-r--r--ext/tk/lib/tkextlib/tcllib/getstring.rb134
-rw-r--r--ext/tk/lib/tkextlib/tcllib/history.rb73
-rw-r--r--ext/tk/lib/tkextlib/tcllib/ico.rb146
-rw-r--r--ext/tk/lib/tkextlib/tcllib/ip_entry.rb75
-rw-r--r--ext/tk/lib/tkextlib/tcllib/khim.rb68
-rw-r--r--ext/tk/lib/tkextlib/tcllib/menuentry.rb47
-rw-r--r--ext/tk/lib/tkextlib/tcllib/ntext.rb146
-rw-r--r--ext/tk/lib/tkextlib/tcllib/panelframe.rb78
-rw-r--r--ext/tk/lib/tkextlib/tcllib/plotchart.rb1404
-rw-r--r--ext/tk/lib/tkextlib/tcllib/ruler.rb65
-rw-r--r--ext/tk/lib/tkextlib/tcllib/screenruler.rb68
-rw-r--r--ext/tk/lib/tkextlib/tcllib/scrolledwindow.rb57
-rw-r--r--ext/tk/lib/tkextlib/tcllib/scrollwin.rb61
-rw-r--r--ext/tk/lib/tkextlib/tcllib/setup.rb8
-rw-r--r--ext/tk/lib/tkextlib/tcllib/statusbar.rb79
-rw-r--r--ext/tk/lib/tkextlib/tcllib/style.rb61
-rw-r--r--ext/tk/lib/tkextlib/tcllib/superframe.rb51
-rw-r--r--ext/tk/lib/tkextlib/tcllib/swaplist.rb150
-rw-r--r--ext/tk/lib/tkextlib/tcllib/tablelist.rb28
-rw-r--r--ext/tk/lib/tkextlib/tcllib/tablelist_core.rb1072
-rw-r--r--ext/tk/lib/tkextlib/tcllib/tablelist_tile.rb43
-rw-r--r--ext/tk/lib/tkextlib/tcllib/tkpiechart.rb314
-rw-r--r--ext/tk/lib/tkextlib/tcllib/toolbar.rb175
-rw-r--r--ext/tk/lib/tkextlib/tcllib/tooltip.rb104
-rw-r--r--ext/tk/lib/tkextlib/tcllib/widget.rb82
-rw-r--r--ext/tk/lib/tkextlib/tclx.rb13
-rw-r--r--ext/tk/lib/tkextlib/tclx/setup.rb8
-rw-r--r--ext/tk/lib/tkextlib/tclx/tclx.rb74
-rw-r--r--ext/tk/lib/tkextlib/tile.rb449
-rw-r--r--ext/tk/lib/tkextlib/tile/dialog.rb102
-rw-r--r--ext/tk/lib/tkextlib/tile/setup.rb8
-rw-r--r--ext/tk/lib/tkextlib/tile/sizegrip.rb32
-rw-r--r--ext/tk/lib/tkextlib/tile/style.rb336
-rw-r--r--ext/tk/lib/tkextlib/tile/tbutton.rb34
-rw-r--r--ext/tk/lib/tkextlib/tile/tcheckbutton.rb38
-rw-r--r--ext/tk/lib/tkextlib/tile/tcombobox.rb55
-rw-r--r--ext/tk/lib/tkextlib/tile/tentry.rb49
-rw-r--r--ext/tk/lib/tkextlib/tile/tframe.rb34
-rw-r--r--ext/tk/lib/tkextlib/tile/tlabel.rb34
-rw-r--r--ext/tk/lib/tkextlib/tile/tlabelframe.rb38
-rw-r--r--ext/tk/lib/tkextlib/tile/tmenubutton.rb38
-rw-r--r--ext/tk/lib/tkextlib/tile/tnotebook.rb147
-rw-r--r--ext/tk/lib/tkextlib/tile/tpaned.rb245
-rw-r--r--ext/tk/lib/tkextlib/tile/tprogressbar.rb57
-rw-r--r--ext/tk/lib/tkextlib/tile/tradiobutton.rb38
-rw-r--r--ext/tk/lib/tkextlib/tile/treeview.rb1306
-rw-r--r--ext/tk/lib/tkextlib/tile/tscale.rb56
-rw-r--r--ext/tk/lib/tkextlib/tile/tscrollbar.rb63
-rw-r--r--ext/tk/lib/tkextlib/tile/tseparator.rb34
-rw-r--r--ext/tk/lib/tkextlib/tile/tspinbox.rb107
-rw-r--r--ext/tk/lib/tkextlib/tile/tsquare.rb30
-rw-r--r--ext/tk/lib/tkextlib/tkDND.rb18
-rw-r--r--ext/tk/lib/tkextlib/tkDND/setup.rb8
-rw-r--r--ext/tk/lib/tkextlib/tkDND/shape.rb125
-rw-r--r--ext/tk/lib/tkextlib/tkDND/tkdnd.rb182
-rw-r--r--ext/tk/lib/tkextlib/tkHTML.rb13
-rw-r--r--ext/tk/lib/tkextlib/tkHTML/htmlwidget.rb453
-rw-r--r--ext/tk/lib/tkextlib/tkHTML/setup.rb8
-rw-r--r--ext/tk/lib/tkextlib/tkimg.rb36
-rw-r--r--ext/tk/lib/tkextlib/tkimg/README26
-rw-r--r--ext/tk/lib/tkextlib/tkimg/bmp.rb33
-rw-r--r--ext/tk/lib/tkextlib/tkimg/gif.rb33
-rw-r--r--ext/tk/lib/tkextlib/tkimg/ico.rb33
-rw-r--r--ext/tk/lib/tkextlib/tkimg/jpeg.rb33
-rw-r--r--ext/tk/lib/tkextlib/tkimg/pcx.rb33
-rw-r--r--ext/tk/lib/tkextlib/tkimg/pixmap.rb44
-rw-r--r--ext/tk/lib/tkextlib/tkimg/png.rb33
-rw-r--r--ext/tk/lib/tkextlib/tkimg/ppm.rb33
-rw-r--r--ext/tk/lib/tkextlib/tkimg/ps.rb33
-rw-r--r--ext/tk/lib/tkextlib/tkimg/setup.rb8
-rw-r--r--ext/tk/lib/tkextlib/tkimg/sgi.rb33
-rw-r--r--ext/tk/lib/tkextlib/tkimg/sun.rb33
-rw-r--r--ext/tk/lib/tkextlib/tkimg/tga.rb33
-rw-r--r--ext/tk/lib/tkextlib/tkimg/tiff.rb33
-rw-r--r--ext/tk/lib/tkextlib/tkimg/window.rb33
-rw-r--r--ext/tk/lib/tkextlib/tkimg/xbm.rb33
-rw-r--r--ext/tk/lib/tkextlib/tkimg/xpm.rb33
-rw-r--r--ext/tk/lib/tkextlib/tktable.rb14
-rw-r--r--ext/tk/lib/tkextlib/tktable/setup.rb8
-rw-r--r--ext/tk/lib/tkextlib/tktable/tktable.rb966
-rw-r--r--ext/tk/lib/tkextlib/tktrans.rb14
-rw-r--r--ext/tk/lib/tkextlib/tktrans/setup.rb8
-rw-r--r--ext/tk/lib/tkextlib/tktrans/tktrans.rb64
-rw-r--r--ext/tk/lib/tkextlib/treectrl.rb13
-rw-r--r--ext/tk/lib/tkextlib/treectrl/setup.rb8
-rw-r--r--ext/tk/lib/tkextlib/treectrl/tktreectrl.rb2522
-rw-r--r--ext/tk/lib/tkextlib/trofs.rb13
-rw-r--r--ext/tk/lib/tkextlib/trofs/setup.rb8
-rw-r--r--ext/tk/lib/tkextlib/trofs/trofs.rb51
-rw-r--r--ext/tk/lib/tkextlib/version.rb6
-rw-r--r--ext/tk/lib/tkextlib/vu.rb48
-rw-r--r--ext/tk/lib/tkextlib/vu/bargraph.rb61
-rw-r--r--ext/tk/lib/tkextlib/vu/charts.rb53
-rw-r--r--ext/tk/lib/tkextlib/vu/dial.rb102
-rw-r--r--ext/tk/lib/tkextlib/vu/pie.rb286
-rw-r--r--ext/tk/lib/tkextlib/vu/setup.rb8
-rw-r--r--ext/tk/lib/tkextlib/vu/spinbox.rb22
-rw-r--r--ext/tk/lib/tkextlib/winico.rb14
-rw-r--r--ext/tk/lib/tkextlib/winico/setup.rb8
-rw-r--r--ext/tk/lib/tkextlib/winico/winico.rb224
-rw-r--r--ext/tk/lib/tkfont.rb1026
-rw-r--r--ext/tk/lib/tkmacpkg.rb4
-rw-r--r--ext/tk/lib/tkmenubar.rb137
-rw-r--r--ext/tk/lib/tkmngfocus.rb27
-rw-r--r--ext/tk/lib/tkpalette.rb48
-rw-r--r--ext/tk/lib/tkscrollbox.rb31
-rw-r--r--ext/tk/lib/tktext.rb1079
-rw-r--r--ext/tk/lib/tkvirtevent.rb66
-rw-r--r--ext/tk/lib/tkwinpkg.rb4
-rw-r--r--ext/tk/old-README.tcltklib.eucj159
-rw-r--r--ext/tk/old-extconf.rb440
-rw-r--r--ext/tk/sample/24hr_clock.rb286
-rw-r--r--ext/tk/sample/binding_sample.rb87
-rw-r--r--ext/tk/sample/bindtag_sample.rb127
-rw-r--r--ext/tk/sample/binstr_usage.rb45
-rw-r--r--ext/tk/sample/btn_with_frame.rb20
-rw-r--r--ext/tk/sample/cd_timer.rb81
-rw-r--r--ext/tk/sample/cmd_res_test.rb17
-rw-r--r--ext/tk/sample/cmd_resource5
-rw-r--r--ext/tk/sample/demos-en/ChangeLog64
-rw-r--r--ext/tk/sample/demos-en/ChangeLog.prev9
-rw-r--r--ext/tk/sample/demos-en/README138
-rw-r--r--ext/tk/sample/demos-en/README.1st18
-rw-r--r--ext/tk/sample/demos-en/README.tkencoding29
-rw-r--r--ext/tk/sample/demos-en/anilabel.rb174
-rw-r--r--ext/tk/sample/demos-en/aniwave.rb118
-rw-r--r--ext/tk/sample/demos-en/arrow.rb249
-rw-r--r--ext/tk/sample/demos-en/bind.rb127
-rw-r--r--ext/tk/sample/demos-en/bitmap.rb75
-rw-r--r--ext/tk/sample/demos-en/browse163
-rw-r--r--ext/tk/sample/demos-en/browse282
-rw-r--r--ext/tk/sample/demos-en/button.rb84
-rw-r--r--ext/tk/sample/demos-en/check.rb72
-rw-r--r--ext/tk/sample/demos-en/check2.rb109
-rw-r--r--ext/tk/sample/demos-en/clrpick.rb87
-rw-r--r--ext/tk/sample/demos-en/colors.rb158
-rw-r--r--ext/tk/sample/demos-en/combo.rb96
-rw-r--r--ext/tk/sample/demos-en/cscroll.rb136
-rw-r--r--ext/tk/sample/demos-en/ctext.rb207
-rw-r--r--ext/tk/sample/demos-en/dialog1.rb38
-rw-r--r--ext/tk/sample/demos-en/dialog2.rb41
-rw-r--r--ext/tk/sample/demos-en/doc.org/README7
-rw-r--r--ext/tk/sample/demos-en/doc.org/README.JP14
-rw-r--r--ext/tk/sample/demos-en/doc.org/README.tk8046
-rw-r--r--ext/tk/sample/demos-en/doc.org/license.terms39
-rw-r--r--ext/tk/sample/demos-en/doc.org/license.terms.tk8039
-rw-r--r--ext/tk/sample/demos-en/entry1.rb58
-rw-r--r--ext/tk/sample/demos-en/entry2.rb93
-rw-r--r--ext/tk/sample/demos-en/entry3.rb220
-rw-r--r--ext/tk/sample/demos-en/filebox.rb102
-rw-r--r--ext/tk/sample/demos-en/floor.rb1723
-rw-r--r--ext/tk/sample/demos-en/floor2.rb1722
-rw-r--r--ext/tk/sample/demos-en/form.rb64
-rw-r--r--ext/tk/sample/demos-en/goldberg.rb2006
-rw-r--r--ext/tk/sample/demos-en/hello14
-rw-r--r--ext/tk/sample/demos-en/hscale.rb75
-rw-r--r--ext/tk/sample/demos-en/icon.rb105
-rw-r--r--ext/tk/sample/demos-en/image1.rb65
-rw-r--r--ext/tk/sample/demos-en/image2.rb107
-rw-r--r--ext/tk/sample/demos-en/image3.rb125
-rw-r--r--ext/tk/sample/demos-en/items.rb381
-rw-r--r--ext/tk/sample/demos-en/ixset333
-rw-r--r--ext/tk/sample/demos-en/ixset2367
-rw-r--r--ext/tk/sample/demos-en/knightstour.rb271
-rw-r--r--ext/tk/sample/demos-en/label.rb72
-rw-r--r--ext/tk/sample/demos-en/labelframe.rb95
-rw-r--r--ext/tk/sample/demos-en/mclist.rb117
-rw-r--r--ext/tk/sample/demos-en/menu.rb196
-rw-r--r--ext/tk/sample/demos-en/menu84.rb215
-rw-r--r--ext/tk/sample/demos-en/menubu.rb237
-rw-r--r--ext/tk/sample/demos-en/msgbox.rb90
-rw-r--r--ext/tk/sample/demos-en/msgbox2.rb91
-rw-r--r--ext/tk/sample/demos-en/paned1.rb47
-rw-r--r--ext/tk/sample/demos-en/paned2.rb94
-rw-r--r--ext/tk/sample/demos-en/pendulum.rb240
-rw-r--r--ext/tk/sample/demos-en/plot.rb124
-rw-r--r--ext/tk/sample/demos-en/puzzle.rb134
-rw-r--r--ext/tk/sample/demos-en/radio.rb86
-rw-r--r--ext/tk/sample/demos-en/radio2.rb109
-rw-r--r--ext/tk/sample/demos-en/radio3.rb117
-rw-r--r--ext/tk/sample/demos-en/rmt268
-rw-r--r--ext/tk/sample/demos-en/rolodex320
-rw-r--r--ext/tk/sample/demos-en/ruler.rb205
-rw-r--r--ext/tk/sample/demos-en/sayings.rb106
-rw-r--r--ext/tk/sample/demos-en/search.rb187
-rw-r--r--ext/tk/sample/demos-en/spin.rb65
-rw-r--r--ext/tk/sample/demos-en/square81
-rw-r--r--ext/tk/sample/demos-en/states.rb80
-rw-r--r--ext/tk/sample/demos-en/style.rb231
-rw-r--r--ext/tk/sample/demos-en/tcolor526
-rw-r--r--ext/tk/sample/demos-en/text.rb128
-rw-r--r--ext/tk/sample/demos-en/textpeer.rb76
-rw-r--r--ext/tk/sample/demos-en/timer136
-rw-r--r--ext/tk/sample/demos-en/tkencoding.rb42
-rw-r--r--ext/tk/sample/demos-en/toolbar.rb130
-rw-r--r--ext/tk/sample/demos-en/tree.rb119
-rw-r--r--ext/tk/sample/demos-en/ttkbut.rb139
-rw-r--r--ext/tk/sample/demos-en/ttkmenu.rb85
-rw-r--r--ext/tk/sample/demos-en/ttknote.rb89
-rw-r--r--ext/tk/sample/demos-en/ttkpane.rb213
-rw-r--r--ext/tk/sample/demos-en/ttkprogress.rb66
-rw-r--r--ext/tk/sample/demos-en/twind.rb291
-rw-r--r--ext/tk/sample/demos-en/twind2.rb384
-rw-r--r--ext/tk/sample/demos-en/unicodeout.rb114
-rw-r--r--ext/tk/sample/demos-en/vscale.rb79
-rw-r--r--ext/tk/sample/demos-en/widget1087
-rw-r--r--ext/tk/sample/demos-jp/README54
-rw-r--r--ext/tk/sample/demos-jp/README.1st20
-rw-r--r--ext/tk/sample/demos-jp/anilabel.rb177
-rw-r--r--ext/tk/sample/demos-jp/aniwave.rb120
-rw-r--r--ext/tk/sample/demos-jp/arrow.rb247
-rw-r--r--ext/tk/sample/demos-jp/bind.rb125
-rw-r--r--ext/tk/sample/demos-jp/bitmap.rb74
-rw-r--r--ext/tk/sample/demos-jp/browse163
-rw-r--r--ext/tk/sample/demos-jp/browse282
-rw-r--r--ext/tk/sample/demos-jp/button.rb83
-rw-r--r--ext/tk/sample/demos-jp/check.rb70
-rw-r--r--ext/tk/sample/demos-jp/check2.rb110
-rw-r--r--ext/tk/sample/demos-jp/clrpick.rb84
-rw-r--r--ext/tk/sample/demos-jp/colors.rb155
-rw-r--r--ext/tk/sample/demos-jp/combo.rb98
-rw-r--r--ext/tk/sample/demos-jp/cscroll.rb134
-rw-r--r--ext/tk/sample/demos-jp/ctext.rb204
-rw-r--r--ext/tk/sample/demos-jp/dialog1.rb39
-rw-r--r--ext/tk/sample/demos-jp/dialog2.rb43
-rw-r--r--ext/tk/sample/demos-jp/doc.org/README7
-rw-r--r--ext/tk/sample/demos-jp/doc.org/README.JP14
-rw-r--r--ext/tk/sample/demos-jp/doc.org/README.tk8046
-rw-r--r--ext/tk/sample/demos-jp/doc.org/license.terms39
-rw-r--r--ext/tk/sample/demos-jp/doc.org/license.terms.tk8039
-rw-r--r--ext/tk/sample/demos-jp/entry1.rb60
-rw-r--r--ext/tk/sample/demos-jp/entry2.rb91
-rw-r--r--ext/tk/sample/demos-jp/entry3.rb225
-rw-r--r--ext/tk/sample/demos-jp/filebox.rb102
-rw-r--r--ext/tk/sample/demos-jp/floor.rb1721
-rw-r--r--ext/tk/sample/demos-jp/floor2.rb1719
-rw-r--r--ext/tk/sample/demos-jp/form.rb66
-rw-r--r--ext/tk/sample/demos-jp/goldberg.rb2011
-rw-r--r--ext/tk/sample/demos-jp/hello10
-rw-r--r--ext/tk/sample/demos-jp/hscale.rb78
-rw-r--r--ext/tk/sample/demos-jp/icon.rb103
-rw-r--r--ext/tk/sample/demos-jp/image1.rb64
-rw-r--r--ext/tk/sample/demos-jp/image2.rb106
-rw-r--r--ext/tk/sample/demos-jp/image3.rb127
-rw-r--r--ext/tk/sample/demos-jp/items.rb379
-rw-r--r--ext/tk/sample/demos-jp/ixset333
-rw-r--r--ext/tk/sample/demos-jp/ixset2369
-rw-r--r--ext/tk/sample/demos-jp/knightstour.rb273
-rw-r--r--ext/tk/sample/demos-jp/label.rb69
-rw-r--r--ext/tk/sample/demos-jp/labelframe.rb102
-rw-r--r--ext/tk/sample/demos-jp/mclist.rb121
-rw-r--r--ext/tk/sample/demos-jp/menu.rb201
-rw-r--r--ext/tk/sample/demos-jp/menu84.rb213
-rw-r--r--ext/tk/sample/demos-jp/menu8x.rb233
-rw-r--r--ext/tk/sample/demos-jp/menubu.rb238
-rw-r--r--ext/tk/sample/demos-jp/msgbox.rb89
-rw-r--r--ext/tk/sample/demos-jp/msgbox2.rb90
-rw-r--r--ext/tk/sample/demos-jp/paned1.rb52
-rw-r--r--ext/tk/sample/demos-jp/paned2.rb100
-rw-r--r--ext/tk/sample/demos-jp/pendulum.rb242
-rw-r--r--ext/tk/sample/demos-jp/plot.rb126
-rw-r--r--ext/tk/sample/demos-jp/puzzle.rb131
-rw-r--r--ext/tk/sample/demos-jp/radio.rb84
-rw-r--r--ext/tk/sample/demos-jp/radio2.rb112
-rw-r--r--ext/tk/sample/demos-jp/radio3.rb119
-rw-r--r--ext/tk/sample/demos-jp/rmt268
-rw-r--r--ext/tk/sample/demos-jp/rolodex320
-rw-r--r--ext/tk/sample/demos-jp/rolodex-j300
-rw-r--r--ext/tk/sample/demos-jp/ruler.rb203
-rw-r--r--ext/tk/sample/demos-jp/sayings.rb103
-rw-r--r--ext/tk/sample/demos-jp/search.rb184
-rw-r--r--ext/tk/sample/demos-jp/spin.rb71
-rw-r--r--ext/tk/sample/demos-jp/square81
-rw-r--r--ext/tk/sample/demos-jp/states.rb74
-rw-r--r--ext/tk/sample/demos-jp/style.rb270
-rw-r--r--ext/tk/sample/demos-jp/tcolor534
-rw-r--r--ext/tk/sample/demos-jp/text.rb120
-rw-r--r--ext/tk/sample/demos-jp/textpeer.rb82
-rw-r--r--ext/tk/sample/demos-jp/timer136
-rw-r--r--ext/tk/sample/demos-jp/toolbar.rb136
-rw-r--r--ext/tk/sample/demos-jp/tree.rb120
-rw-r--r--ext/tk/sample/demos-jp/ttkbut.rb145
-rw-r--r--ext/tk/sample/demos-jp/ttkmenu.rb91
-rw-r--r--ext/tk/sample/demos-jp/ttknote.rb97
-rw-r--r--ext/tk/sample/demos-jp/ttkpane.rb216
-rw-r--r--ext/tk/sample/demos-jp/ttkprogress.rb71
-rw-r--r--ext/tk/sample/demos-jp/twind.rb292
-rw-r--r--ext/tk/sample/demos-jp/twind2.rb384
-rw-r--r--ext/tk/sample/demos-jp/unicodeout.rb119
-rw-r--r--ext/tk/sample/demos-jp/vscale.rb80
-rw-r--r--ext/tk/sample/demos-jp/widget1122
-rw-r--r--ext/tk/sample/editable_listbox.rb148
-rw-r--r--ext/tk/sample/encstr_usage.rb30
-rw-r--r--ext/tk/sample/figmemo_sample.rb456
-rw-r--r--ext/tk/sample/images/earth.gifbin0 -> 51712 bytes-rw-r--r--ext/tk/sample/images/earthris.gifbin0 -> 6343 bytes-rw-r--r--ext/tk/sample/images/face.xbm173
-rw-r--r--ext/tk/sample/images/flagdown.xbm27
-rw-r--r--ext/tk/sample/images/flagup.xbm27
-rw-r--r--ext/tk/sample/images/gray25.xbm6
-rw-r--r--ext/tk/sample/images/grey.256
-rw-r--r--ext/tk/sample/images/grey.56
-rw-r--r--ext/tk/sample/images/letters.xbm27
-rw-r--r--ext/tk/sample/images/noletter.xbm27
-rw-r--r--ext/tk/sample/images/pattern.xbm6
-rw-r--r--ext/tk/sample/images/tcllogo.gifbin0 -> 2341 bytes-rw-r--r--ext/tk/sample/images/teapot.ppm31
-rw-r--r--ext/tk/sample/irbtk.rb30
-rw-r--r--ext/tk/sample/irbtkw.rbw156
-rw-r--r--ext/tk/sample/iso2022-kr.txt2
-rw-r--r--ext/tk/sample/menubar1.rb51
-rw-r--r--ext/tk/sample/menubar2.rb56
-rw-r--r--ext/tk/sample/menubar3.rb72
-rw-r--r--ext/tk/sample/msgs_rb/README3
-rw-r--r--ext/tk/sample/msgs_rb/cs.msg84
-rw-r--r--ext/tk/sample/msgs_rb/de.msg88
-rw-r--r--ext/tk/sample/msgs_rb/el.msg98
-rw-r--r--ext/tk/sample/msgs_rb/en.msg83
-rw-r--r--ext/tk/sample/msgs_rb/en_gb.msg7
-rw-r--r--ext/tk/sample/msgs_rb/eo.msg87
-rw-r--r--ext/tk/sample/msgs_rb/es.msg84
-rw-r--r--ext/tk/sample/msgs_rb/fr.msg84
-rw-r--r--ext/tk/sample/msgs_rb/it.msg84
-rw-r--r--ext/tk/sample/msgs_rb/ja.msg13
-rw-r--r--ext/tk/sample/msgs_rb/nl.msg123
-rw-r--r--ext/tk/sample/msgs_rb/pl.msg87
-rw-r--r--ext/tk/sample/msgs_rb/ru.msg87
-rw-r--r--ext/tk/sample/msgs_rb2/README5
-rw-r--r--ext/tk/sample/msgs_rb2/de.msg88
-rw-r--r--ext/tk/sample/msgs_rb2/ja.msg85
-rw-r--r--ext/tk/sample/msgs_tk/README4
-rw-r--r--ext/tk/sample/msgs_tk/cs.msg84
-rw-r--r--ext/tk/sample/msgs_tk/de.msg88
-rw-r--r--ext/tk/sample/msgs_tk/el.msg103
-rw-r--r--ext/tk/sample/msgs_tk/en.msg83
-rw-r--r--ext/tk/sample/msgs_tk/en_gb.msg7
-rw-r--r--ext/tk/sample/msgs_tk/eo.msg87
-rw-r--r--ext/tk/sample/msgs_tk/es.msg84
-rw-r--r--ext/tk/sample/msgs_tk/fr.msg84
-rw-r--r--ext/tk/sample/msgs_tk/it.msg84
-rw-r--r--ext/tk/sample/msgs_tk/ja.msg13
-rw-r--r--ext/tk/sample/msgs_tk/license.terms39
-rw-r--r--ext/tk/sample/msgs_tk/nl.msg123
-rw-r--r--ext/tk/sample/msgs_tk/pl.msg87
-rw-r--r--ext/tk/sample/msgs_tk/ru.msg87
-rw-r--r--ext/tk/sample/multi-ip_sample.rb103
-rw-r--r--ext/tk/sample/multi-ip_sample2.rb29
-rw-r--r--ext/tk/sample/optobj_sample.rb67
-rw-r--r--ext/tk/sample/propagate.rb30
-rw-r--r--ext/tk/sample/remote-ip_sample.rb33
-rw-r--r--ext/tk/sample/remote-ip_sample2.rb56
-rw-r--r--ext/tk/sample/resource.en13
-rw-r--r--ext/tk/sample/resource.ja13
-rw-r--r--ext/tk/sample/safe-tk.rb134
-rw-r--r--ext/tk/sample/scrollframe.rb247
-rw-r--r--ext/tk/sample/tcltklib/batsu.gif (renamed from ext/tcltklib/sample/batsu.gif)bin538 -> 538 bytes-rw-r--r--ext/tk/sample/tcltklib/lines0.tcl (renamed from ext/tcltklib/demo/lines0.tcl)0
-rw-r--r--ext/tk/sample/tcltklib/lines1.rb (renamed from ext/tcltklib/demo/lines2.rb)0
-rw-r--r--ext/tk/sample/tcltklib/lines2.rb (renamed from ext/tcltklib/demo/lines1.rb)0
-rw-r--r--ext/tk/sample/tcltklib/lines3.rb54
-rw-r--r--ext/tk/sample/tcltklib/lines4.rb54
-rw-r--r--ext/tk/sample/tcltklib/maru.gif (renamed from ext/tcltklib/sample/maru.gif)bin481 -> 481 bytes-rw-r--r--ext/tk/sample/tcltklib/safeTk.rb22
-rw-r--r--ext/tk/sample/tcltklib/sample0.rb39
-rw-r--r--ext/tk/sample/tcltklib/sample1.rb634
-rw-r--r--ext/tk/sample/tcltklib/sample2.rb451
-rw-r--r--ext/tk/sample/tkalignbox.rb235
-rw-r--r--ext/tk/sample/tkballoonhelp.rb220
-rw-r--r--ext/tk/sample/tkbiff.rb42
-rw-r--r--ext/tk/sample/tkbrowse.rb12
-rw-r--r--ext/tk/sample/tkcombobox.rb497
-rw-r--r--ext/tk/sample/tkdialog.rb5
-rw-r--r--ext/tk/sample/tkextlib/ICONS/Orig_LICENSE.txt61
-rw-r--r--ext/tk/sample/tkextlib/ICONS/tkIcons195
-rw-r--r--ext/tk/sample/tkextlib/ICONS/tkIcons-sample.kde658
-rw-r--r--ext/tk/sample/tkextlib/ICONS/tkIcons.kde195
-rw-r--r--ext/tk/sample/tkextlib/ICONS/viewIcons.rb329
-rw-r--r--ext/tk/sample/tkextlib/blt/barchart5.rb101
-rw-r--r--ext/tk/sample/tkextlib/blt/calendar.rb117
-rw-r--r--ext/tk/sample/tkextlib/blt/graph6.rb2222
-rw-r--r--ext/tk/sample/tkextlib/blt/graph7.rb40
-rw-r--r--ext/tk/sample/tkextlib/blt/graph7a.rb63
-rw-r--r--ext/tk/sample/tkextlib/blt/graph7b.rb41
-rw-r--r--ext/tk/sample/tkextlib/blt/graph7c.rb45
-rw-r--r--ext/tk/sample/tkextlib/blt/images/buckskin.gifbin0 -> 7561 bytes-rw-r--r--ext/tk/sample/tkextlib/blt/images/chalk.gifbin0 -> 4378 bytes-rw-r--r--ext/tk/sample/tkextlib/blt/images/qv100.t.gifbin0 -> 2694 bytes-rw-r--r--ext/tk/sample/tkextlib/blt/images/rain.gifbin0 -> 3785 bytes-rw-r--r--ext/tk/sample/tkextlib/blt/images/sample.gifbin0 -> 186103 bytes-rw-r--r--ext/tk/sample/tkextlib/blt/pareto.rb90
-rw-r--r--ext/tk/sample/tkextlib/blt/plot1.rb9
-rw-r--r--ext/tk/sample/tkextlib/blt/plot1b.rb10
-rw-r--r--ext/tk/sample/tkextlib/blt/readme.txt2
-rw-r--r--ext/tk/sample/tkextlib/blt/scripts/stipples.rb156
-rw-r--r--ext/tk/sample/tkextlib/blt/winop1.rb40
-rw-r--r--ext/tk/sample/tkextlib/blt/winop2.rb28
-rw-r--r--ext/tk/sample/tkextlib/bwidget/Orig_LICENSE.txt53
-rw-r--r--ext/tk/sample/tkextlib/bwidget/basic.rb198
-rw-r--r--ext/tk/sample/tkextlib/bwidget/bwidget.xbm46
-rw-r--r--ext/tk/sample/tkextlib/bwidget/demo.rb243
-rw-r--r--ext/tk/sample/tkextlib/bwidget/dnd.rb46
-rw-r--r--ext/tk/sample/tkextlib/bwidget/manager.rb150
-rw-r--r--ext/tk/sample/tkextlib/bwidget/select.rb82
-rw-r--r--ext/tk/sample/tkextlib/bwidget/tmpldlg.rb221
-rw-r--r--ext/tk/sample/tkextlib/bwidget/tree.rb289
-rw-r--r--ext/tk/sample/tkextlib/bwidget/x1.xbm2258
-rw-r--r--ext/tk/sample/tkextlib/iwidgets/catalog_demo/Orig_LICENSE.txt42
-rw-r--r--ext/tk/sample/tkextlib/iwidgets/catalog_demo/images/box.xbm14
-rw-r--r--ext/tk/sample/tkextlib/iwidgets/catalog_demo/images/clear.gifbin0 -> 279 bytes-rw-r--r--ext/tk/sample/tkextlib/iwidgets/catalog_demo/images/close.gifbin0 -> 249 bytes-rw-r--r--ext/tk/sample/tkextlib/iwidgets/catalog_demo/images/copy.gifbin0 -> 269 bytes-rw-r--r--ext/tk/sample/tkextlib/iwidgets/catalog_demo/images/cut.gifbin0 -> 179 bytes-rw-r--r--ext/tk/sample/tkextlib/iwidgets/catalog_demo/images/exit.gifbin0 -> 396 bytes-rw-r--r--ext/tk/sample/tkextlib/iwidgets/catalog_demo/images/find.gifbin0 -> 386 bytes-rw-r--r--ext/tk/sample/tkextlib/iwidgets/catalog_demo/images/help.gifbin0 -> 591 bytes-rw-r--r--ext/tk/sample/tkextlib/iwidgets/catalog_demo/images/line.xbm14
-rw-r--r--ext/tk/sample/tkextlib/iwidgets/catalog_demo/images/mag.gifbin0 -> 183 bytes-rw-r--r--ext/tk/sample/tkextlib/iwidgets/catalog_demo/images/new.gifbin0 -> 212 bytes-rw-r--r--ext/tk/sample/tkextlib/iwidgets/catalog_demo/images/open.gifbin0 -> 258 bytes-rw-r--r--ext/tk/sample/tkextlib/iwidgets/catalog_demo/images/oval.xbm14
-rw-r--r--ext/tk/sample/tkextlib/iwidgets/catalog_demo/images/paste.gifbin0 -> 376 bytes-rw-r--r--ext/tk/sample/tkextlib/iwidgets/catalog_demo/images/points.xbm14
-rw-r--r--ext/tk/sample/tkextlib/iwidgets/catalog_demo/images/poly.gifbin0 -> 141 bytes-rw-r--r--ext/tk/sample/tkextlib/iwidgets/catalog_demo/images/print.gifbin0 -> 263 bytes-rw-r--r--ext/tk/sample/tkextlib/iwidgets/catalog_demo/images/ruler.gifbin0 -> 174 bytes-rw-r--r--ext/tk/sample/tkextlib/iwidgets/catalog_demo/images/save.gifbin0 -> 270 bytes-rw-r--r--ext/tk/sample/tkextlib/iwidgets/catalog_demo/images/select.gifbin0 -> 124 bytes-rw-r--r--ext/tk/sample/tkextlib/iwidgets/catalog_demo/images/text.xbm14
-rw-r--r--ext/tk/sample/tkextlib/iwidgets/sample/buttonbox.rb22
-rw-r--r--ext/tk/sample/tkextlib/iwidgets/sample/calendar.rb10
-rw-r--r--ext/tk/sample/tkextlib/iwidgets/sample/canvasprintbox.rb8
-rw-r--r--ext/tk/sample/tkextlib/iwidgets/sample/canvasprintdialog.rb8
-rw-r--r--ext/tk/sample/tkextlib/iwidgets/sample/checkbox.rb12
-rw-r--r--ext/tk/sample/tkextlib/iwidgets/sample/combobox.rb32
-rw-r--r--ext/tk/sample/tkextlib/iwidgets/sample/dateentry.rb7
-rw-r--r--ext/tk/sample/tkextlib/iwidgets/sample/datefield.rb8
-rw-r--r--ext/tk/sample/tkextlib/iwidgets/sample/dialog.rb20
-rw-r--r--ext/tk/sample/tkextlib/iwidgets/sample/dialogshell.rb14
-rw-r--r--ext/tk/sample/tkextlib/iwidgets/sample/disjointlistbox.rb16
-rw-r--r--ext/tk/sample/tkextlib/iwidgets/sample/entryfield-1.rb39
-rw-r--r--ext/tk/sample/tkextlib/iwidgets/sample/entryfield-2.rb44
-rw-r--r--ext/tk/sample/tkextlib/iwidgets/sample/entryfield-3.rb40
-rw-r--r--ext/tk/sample/tkextlib/iwidgets/sample/extbutton.rb20
-rw-r--r--ext/tk/sample/tkextlib/iwidgets/sample/extfileselectionbox.rb8
-rw-r--r--ext/tk/sample/tkextlib/iwidgets/sample/extfileselectiondialog.rb29
-rw-r--r--ext/tk/sample/tkextlib/iwidgets/sample/feedback.rb10
-rw-r--r--ext/tk/sample/tkextlib/iwidgets/sample/fileselectionbox.rb8
-rw-r--r--ext/tk/sample/tkextlib/iwidgets/sample/fileselectiondialog.rb28
-rw-r--r--ext/tk/sample/tkextlib/iwidgets/sample/finddialog.rb15
-rw-r--r--ext/tk/sample/tkextlib/iwidgets/sample/hierarchy.rb25
-rw-r--r--ext/tk/sample/tkextlib/iwidgets/sample/hyperhelp.rb14
-rw-r--r--ext/tk/sample/tkextlib/iwidgets/sample/labeledframe.rb14
-rw-r--r--ext/tk/sample/tkextlib/iwidgets/sample/labeledwidget.rb13
-rw-r--r--ext/tk/sample/tkextlib/iwidgets/sample/mainwindow.rb64
-rw-r--r--ext/tk/sample/tkextlib/iwidgets/sample/menubar.rb124
-rw-r--r--ext/tk/sample/tkextlib/iwidgets/sample/menubar2.rb44
-rw-r--r--ext/tk/sample/tkextlib/iwidgets/sample/messagebox1.rb19
-rw-r--r--ext/tk/sample/tkextlib/iwidgets/sample/messagebox2.rb19
-rw-r--r--ext/tk/sample/tkextlib/iwidgets/sample/messagedialog.rb44
-rw-r--r--ext/tk/sample/tkextlib/iwidgets/sample/notebook.rb30
-rw-r--r--ext/tk/sample/tkextlib/iwidgets/sample/notebook2.rb30
-rw-r--r--ext/tk/sample/tkextlib/iwidgets/sample/optionmenu.rb14
-rw-r--r--ext/tk/sample/tkextlib/iwidgets/sample/panedwindow.rb22
-rw-r--r--ext/tk/sample/tkextlib/iwidgets/sample/panedwindow2.rb22
-rw-r--r--ext/tk/sample/tkextlib/iwidgets/sample/promptdialog.rb17
-rw-r--r--ext/tk/sample/tkextlib/iwidgets/sample/pushbutton.rb9
-rw-r--r--ext/tk/sample/tkextlib/iwidgets/sample/radiobox.rb13
-rw-r--r--ext/tk/sample/tkextlib/iwidgets/sample/scrolledcanvas.rb13
-rw-r--r--ext/tk/sample/tkextlib/iwidgets/sample/scrolledframe.rb18
-rw-r--r--ext/tk/sample/tkextlib/iwidgets/sample/scrolledhtml.rb15
-rw-r--r--ext/tk/sample/tkextlib/iwidgets/sample/scrolledlistbox.rb22
-rw-r--r--ext/tk/sample/tkextlib/iwidgets/sample/scrolledtext.rb11
-rw-r--r--ext/tk/sample/tkextlib/iwidgets/sample/selectionbox.rb19
-rw-r--r--ext/tk/sample/tkextlib/iwidgets/sample/selectiondialog.rb12
-rw-r--r--ext/tk/sample/tkextlib/iwidgets/sample/shell.rb17
-rw-r--r--ext/tk/sample/tkextlib/iwidgets/sample/spindate.rb7
-rw-r--r--ext/tk/sample/tkextlib/iwidgets/sample/spinint.rb10
-rw-r--r--ext/tk/sample/tkextlib/iwidgets/sample/spinner.rb33
-rw-r--r--ext/tk/sample/tkextlib/iwidgets/sample/spintime.rb7
-rw-r--r--ext/tk/sample/tkextlib/iwidgets/sample/tabnotebook.rb26
-rw-r--r--ext/tk/sample/tkextlib/iwidgets/sample/tabnotebook2.rb30
-rw-r--r--ext/tk/sample/tkextlib/iwidgets/sample/tabset.rb34
-rw-r--r--ext/tk/sample/tkextlib/iwidgets/sample/timeentry.rb7
-rw-r--r--ext/tk/sample/tkextlib/iwidgets/sample/timefield.rb8
-rw-r--r--ext/tk/sample/tkextlib/iwidgets/sample/toolbar.rb152
-rw-r--r--ext/tk/sample/tkextlib/iwidgets/sample/watch.rb18
-rw-r--r--ext/tk/sample/tkextlib/tcllib/Orig_LICENSE.txt46
-rw-r--r--ext/tk/sample/tkextlib/tcllib/datefield.rb29
-rw-r--r--ext/tk/sample/tkextlib/tcllib/plotdemos1.rb158
-rw-r--r--ext/tk/sample/tkextlib/tcllib/plotdemos2.rb71
-rw-r--r--ext/tk/sample/tkextlib/tcllib/plotdemos3.rb83
-rw-r--r--ext/tk/sample/tkextlib/tcllib/xyplot.rb17
-rw-r--r--ext/tk/sample/tkextlib/tile/Orig_LICENSE.txt30
-rw-r--r--ext/tk/sample/tkextlib/tile/demo.rb983
-rw-r--r--ext/tk/sample/tkextlib/tile/iconlib.tcl110
-rw-r--r--ext/tk/sample/tkextlib/tile/readme.txt2
-rw-r--r--ext/tk/sample/tkextlib/tile/repeater.tcl117
-rw-r--r--ext/tk/sample/tkextlib/tile/themes/blue/blue.tcl149
-rw-r--r--ext/tk/sample/tkextlib/tile/themes/blue/blue/arrowdown-h.gifbin0 -> 315 bytes-rw-r--r--ext/tk/sample/tkextlib/tile/themes/blue/blue/arrowdown-p.gifbin0 -> 312 bytes-rw-r--r--ext/tk/sample/tkextlib/tile/themes/blue/blue/arrowdown.gifbin0 -> 313 bytes-rw-r--r--ext/tk/sample/tkextlib/tile/themes/blue/blue/arrowleft-h.gifbin0 -> 329 bytes-rw-r--r--ext/tk/sample/tkextlib/tile/themes/blue/blue/arrowleft-p.gifbin0 -> 327 bytes-rw-r--r--ext/tk/sample/tkextlib/tile/themes/blue/blue/arrowleft.gifbin0 -> 323 bytes-rw-r--r--ext/tk/sample/tkextlib/tile/themes/blue/blue/arrowright-h.gifbin0 -> 330 bytes-rw-r--r--ext/tk/sample/tkextlib/tile/themes/blue/blue/arrowright-p.gifbin0 -> 327 bytes-rw-r--r--ext/tk/sample/tkextlib/tile/themes/blue/blue/arrowright.gifbin0 -> 324 bytes-rw-r--r--ext/tk/sample/tkextlib/tile/themes/blue/blue/arrowup-h.gifbin0 -> 309 bytes-rw-r--r--ext/tk/sample/tkextlib/tile/themes/blue/blue/arrowup-p.gifbin0 -> 313 bytes-rw-r--r--ext/tk/sample/tkextlib/tile/themes/blue/blue/arrowup.gifbin0 -> 314 bytes-rw-r--r--ext/tk/sample/tkextlib/tile/themes/blue/blue/button-h.gifbin0 -> 696 bytes-rw-r--r--ext/tk/sample/tkextlib/tile/themes/blue/blue/button-n.gifbin0 -> 770 bytes-rw-r--r--ext/tk/sample/tkextlib/tile/themes/blue/blue/button-n.xcfbin0 -> 1942 bytes-rw-r--r--ext/tk/sample/tkextlib/tile/themes/blue/blue/button-p.gifbin0 -> 769 bytes-rw-r--r--ext/tk/sample/tkextlib/tile/themes/blue/blue/check-hc.gifbin0 -> 254 bytes-rw-r--r--ext/tk/sample/tkextlib/tile/themes/blue/blue/check-hu.gifbin0 -> 234 bytes-rw-r--r--ext/tk/sample/tkextlib/tile/themes/blue/blue/check-nc.gifbin0 -> 249 bytes-rw-r--r--ext/tk/sample/tkextlib/tile/themes/blue/blue/check-nu.gifbin0 -> 229 bytes-rw-r--r--ext/tk/sample/tkextlib/tile/themes/blue/blue/radio-hc.gifbin0 -> 1098 bytes-rw-r--r--ext/tk/sample/tkextlib/tile/themes/blue/blue/radio-hu.gifbin0 -> 626 bytes-rw-r--r--ext/tk/sample/tkextlib/tile/themes/blue/blue/radio-nc.gifbin0 -> 389 bytes-rw-r--r--ext/tk/sample/tkextlib/tile/themes/blue/blue/radio-nu.gifbin0 -> 401 bytes-rw-r--r--ext/tk/sample/tkextlib/tile/themes/blue/blue/sb-thumb-p.gifbin0 -> 343 bytes-rw-r--r--ext/tk/sample/tkextlib/tile/themes/blue/blue/sb-thumb.gifbin0 -> 316 bytes-rw-r--r--ext/tk/sample/tkextlib/tile/themes/blue/blue/sb-vthumb-p.gifbin0 -> 333 bytes-rw-r--r--ext/tk/sample/tkextlib/tile/themes/blue/blue/sb-vthumb.gifbin0 -> 308 bytes-rw-r--r--ext/tk/sample/tkextlib/tile/themes/blue/blue/slider-p.gifbin0 -> 182 bytes-rw-r--r--ext/tk/sample/tkextlib/tile/themes/blue/blue/slider.gifbin0 -> 182 bytes-rw-r--r--ext/tk/sample/tkextlib/tile/themes/blue/blue/vslider-p.gifbin0 -> 183 bytes-rw-r--r--ext/tk/sample/tkextlib/tile/themes/blue/blue/vslider.gifbin0 -> 283 bytes-rw-r--r--ext/tk/sample/tkextlib/tile/themes/blue/pkgIndex.tcl6
-rw-r--r--ext/tk/sample/tkextlib/tile/themes/keramik/keramik.tcl194
-rw-r--r--ext/tk/sample/tkextlib/tile/themes/keramik/keramik/arrowdown-n.gifbin0 -> 273 bytes-rw-r--r--ext/tk/sample/tkextlib/tile/themes/keramik/keramik/arrowdown-p.gifbin0 -> 258 bytes-rw-r--r--ext/tk/sample/tkextlib/tile/themes/keramik/keramik/arrowleft-n.gifbin0 -> 292 bytes-rw-r--r--ext/tk/sample/tkextlib/tile/themes/keramik/keramik/arrowleft-p.gifbin0 -> 272 bytes-rw-r--r--ext/tk/sample/tkextlib/tile/themes/keramik/keramik/arrowright-n.gifbin0 -> 274 bytes-rw-r--r--ext/tk/sample/tkextlib/tile/themes/keramik/keramik/arrowright-p.gifbin0 -> 258 bytes-rw-r--r--ext/tk/sample/tkextlib/tile/themes/keramik/keramik/arrowup-n.gifbin0 -> 286 bytes-rw-r--r--ext/tk/sample/tkextlib/tile/themes/keramik/keramik/arrowup-p.gifbin0 -> 271 bytes-rw-r--r--ext/tk/sample/tkextlib/tile/themes/keramik/keramik/button-d.gifbin0 -> 1266 bytes-rw-r--r--ext/tk/sample/tkextlib/tile/themes/keramik/keramik/button-h.gifbin0 -> 896 bytes-rw-r--r--ext/tk/sample/tkextlib/tile/themes/keramik/keramik/button-n.gifbin0 -> 881 bytes-rw-r--r--ext/tk/sample/tkextlib/tile/themes/keramik/keramik/button-p.gifbin0 -> 625 bytes-rw-r--r--ext/tk/sample/tkextlib/tile/themes/keramik/keramik/button-s.gifbin0 -> 859 bytes-rw-r--r--ext/tk/sample/tkextlib/tile/themes/keramik/keramik/check-c.gifbin0 -> 434 bytes-rw-r--r--ext/tk/sample/tkextlib/tile/themes/keramik/keramik/check-u.gifbin0 -> 423 bytes-rw-r--r--ext/tk/sample/tkextlib/tile/themes/keramik/keramik/hsb-n.gifbin0 -> 401 bytes-rw-r--r--ext/tk/sample/tkextlib/tile/themes/keramik/keramik/hsb-p.gifbin0 -> 395 bytes-rw-r--r--ext/tk/sample/tkextlib/tile/themes/keramik/keramik/hslider-n.gifbin0 -> 592 bytes-rw-r--r--ext/tk/sample/tkextlib/tile/themes/keramik/keramik/mbut-a.gifbin0 -> 1116 bytes-rw-r--r--ext/tk/sample/tkextlib/tile/themes/keramik/keramik/mbut-arrow-n.gifbin0 -> 61 bytes-rw-r--r--ext/tk/sample/tkextlib/tile/themes/keramik/keramik/mbut-d.gifbin0 -> 1057 bytes-rw-r--r--ext/tk/sample/tkextlib/tile/themes/keramik/keramik/mbut-n.gifbin0 -> 1095 bytes-rw-r--r--ext/tk/sample/tkextlib/tile/themes/keramik/keramik/radio-c.gifbin0 -> 695 bytes-rw-r--r--ext/tk/sample/tkextlib/tile/themes/keramik/keramik/radio-u.gifbin0 -> 686 bytes-rw-r--r--ext/tk/sample/tkextlib/tile/themes/keramik/keramik/tab-n.gifbin0 -> 383 bytes-rw-r--r--ext/tk/sample/tkextlib/tile/themes/keramik/keramik/tab-p.gifbin0 -> 878 bytes-rw-r--r--ext/tk/sample/tkextlib/tile/themes/keramik/keramik/tbar-a.gifbin0 -> 907 bytes-rw-r--r--ext/tk/sample/tkextlib/tile/themes/keramik/keramik/tbar-n.gifbin0 -> 238 bytes-rw-r--r--ext/tk/sample/tkextlib/tile/themes/keramik/keramik/tbar-p.gifbin0 -> 927 bytes-rw-r--r--ext/tk/sample/tkextlib/tile/themes/keramik/keramik/vsb-n.gifbin0 -> 405 bytes-rw-r--r--ext/tk/sample/tkextlib/tile/themes/keramik/keramik/vsb-p.gifbin0 -> 399 bytes-rw-r--r--ext/tk/sample/tkextlib/tile/themes/keramik/keramik/vslider-n.gifbin0 -> 587 bytes-rw-r--r--ext/tk/sample/tkextlib/tile/themes/keramik/pkgIndex.tcl15
-rw-r--r--ext/tk/sample/tkextlib/tile/themes/kroc.rb226
-rw-r--r--ext/tk/sample/tkextlib/tile/themes/kroc/kroc.tcl163
-rw-r--r--ext/tk/sample/tkextlib/tile/themes/kroc/kroc/button-h.gifbin0 -> 522 bytes-rw-r--r--ext/tk/sample/tkextlib/tile/themes/kroc/kroc/button-n.gifbin0 -> 554 bytes-rw-r--r--ext/tk/sample/tkextlib/tile/themes/kroc/kroc/button-p.gifbin0 -> 548 bytes-rw-r--r--ext/tk/sample/tkextlib/tile/themes/kroc/kroc/check-hc.gifbin0 -> 281 bytes-rw-r--r--ext/tk/sample/tkextlib/tile/themes/kroc/kroc/check-hu.gifbin0 -> 273 bytes-rw-r--r--ext/tk/sample/tkextlib/tile/themes/kroc/kroc/check-nc.gifbin0 -> 303 bytes-rw-r--r--ext/tk/sample/tkextlib/tile/themes/kroc/kroc/check-nu.gifbin0 -> 294 bytes-rw-r--r--ext/tk/sample/tkextlib/tile/themes/kroc/kroc/radio-hc.gifbin0 -> 652 bytes-rw-r--r--ext/tk/sample/tkextlib/tile/themes/kroc/kroc/radio-hu.gifbin0 -> 644 bytes-rw-r--r--ext/tk/sample/tkextlib/tile/themes/kroc/kroc/radio-nc.gifbin0 -> 632 bytes-rw-r--r--ext/tk/sample/tkextlib/tile/themes/kroc/kroc/radio-nu.gifbin0 -> 621 bytes-rw-r--r--ext/tk/sample/tkextlib/tile/themes/kroc/pkgIndex.tcl15
-rw-r--r--ext/tk/sample/tkextlib/tile/themes/plastik/pkgIndex.tcl16
-rw-r--r--ext/tk/sample/tkextlib/tile/themes/plastik/plastik.tcl125
-rw-r--r--ext/tk/sample/tkextlib/tile/themes/plastik/plastik/arrowdown-n.gifbin0 -> 362 bytes-rw-r--r--ext/tk/sample/tkextlib/tile/themes/plastik/plastik/arrowdown-p.gifbin0 -> 250 bytes-rw-r--r--ext/tk/sample/tkextlib/tile/themes/plastik/plastik/arrowleft-n.gifbin0 -> 378 bytes-rw-r--r--ext/tk/sample/tkextlib/tile/themes/plastik/plastik/arrowleft-p.gifbin0 -> 267 bytes-rw-r--r--ext/tk/sample/tkextlib/tile/themes/plastik/plastik/arrowright-n.gifbin0 -> 379 bytes-rw-r--r--ext/tk/sample/tkextlib/tile/themes/plastik/plastik/arrowright-p.gifbin0 -> 266 bytes-rw-r--r--ext/tk/sample/tkextlib/tile/themes/plastik/plastik/arrowup-n.gifbin0 -> 363 bytes-rw-r--r--ext/tk/sample/tkextlib/tile/themes/plastik/plastik/arrowup-p.gifbin0 -> 251 bytes-rw-r--r--ext/tk/sample/tkextlib/tile/themes/plastik/plastik/button-h.gifbin0 -> 439 bytes-rw-r--r--ext/tk/sample/tkextlib/tile/themes/plastik/plastik/button-n.gifbin0 -> 443 bytes-rw-r--r--ext/tk/sample/tkextlib/tile/themes/plastik/plastik/button-p.gifbin0 -> 302 bytes-rw-r--r--ext/tk/sample/tkextlib/tile/themes/plastik/plastik/check-hc.gifbin0 -> 169 bytes-rw-r--r--ext/tk/sample/tkextlib/tile/themes/plastik/plastik/check-hu.gifbin0 -> 170 bytes-rw-r--r--ext/tk/sample/tkextlib/tile/themes/plastik/plastik/check-nc.gifbin0 -> 235 bytes-rw-r--r--ext/tk/sample/tkextlib/tile/themes/plastik/plastik/check-nu.gifbin0 -> 226 bytes-rw-r--r--ext/tk/sample/tkextlib/tile/themes/plastik/plastik/check-pc.gifbin0 -> 169 bytes-rw-r--r--ext/tk/sample/tkextlib/tile/themes/plastik/plastik/hsb-n.gifbin0 -> 269 bytes-rw-r--r--ext/tk/sample/tkextlib/tile/themes/plastik/plastik/hslider-n.gifbin0 -> 342 bytes-rw-r--r--ext/tk/sample/tkextlib/tile/themes/plastik/plastik/radio-hc.gifbin0 -> 178 bytes-rw-r--r--ext/tk/sample/tkextlib/tile/themes/plastik/plastik/radio-hu.gifbin0 -> 179 bytes-rw-r--r--ext/tk/sample/tkextlib/tile/themes/plastik/plastik/radio-nc.gifbin0 -> 236 bytes-rw-r--r--ext/tk/sample/tkextlib/tile/themes/plastik/plastik/radio-nu.gifbin0 -> 178 bytes-rw-r--r--ext/tk/sample/tkextlib/tile/themes/plastik/plastik/radio-pc.gifbin0 -> 178 bytes-rw-r--r--ext/tk/sample/tkextlib/tile/themes/plastik/plastik/vsb-n.gifbin0 -> 366 bytes-rw-r--r--ext/tk/sample/tkextlib/tile/themes/plastik/plastik/vslider-n.gifbin0 -> 336 bytes-rw-r--r--ext/tk/sample/tkextlib/tile/toolbutton.tcl152
-rw-r--r--ext/tk/sample/tkextlib/tkHTML/Orig_COPYRIGHT.txt12
-rw-r--r--ext/tk/sample/tkextlib/tkHTML/README12
-rw-r--r--ext/tk/sample/tkextlib/tkHTML/hv.rb313
-rw-r--r--ext/tk/sample/tkextlib/tkHTML/page1/image1bin0 -> 8995 bytes-rw-r--r--ext/tk/sample/tkextlib/tkHTML/page1/image10bin0 -> 3095 bytes-rw-r--r--ext/tk/sample/tkextlib/tkHTML/page1/image11bin0 -> 1425 bytes-rw-r--r--ext/tk/sample/tkextlib/tkHTML/page1/image12bin0 -> 2468 bytes-rw-r--r--ext/tk/sample/tkextlib/tkHTML/page1/image13bin0 -> 4073 bytes-rw-r--r--ext/tk/sample/tkextlib/tkHTML/page1/image14bin0 -> 53 bytes-rw-r--r--ext/tk/sample/tkextlib/tkHTML/page1/image2bin0 -> 42 bytes-rw-r--r--ext/tk/sample/tkextlib/tkHTML/page1/image3bin0 -> 3473 bytes-rw-r--r--ext/tk/sample/tkextlib/tkHTML/page1/image4bin0 -> 1988 bytes-rw-r--r--ext/tk/sample/tkextlib/tkHTML/page1/image5bin0 -> 973 bytes-rw-r--r--ext/tk/sample/tkextlib/tkHTML/page1/image6bin0 -> 2184 bytes-rw-r--r--ext/tk/sample/tkextlib/tkHTML/page1/image7bin0 -> 2022 bytes-rw-r--r--ext/tk/sample/tkextlib/tkHTML/page1/image8bin0 -> 1186 bytes-rw-r--r--ext/tk/sample/tkextlib/tkHTML/page1/image9bin0 -> 139 bytes-rw-r--r--ext/tk/sample/tkextlib/tkHTML/page1/index.html115
-rw-r--r--ext/tk/sample/tkextlib/tkHTML/page2/image1bin0 -> 1966 bytes-rw-r--r--ext/tk/sample/tkextlib/tkHTML/page2/image10bin0 -> 255 bytes-rw-r--r--ext/tk/sample/tkextlib/tkHTML/page2/image11bin0 -> 590 bytes-rw-r--r--ext/tk/sample/tkextlib/tkHTML/page2/image12bin0 -> 254 bytes-rw-r--r--ext/tk/sample/tkextlib/tkHTML/page2/image13bin0 -> 493 bytes-rw-r--r--ext/tk/sample/tkextlib/tkHTML/page2/image14bin0 -> 195 bytes-rw-r--r--ext/tk/sample/tkextlib/tkHTML/page2/image15bin0 -> 68 bytes-rw-r--r--ext/tk/sample/tkextlib/tkHTML/page2/image16bin0 -> 157 bytes-rw-r--r--ext/tk/sample/tkextlib/tkHTML/page2/image17bin0 -> 81 bytes-rw-r--r--ext/tk/sample/tkextlib/tkHTML/page2/image18bin0 -> 545 bytes-rw-r--r--ext/tk/sample/tkextlib/tkHTML/page2/image19bin0 -> 53 bytes-rw-r--r--ext/tk/sample/tkextlib/tkHTML/page2/image2bin0 -> 49 bytes-rw-r--r--ext/tk/sample/tkextlib/tkHTML/page2/image20bin0 -> 533 bytes-rw-r--r--ext/tk/sample/tkextlib/tkHTML/page2/image21bin0 -> 564 bytes-rw-r--r--ext/tk/sample/tkextlib/tkHTML/page2/image22bin0 -> 81 bytes-rw-r--r--ext/tk/sample/tkextlib/tkHTML/page2/image23bin0 -> 539 bytes-rw-r--r--ext/tk/sample/tkextlib/tkHTML/page2/image24bin0 -> 151 bytes-rw-r--r--ext/tk/sample/tkextlib/tkHTML/page2/image25bin0 -> 453 bytes-rw-r--r--ext/tk/sample/tkextlib/tkHTML/page2/image26bin0 -> 520 bytes-rw-r--r--ext/tk/sample/tkextlib/tkHTML/page2/image27bin0 -> 565 bytes-rw-r--r--ext/tk/sample/tkextlib/tkHTML/page2/image28bin0 -> 416 bytes-rw-r--r--ext/tk/sample/tkextlib/tkHTML/page2/image29bin0 -> 121 bytes-rw-r--r--ext/tk/sample/tkextlib/tkHTML/page2/image3bin0 -> 10835 bytes-rw-r--r--ext/tk/sample/tkextlib/tkHTML/page2/image30bin0 -> 663 bytes-rw-r--r--ext/tk/sample/tkextlib/tkHTML/page2/image31bin0 -> 78 bytes-rw-r--r--ext/tk/sample/tkextlib/tkHTML/page2/image32bin0 -> 556 bytes-rw-r--r--ext/tk/sample/tkextlib/tkHTML/page2/image33bin0 -> 598 bytes-rw-r--r--ext/tk/sample/tkextlib/tkHTML/page2/image34bin0 -> 496 bytes-rw-r--r--ext/tk/sample/tkextlib/tkHTML/page2/image35bin0 -> 724 bytes-rw-r--r--ext/tk/sample/tkextlib/tkHTML/page2/image36bin0 -> 404 bytes-rw-r--r--ext/tk/sample/tkextlib/tkHTML/page2/image37bin0 -> 124 bytes-rw-r--r--ext/tk/sample/tkextlib/tkHTML/page2/image38bin0 -> 8330 bytes-rw-r--r--ext/tk/sample/tkextlib/tkHTML/page2/image39bin0 -> 369 bytes-rw-r--r--ext/tk/sample/tkextlib/tkHTML/page2/image4bin0 -> 268 bytes-rw-r--r--ext/tk/sample/tkextlib/tkHTML/page2/image5bin0 -> 492 bytes-rw-r--r--ext/tk/sample/tkextlib/tkHTML/page2/image6bin0 -> 246 bytes-rw-r--r--ext/tk/sample/tkextlib/tkHTML/page2/image7bin0 -> 551 bytes-rw-r--r--ext/tk/sample/tkextlib/tkHTML/page2/image8bin0 -> 497 bytes-rw-r--r--ext/tk/sample/tkextlib/tkHTML/page2/image9bin0 -> 492 bytes-rw-r--r--ext/tk/sample/tkextlib/tkHTML/page2/index.html433
-rw-r--r--ext/tk/sample/tkextlib/tkHTML/page3/image1bin0 -> 113 bytes-rw-r--r--ext/tk/sample/tkextlib/tkHTML/page3/image10bin0 -> 5088 bytes-rw-r--r--ext/tk/sample/tkextlib/tkHTML/page3/image11bin0 -> 4485 bytes-rw-r--r--ext/tk/sample/tkextlib/tkHTML/page3/image12bin0 -> 3579 bytes-rw-r--r--ext/tk/sample/tkextlib/tkHTML/page3/image13bin0 -> 5119 bytes-rw-r--r--ext/tk/sample/tkextlib/tkHTML/page3/image14bin0 -> 3603 bytes-rw-r--r--ext/tk/sample/tkextlib/tkHTML/page3/image2bin0 -> 74 bytes-rw-r--r--ext/tk/sample/tkextlib/tkHTML/page3/image3bin0 -> 681 bytes-rw-r--r--ext/tk/sample/tkextlib/tkHTML/page3/image4bin0 -> 3056 bytes-rw-r--r--ext/tk/sample/tkextlib/tkHTML/page3/image5bin0 -> 2297 bytes-rw-r--r--ext/tk/sample/tkextlib/tkHTML/page3/image6bin0 -> 79 bytes-rw-r--r--ext/tk/sample/tkextlib/tkHTML/page3/image7bin0 -> 1613 bytes-rw-r--r--ext/tk/sample/tkextlib/tkHTML/page3/image8bin0 -> 864 bytes-rw-r--r--ext/tk/sample/tkextlib/tkHTML/page3/image9bin0 -> 2379 bytes-rw-r--r--ext/tk/sample/tkextlib/tkHTML/page3/index.html2787
-rw-r--r--ext/tk/sample/tkextlib/tkHTML/page4/image1bin0 -> 42 bytes-rw-r--r--ext/tk/sample/tkextlib/tkHTML/page4/image2bin0 -> 14343 bytes-rw-r--r--ext/tk/sample/tkextlib/tkHTML/page4/image3bin0 -> 17750 bytes-rw-r--r--ext/tk/sample/tkextlib/tkHTML/page4/image4bin0 -> 61 bytes-rw-r--r--ext/tk/sample/tkextlib/tkHTML/page4/image5bin0 -> 201 bytes-rw-r--r--ext/tk/sample/tkextlib/tkHTML/page4/image6bin0 -> 214 bytes-rw-r--r--ext/tk/sample/tkextlib/tkHTML/page4/image7bin0 -> 149 bytes-rw-r--r--ext/tk/sample/tkextlib/tkHTML/page4/image8bin0 -> 203 bytes-rw-r--r--ext/tk/sample/tkextlib/tkHTML/page4/image9bin0 -> 1504 bytes-rw-r--r--ext/tk/sample/tkextlib/tkHTML/page4/index.html768
-rw-r--r--ext/tk/sample/tkextlib/tkHTML/ss.rb436
-rw-r--r--ext/tk/sample/tkextlib/tkimg/demo.rb1478
-rw-r--r--ext/tk/sample/tkextlib/tkimg/license_terms_of_Img_extension41
-rw-r--r--ext/tk/sample/tkextlib/tkimg/readme.txt3
-rw-r--r--ext/tk/sample/tkextlib/tktable/Orig_LICENSE.txt52
-rw-r--r--ext/tk/sample/tkextlib/tktable/basic.rb60
-rw-r--r--ext/tk/sample/tkextlib/tktable/buttons.rb76
-rw-r--r--ext/tk/sample/tkextlib/tktable/command.rb89
-rw-r--r--ext/tk/sample/tkextlib/tktable/debug.rb101
-rw-r--r--ext/tk/sample/tkextlib/tktable/dynarows.rb99
-rw-r--r--ext/tk/sample/tkextlib/tktable/maxsize.rb67
-rw-r--r--ext/tk/sample/tkextlib/tktable/spreadsheet.rb137
-rw-r--r--ext/tk/sample/tkextlib/tktable/tcllogo.gifbin0 -> 2341 bytes-rw-r--r--ext/tk/sample/tkextlib/tktable/valid.rb88
-rw-r--r--ext/tk/sample/tkextlib/treectrl/bitmaps.rb76
-rw-r--r--ext/tk/sample/tkextlib/treectrl/demo.rb1305
-rw-r--r--ext/tk/sample/tkextlib/treectrl/explorer.rb430
-rw-r--r--ext/tk/sample/tkextlib/treectrl/help.rb404
-rw-r--r--ext/tk/sample/tkextlib/treectrl/imovie.rb130
-rw-r--r--ext/tk/sample/tkextlib/treectrl/layout.rb159
-rw-r--r--ext/tk/sample/tkextlib/treectrl/mailwasher.rb269
-rw-r--r--ext/tk/sample/tkextlib/treectrl/outlook-folders.rb124
-rw-r--r--ext/tk/sample/tkextlib/treectrl/outlook-newgroup.rb448
-rw-r--r--ext/tk/sample/tkextlib/treectrl/pics/big-dll.gifbin0 -> 437 bytes-rw-r--r--ext/tk/sample/tkextlib/treectrl/pics/big-exe.gifbin0 -> 368 bytes-rw-r--r--ext/tk/sample/tkextlib/treectrl/pics/big-file.gifbin0 -> 466 bytes-rw-r--r--ext/tk/sample/tkextlib/treectrl/pics/big-folder.gifbin0 -> 459 bytes-rw-r--r--ext/tk/sample/tkextlib/treectrl/pics/big-txt.gifbin0 -> 392 bytes-rw-r--r--ext/tk/sample/tkextlib/treectrl/pics/checked.gifbin0 -> 78 bytes-rw-r--r--ext/tk/sample/tkextlib/treectrl/pics/file.gifbin0 -> 279 bytes-rw-r--r--ext/tk/sample/tkextlib/treectrl/pics/folder-closed.gifbin0 -> 111 bytes-rw-r--r--ext/tk/sample/tkextlib/treectrl/pics/folder-open.gifbin0 -> 120 bytes-rw-r--r--ext/tk/sample/tkextlib/treectrl/pics/help-book-closed.gifbin0 -> 115 bytes-rw-r--r--ext/tk/sample/tkextlib/treectrl/pics/help-book-open.gifbin0 -> 128 bytes-rw-r--r--ext/tk/sample/tkextlib/treectrl/pics/help-page.gifbin0 -> 132 bytes-rw-r--r--ext/tk/sample/tkextlib/treectrl/pics/imovie-01.gifbin0 -> 5406 bytes-rw-r--r--ext/tk/sample/tkextlib/treectrl/pics/imovie-02.gifbin0 -> 5912 bytes-rw-r--r--ext/tk/sample/tkextlib/treectrl/pics/imovie-03.gifbin0 -> 4696 bytes-rw-r--r--ext/tk/sample/tkextlib/treectrl/pics/imovie-04.gifbin0 -> 5783 bytes-rw-r--r--ext/tk/sample/tkextlib/treectrl/pics/imovie-05.gifbin0 -> 3238 bytes-rw-r--r--ext/tk/sample/tkextlib/treectrl/pics/imovie-06.gifbin0 -> 3509 bytes-rw-r--r--ext/tk/sample/tkextlib/treectrl/pics/imovie-07.gifbin0 -> 2091 bytes-rw-r--r--ext/tk/sample/tkextlib/treectrl/pics/internet-check-off.gifbin0 -> 70 bytes-rw-r--r--ext/tk/sample/tkextlib/treectrl/pics/internet-check-on.gifbin0 -> 76 bytes-rw-r--r--ext/tk/sample/tkextlib/treectrl/pics/internet-print.gifbin0 -> 124 bytes-rw-r--r--ext/tk/sample/tkextlib/treectrl/pics/internet-radio-off.gifbin0 -> 68 bytes-rw-r--r--ext/tk/sample/tkextlib/treectrl/pics/internet-radio-on.gifbin0 -> 71 bytes-rw-r--r--ext/tk/sample/tkextlib/treectrl/pics/internet-search.gifbin0 -> 114 bytes-rw-r--r--ext/tk/sample/tkextlib/treectrl/pics/internet-security.gifbin0 -> 108 bytes-rw-r--r--ext/tk/sample/tkextlib/treectrl/pics/mac-collapse.gifbin0 -> 275 bytes-rw-r--r--ext/tk/sample/tkextlib/treectrl/pics/mac-expand.gifbin0 -> 277 bytes-rw-r--r--ext/tk/sample/tkextlib/treectrl/pics/outlook-arrow.gifbin0 -> 73 bytes-rw-r--r--ext/tk/sample/tkextlib/treectrl/pics/outlook-clip.gifbin0 -> 73 bytes-rw-r--r--ext/tk/sample/tkextlib/treectrl/pics/outlook-deleted.gifbin0 -> 138 bytes-rw-r--r--ext/tk/sample/tkextlib/treectrl/pics/outlook-draft.gifbin0 -> 134 bytes-rw-r--r--ext/tk/sample/tkextlib/treectrl/pics/outlook-folder.gifbin0 -> 133 bytes-rw-r--r--ext/tk/sample/tkextlib/treectrl/pics/outlook-group.gifbin0 -> 144 bytes-rw-r--r--ext/tk/sample/tkextlib/treectrl/pics/outlook-inbox.gifbin0 -> 133 bytes-rw-r--r--ext/tk/sample/tkextlib/treectrl/pics/outlook-local.gifbin0 -> 146 bytes-rw-r--r--ext/tk/sample/tkextlib/treectrl/pics/outlook-main.gifbin0 -> 174 bytes-rw-r--r--ext/tk/sample/tkextlib/treectrl/pics/outlook-outbox.gifbin0 -> 136 bytes-rw-r--r--ext/tk/sample/tkextlib/treectrl/pics/outlook-read-2.gifbin0 -> 343 bytes-rw-r--r--ext/tk/sample/tkextlib/treectrl/pics/outlook-read.gifbin0 -> 304 bytes-rw-r--r--ext/tk/sample/tkextlib/treectrl/pics/outlook-sent.gifbin0 -> 132 bytes-rw-r--r--ext/tk/sample/tkextlib/treectrl/pics/outlook-server.gifbin0 -> 163 bytes-rw-r--r--ext/tk/sample/tkextlib/treectrl/pics/outlook-unread.gifbin0 -> 303 bytes-rw-r--r--ext/tk/sample/tkextlib/treectrl/pics/outlook-watch.gifbin0 -> 98 bytes-rw-r--r--ext/tk/sample/tkextlib/treectrl/pics/sky.gifbin0 -> 6454 bytes-rw-r--r--ext/tk/sample/tkextlib/treectrl/pics/small-dll.gifbin0 -> 311 bytes-rw-r--r--ext/tk/sample/tkextlib/treectrl/pics/small-exe.gifbin0 -> 115 bytes-rw-r--r--ext/tk/sample/tkextlib/treectrl/pics/small-file.gifbin0 -> 338 bytes-rw-r--r--ext/tk/sample/tkextlib/treectrl/pics/small-folder.gifbin0 -> 307 bytes-rw-r--r--ext/tk/sample/tkextlib/treectrl/pics/small-txt.gifbin0 -> 302 bytes-rw-r--r--ext/tk/sample/tkextlib/treectrl/pics/unchecked.gifbin0 -> 72 bytes-rw-r--r--ext/tk/sample/tkextlib/treectrl/random.rb508
-rw-r--r--ext/tk/sample/tkextlib/treectrl/readme.txt2
-rw-r--r--ext/tk/sample/tkextlib/treectrl/www-options.rb303
-rw-r--r--ext/tk/sample/tkextlib/vu/Orig_LICENSE.txt51
-rw-r--r--ext/tk/sample/tkextlib/vu/README.txt50
-rw-r--r--ext/tk/sample/tkextlib/vu/canvItems.rb90
-rw-r--r--ext/tk/sample/tkextlib/vu/canvSticker.rb82
-rw-r--r--ext/tk/sample/tkextlib/vu/canvSticker2.rb101
-rw-r--r--ext/tk/sample/tkextlib/vu/dial_demo.rb113
-rw-r--r--ext/tk/sample/tkextlib/vu/m128_000.xbm174
-rw-r--r--ext/tk/sample/tkextlib/vu/oscilloscope.rb68
-rw-r--r--ext/tk/sample/tkextlib/vu/pie.rb56
-rw-r--r--ext/tk/sample/tkextlib/vu/vu_demo.rb67
-rw-r--r--ext/tk/sample/tkfrom.rb32
-rw-r--r--ext/tk/sample/tkhello.rb10
-rw-r--r--ext/tk/sample/tkline.rb6
-rw-r--r--ext/tk/sample/tkmenubutton.rb135
-rw-r--r--ext/tk/sample/tkmsgcat-load_rb.rb102
-rw-r--r--ext/tk/sample/tkmsgcat-load_rb2.rb102
-rw-r--r--ext/tk/sample/tkmsgcat-load_tk.rb118
-rw-r--r--ext/tk/sample/tkmulticolumnlist.rb743
-rw-r--r--ext/tk/sample/tkmultilistbox.rb654
-rw-r--r--ext/tk/sample/tkmultilistframe.rb940
-rw-r--r--ext/tk/sample/tkoptdb-safeTk.rb73
-rw-r--r--ext/tk/sample/tkoptdb.rb106
-rw-r--r--ext/tk/sample/tkrttimer.rb77
-rw-r--r--ext/tk/sample/tksleep_sample.rb29
-rw-r--r--ext/tk/sample/tktextframe.rb281
-rw-r--r--ext/tk/sample/tktextio.rb1060
-rw-r--r--ext/tk/sample/tktimer.rb2
-rw-r--r--ext/tk/sample/tktimer2.rb47
-rw-r--r--ext/tk/sample/tktimer3.rb59
-rw-r--r--ext/tk/sample/tktree.rb103
-rw-r--r--ext/tk/sample/tktree.tcl305
-rw-r--r--ext/tk/sample/ttk_wrapper.rb154
-rw-r--r--ext/tk/stubs.c594
-rw-r--r--ext/tk/stubs.h33
-rw-r--r--ext/tk/tcltklib.c11110
-rw-r--r--ext/tk/tkutil.c45
-rw-r--r--ext/tk/tkutil/depend1
-rw-r--r--ext/tk/tkutil/extconf.rb18
-rw-r--r--ext/tk/tkutil/tkutil.c1866
-rw-r--r--ext/win32ole/depend1
-rw-r--r--ext/win32ole/extconf.rb35
-rw-r--r--ext/win32ole/lib/win32ole.rb22
-rw-r--r--ext/win32ole/lib/win32ole/property.rb16
-rw-r--r--ext/win32ole/sample/excel1.rb33
-rw-r--r--ext/win32ole/sample/excel2.rb30
-rw-r--r--ext/win32ole/sample/excel3.rb13
-rw-r--r--ext/win32ole/sample/ie.rb11
-rw-r--r--ext/win32ole/sample/ieconst.rb32
-rw-r--r--ext/win32ole/sample/ienavi.rb40
-rw-r--r--ext/win32ole/sample/ienavi2.rb40
-rw-r--r--ext/win32ole/sample/oledirs.rb23
-rw-r--r--ext/win32ole/sample/olegen.rb347
-rw-r--r--ext/win32ole/sample/xml.rb7306
-rw-r--r--ext/win32ole/win32ole.c9318
-rw-r--r--ext/zlib/extconf.rb64
-rw-r--r--ext/zlib/zlib.c4587
-rw-r--r--file.c5129
-rw-r--r--gc.c4830
-rw-r--r--gc.h104
-rw-r--r--gem_prelude.rb1
-rw-r--r--golf_prelude.rb122
-rw-r--r--goruby.c58
-rw-r--r--hash.c3321
-rw-r--r--ia64.s42
-rw-r--r--id.c58
-rw-r--r--include/ruby.h35
-rw-r--r--include/ruby/backward/classext.h18
-rw-r--r--include/ruby/backward/rubyio.h6
-rw-r--r--include/ruby/backward/rubysig.h56
-rw-r--r--include/ruby/backward/st.h6
-rw-r--r--include/ruby/backward/util.h6
-rw-r--r--include/ruby/defines.h264
-rw-r--r--include/ruby/encoding.h354
-rw-r--r--include/ruby/intern.h913
-rw-r--r--include/ruby/io.h203
-rw-r--r--include/ruby/missing.h245
-rw-r--r--include/ruby/oniguruma.h839
-rw-r--r--include/ruby/re.h75
-rw-r--r--include/ruby/regex.h50
-rw-r--r--include/ruby/ruby.h1694
-rw-r--r--include/ruby/st.h157
-rw-r--r--include/ruby/subst.h19
-rw-r--r--include/ruby/thread.h46
-rw-r--r--include/ruby/util.h99
-rw-r--r--include/ruby/version.h78
-rw-r--r--include/ruby/vm.h68
-rw-r--r--include/ruby/win32.h799
-rw-r--r--inits.c115
-rw-r--r--insns.def2113
-rw-r--r--instruby.rb102
-rw-r--r--intern.h385
-rw-r--r--internal.h350
-rw-r--r--io.c12011
-rw-r--r--iseq.c1936
-rw-r--r--iseq.h134
-rw-r--r--keywords42
-rw-r--r--lex.c132
-rw-r--r--lex.c.blt219
-rw-r--r--lib/English.rb133
-rw-r--r--lib/Env.rb18
-rw-r--r--lib/README103
-rw-r--r--lib/abbrev.rb137
-rw-r--r--lib/base64.rb110
-rw-r--r--lib/benchmark.rb570
-rw-r--r--lib/cgi-lib.rb270
-rw-r--r--lib/cgi.rb2224
-rw-r--r--lib/cgi/cookie.rb164
-rw-r--r--lib/cgi/core.rb845
-rw-r--r--lib/cgi/html.rb1076
-rw-r--r--lib/cgi/session.rb553
-rw-r--r--lib/cgi/session/pstore.rb111
-rw-r--r--lib/cgi/util.rb198
-rw-r--r--lib/cmath.rb402
-rw-r--r--lib/complex.rb504
-rw-r--r--lib/csv.rb2400
-rw-r--r--lib/date.rb345
-rw-r--r--lib/date2.rb5
-rw-r--r--lib/debug.rb1220
-rw-r--r--lib/delegate.rb413
-rw-r--r--lib/drb.rb2
-rw-r--r--lib/drb/acl.rb250
-rw-r--r--lib/drb/drb.rb1768
-rw-r--r--lib/drb/eq.rb14
-rw-r--r--lib/drb/extserv.rb71
-rw-r--r--lib/drb/extservm.rb93
-rw-r--r--lib/drb/gw.rb122
-rw-r--r--lib/drb/invokemethod.rb34
-rw-r--r--lib/drb/observer.rb22
-rw-r--r--lib/drb/ssl.rb196
-rw-r--r--lib/drb/timeridconv.rb91
-rw-r--r--lib/drb/unix.rb108
-rw-r--r--lib/e2mmap.rb110
-rw-r--r--lib/erb.rb990
-rw-r--r--lib/eregex.rb37
-rw-r--r--lib/fileutils.rb1723
-rw-r--r--lib/final.rb4
-rw-r--r--lib/finalize.rb201
-rw-r--r--lib/find.rb96
-rw-r--r--lib/forwardable.rb285
-rw-r--r--lib/ftools.rb185
-rw-r--r--lib/ftplib.rb14
-rw-r--r--lib/getoptlong.rb432
-rw-r--r--lib/getopts.rb127
-rw-r--r--lib/gserver.rb309
-rw-r--r--lib/importenv.rb32
-rw-r--r--lib/ipaddr.rb930
-rw-r--r--lib/irb.rb352
-rw-r--r--lib/irb/cmd/chws.rb32
-rw-r--r--lib/irb/cmd/fork.rb38
-rw-r--r--lib/irb/cmd/help.rb39
-rw-r--r--lib/irb/cmd/load.rb66
-rw-r--r--lib/irb/cmd/nop.rb38
-rw-r--r--lib/irb/cmd/pushws.rb38
-rw-r--r--lib/irb/cmd/subirb.rb40
-rw-r--r--lib/irb/completion.rb222
-rw-r--r--lib/irb/context.rb295
-rw-r--r--lib/irb/ext/change-ws.rb61
-rw-r--r--lib/irb/ext/history.rb109
-rw-r--r--lib/irb/ext/loader.rb119
-rw-r--r--lib/irb/ext/math-mode.rb36
-rw-r--r--lib/irb/ext/multi-irb.rb242
-rw-r--r--lib/irb/ext/save-history.rb97
-rw-r--r--lib/irb/ext/tracer.rb60
-rw-r--r--lib/irb/ext/use-loader.rb64
-rw-r--r--lib/irb/ext/workspaces.rb55
-rw-r--r--lib/irb/extend-command.rb268
-rw-r--r--lib/irb/frame.rb7
-rw-r--r--lib/irb/help.rb35
-rw-r--r--lib/irb/init.rb305
-rw-r--r--lib/irb/input-method.rb62
-rw-r--r--lib/irb/inspector.rb109
-rw-r--r--lib/irb/lc/error.rb29
-rw-r--r--lib/irb/lc/help-message40
-rw-r--r--lib/irb/lc/ja/encoding_aliases.rb8
-rw-r--r--lib/irb/lc/ja/error.rb27
-rw-r--r--lib/irb/lc/ja/help-message41
-rw-r--r--lib/irb/loader.rb118
-rw-r--r--lib/irb/locale.rb182
-rw-r--r--lib/irb/magic-file.rb36
-rw-r--r--lib/irb/main.rb867
-rw-r--r--lib/irb/multi-irb.rb212
-rw-r--r--lib/irb/notifier.rb144
-rw-r--r--lib/irb/output-method.rb69
-rw-r--r--lib/irb/ruby-lex.rb533
-rw-r--r--lib/irb/ruby-token.rb35
-rw-r--r--lib/irb/slex.rb375
-rw-r--r--lib/irb/src_encoding.rb4
-rw-r--r--lib/irb/version.rb13
-rw-r--r--lib/irb/workspace-binding-2.rb15
-rw-r--r--lib/irb/workspace-binding.rb77
-rw-r--r--lib/irb/workspace.rb108
-rw-r--r--lib/irb/ws-for-case-2.rb14
-rw-r--r--lib/irb/xmp.rb27
-rw-r--r--lib/jcode.rb213
-rw-r--r--lib/logger.rb805
-rw-r--r--lib/mailread.rb48
-rw-r--r--lib/mathn.rb443
-rw-r--r--lib/matrix.rb2205
-rw-r--r--lib/matrix/eigenvalue_decomposition.rb886
-rw-r--r--lib/matrix/lup_decomposition.rb218
-rw-r--r--lib/minitest/README.txt348
-rw-r--r--lib/minitest/autorun.rb19
-rw-r--r--lib/minitest/benchmark.rb380
-rw-r--r--lib/minitest/mock.rb173
-rw-r--r--lib/minitest/pride.rb119
-rw-r--r--lib/minitest/spec.rb541
-rw-r--r--lib/minitest/unit.rb1354
-rw-r--r--lib/mkmf.rb2746
-rw-r--r--lib/monitor.rb410
-rw-r--r--lib/mutex_m.rb140
-rw-r--r--lib/net/ftp.rb1242
-rw-r--r--lib/net/http.rb2305
-rw-r--r--lib/net/http/backward.rb25
-rw-r--r--lib/net/http/exceptions.rb25
-rw-r--r--lib/net/http/generic_request.rb266
-rw-r--r--lib/net/http/header.rb452
-rw-r--r--lib/net/http/proxy_delta.rb16
-rw-r--r--lib/net/http/request.rb20
-rw-r--r--lib/net/http/requests.rb122
-rw-r--r--lib/net/http/response.rb390
-rw-r--r--lib/net/http/responses.rb268
-rw-r--r--lib/net/https.rb22
-rw-r--r--lib/net/imap.rb4539
-rw-r--r--lib/net/pop.rb1210
-rw-r--r--lib/net/protocol.rb997
-rw-r--r--lib/net/smtp.rb1139
-rw-r--r--lib/net/telnet.rb635
-rw-r--r--lib/observer.rb178
-rw-r--r--lib/open-uri.rb773
-rw-r--r--lib/open3.rb751
-rw-r--r--lib/optparse.rb1936
-rw-r--r--lib/optparse/ac.rb50
-rw-r--r--lib/optparse/date.rb17
-rw-r--r--lib/optparse/shellwords.rb6
-rw-r--r--lib/optparse/time.rb10
-rw-r--r--lib/optparse/uri.rb6
-rw-r--r--lib/optparse/version.rb70
-rw-r--r--lib/ostruct.rb291
-rw-r--r--lib/parsearg.rb83
-rw-r--r--lib/parsedate.rb181
-rw-r--r--lib/ping.rb64
-rw-r--r--lib/pp.rb516
-rw-r--r--lib/prettyprint.rb395
-rw-r--r--lib/prime.rb509
-rw-r--r--lib/profile.rb63
-rw-r--r--lib/profiler.rb126
-rw-r--r--lib/pstore.rb482
-rw-r--r--lib/racc/parser.rb439
-rw-r--r--lib/rake.rb69
-rw-r--r--lib/rake/alt_system.rb109
-rw-r--r--lib/rake/application.rb595
-rw-r--r--lib/rake/classic_namespace.rb11
-rw-r--r--lib/rake/clean.rb32
-rw-r--r--lib/rake/cloneable.rb25
-rw-r--r--lib/rake/contrib/compositepublisher.rb21
-rw-r--r--lib/rake/contrib/ftptools.rb150
-rw-r--r--lib/rake/contrib/publisher.rb73
-rw-r--r--lib/rake/contrib/rubyforgepublisher.rb16
-rw-r--r--lib/rake/contrib/sshpublisher.rb50
-rw-r--r--lib/rake/contrib/sys.rb191
-rw-r--r--lib/rake/default_loader.rb10
-rw-r--r--lib/rake/dsl_definition.rb176
-rw-r--r--lib/rake/early_time.rb18
-rw-r--r--lib/rake/ext/core.rb27
-rw-r--r--lib/rake/ext/module.rb39
-rw-r--r--lib/rake/ext/string.rb167
-rw-r--r--lib/rake/ext/time.rb14
-rw-r--r--lib/rake/file_creation_task.rb24
-rw-r--r--lib/rake/file_list.rb403
-rw-r--r--lib/rake/file_task.rb47
-rw-r--r--lib/rake/file_utils.rb114
-rw-r--r--lib/rake/file_utils_ext.rb145
-rw-r--r--lib/rake/gempackagetask.rb15
-rw-r--r--lib/rake/invocation_chain.rb51
-rw-r--r--lib/rake/invocation_exception_mixin.rb16
-rw-r--r--lib/rake/lib/project.rake21
-rw-r--r--lib/rake/loaders/makefile.rb40
-rw-r--r--lib/rake/multi_task.rb16
-rw-r--r--lib/rake/name_space.rb25
-rw-r--r--lib/rake/packagetask.rb185
-rw-r--r--lib/rake/pathmap.rb1
-rw-r--r--lib/rake/pseudo_status.rb24
-rw-r--r--lib/rake/rake_module.rb29
-rw-r--r--lib/rake/rake_test_loader.rb22
-rw-r--r--lib/rake/rdoctask.rb234
-rwxr-xr-xlib/rake/ruby182_test_unit_fix.rb25
-rw-r--r--lib/rake/rule_recursion_overflow_error.rb20
-rw-r--r--lib/rake/runtest.rb21
-rw-r--r--lib/rake/task.rb327
-rw-r--r--lib/rake/task_argument_error.rb7
-rw-r--r--lib/rake/task_arguments.rb78
-rw-r--r--lib/rake/task_manager.rb307
-rw-r--r--lib/rake/tasklib.rb22
-rw-r--r--lib/rake/testtask.rb191
-rw-r--r--lib/rake/version.rb8
-rw-r--r--lib/rake/win32.rb55
-rw-r--r--lib/rational.rb391
-rw-r--r--lib/rbconfig/.document1
-rw-r--r--lib/rbconfig/datadir.rb13
-rw-r--r--lib/rbconfig/obsolete.rb38
-rw-r--r--lib/rdoc.rb147
-rw-r--r--lib/rdoc/alias.rb113
-rw-r--r--lib/rdoc/anon_class.rb12
-rw-r--r--lib/rdoc/any_method.rb207
-rw-r--r--lib/rdoc/attr.rb136
-rw-r--r--lib/rdoc/class_module.rb582
-rw-r--r--lib/rdoc/code_object.rb307
-rw-r--r--lib/rdoc/code_objects.rb23
-rw-r--r--lib/rdoc/constant.rb86
-rw-r--r--lib/rdoc/context.rb1191
-rw-r--r--lib/rdoc/cross_reference.rb173
-rw-r--r--lib/rdoc/encoding.rb92
-rw-r--r--lib/rdoc/erbio.rb37
-rw-r--r--lib/rdoc/generator.rb40
-rw-r--r--lib/rdoc/generator/darkfish.rb390
-rw-r--r--lib/rdoc/generator/markup.rb208
-rw-r--r--lib/rdoc/generator/ri.rb86
-rw-r--r--lib/rdoc/generator/template/darkfish/.document (renamed from install-sh)0
-rw-r--r--lib/rdoc/generator/template/darkfish/classpage.rhtml321
-rw-r--r--lib/rdoc/generator/template/darkfish/filepage.rhtml124
-rw-r--r--lib/rdoc/generator/template/darkfish/images/brick.pngbin0 -> 452 bytes-rw-r--r--lib/rdoc/generator/template/darkfish/images/brick_link.pngbin0 -> 764 bytes-rw-r--r--lib/rdoc/generator/template/darkfish/images/bug.pngbin0 -> 774 bytes-rw-r--r--lib/rdoc/generator/template/darkfish/images/bullet_black.pngbin0 -> 211 bytes-rw-r--r--lib/rdoc/generator/template/darkfish/images/bullet_toggle_minus.pngbin0 -> 207 bytes-rw-r--r--lib/rdoc/generator/template/darkfish/images/bullet_toggle_plus.pngbin0 -> 209 bytes-rw-r--r--lib/rdoc/generator/template/darkfish/images/date.pngbin0 -> 626 bytes-rw-r--r--lib/rdoc/generator/template/darkfish/images/find.pngbin0 -> 659 bytes-rw-r--r--lib/rdoc/generator/template/darkfish/images/loadingAnimation.gifbin0 -> 5886 bytes-rw-r--r--lib/rdoc/generator/template/darkfish/images/macFFBgHack.pngbin0 -> 207 bytes-rw-r--r--lib/rdoc/generator/template/darkfish/images/package.pngbin0 -> 853 bytes-rw-r--r--lib/rdoc/generator/template/darkfish/images/page_green.pngbin0 -> 621 bytes-rw-r--r--lib/rdoc/generator/template/darkfish/images/page_white_text.pngbin0 -> 342 bytes-rw-r--r--lib/rdoc/generator/template/darkfish/images/page_white_width.pngbin0 -> 309 bytes-rw-r--r--lib/rdoc/generator/template/darkfish/images/plugin.pngbin0 -> 591 bytes-rw-r--r--lib/rdoc/generator/template/darkfish/images/ruby.pngbin0 -> 592 bytes-rw-r--r--lib/rdoc/generator/template/darkfish/images/tag_green.pngbin0 -> 613 bytes-rw-r--r--lib/rdoc/generator/template/darkfish/images/wrench.pngbin0 -> 610 bytes-rw-r--r--lib/rdoc/generator/template/darkfish/images/wrench_orange.pngbin0 -> 584 bytes-rw-r--r--lib/rdoc/generator/template/darkfish/images/zoom.pngbin0 -> 692 bytes-rw-r--r--lib/rdoc/generator/template/darkfish/index.rhtml64
-rw-r--r--lib/rdoc/generator/template/darkfish/js/darkfish.js116
-rw-r--r--lib/rdoc/generator/template/darkfish/js/jquery.js32
-rw-r--r--lib/rdoc/generator/template/darkfish/js/quicksearch.js114
-rw-r--r--lib/rdoc/generator/template/darkfish/js/thickbox-compressed.js10
-rw-r--r--lib/rdoc/generator/template/darkfish/rdoc.css763
-rw-r--r--lib/rdoc/ghost_method.rb8
-rw-r--r--lib/rdoc/include.rb100
-rw-r--r--lib/rdoc/known_classes.rb72
-rw-r--r--lib/rdoc/markup.rb652
-rw-r--r--lib/rdoc/markup/attribute_manager.rb335
-rw-r--r--lib/rdoc/markup/blank_line.rb27
-rw-r--r--lib/rdoc/markup/document.rb127
-rw-r--r--lib/rdoc/markup/formatter.rb169
-rw-r--r--lib/rdoc/markup/formatter_test_case.rb699
-rw-r--r--lib/rdoc/markup/heading.rb20
-rw-r--r--lib/rdoc/markup/indented_paragraph.rb33
-rw-r--r--lib/rdoc/markup/inline.rb144
-rw-r--r--lib/rdoc/markup/list.rb81
-rw-r--r--lib/rdoc/markup/list_item.rb86
-rw-r--r--lib/rdoc/markup/paragraph.rb14
-rw-r--r--lib/rdoc/markup/parser.rb497
-rw-r--r--lib/rdoc/markup/pre_process.rb227
-rw-r--r--lib/rdoc/markup/raw.rb69
-rw-r--r--lib/rdoc/markup/rule.rb20
-rw-r--r--lib/rdoc/markup/text_formatter_test_case.rb116
-rw-r--r--lib/rdoc/markup/to_ansi.rb84
-rw-r--r--lib/rdoc/markup/to_bs.rb80
-rw-r--r--lib/rdoc/markup/to_html.rb324
-rw-r--r--lib/rdoc/markup/to_html_crossref.rb120
-rw-r--r--lib/rdoc/markup/to_rdoc.rb301
-rw-r--r--lib/rdoc/markup/to_test.rb72
-rw-r--r--lib/rdoc/markup/to_tt_only.rb114
-rw-r--r--lib/rdoc/markup/verbatim.rb45
-rw-r--r--lib/rdoc/meta_method.rb8
-rw-r--r--lib/rdoc/method_attr.rb355
-rw-r--r--lib/rdoc/normal_class.rb71
-rw-r--r--lib/rdoc/normal_module.rb66
-rw-r--r--lib/rdoc/options.rb770
-rw-r--r--lib/rdoc/parser.rb216
-rw-r--r--lib/rdoc/parser/c.rb1047
-rw-r--r--lib/rdoc/parser/ruby.rb1782
-rw-r--r--lib/rdoc/parser/ruby_tools.rb162
-rw-r--r--lib/rdoc/parser/simple.rb49
-rw-r--r--lib/rdoc/rdoc.rb520
-rw-r--r--lib/rdoc/require.rb53
-rw-r--r--lib/rdoc/ri.rb18
-rw-r--r--lib/rdoc/ri/driver.rb1178
-rw-r--r--lib/rdoc/ri/formatter.rb5
-rw-r--r--lib/rdoc/ri/paths.rb128
-rw-r--r--lib/rdoc/ri/store.rb358
-rw-r--r--lib/rdoc/ruby_lex.rb1297
-rw-r--r--lib/rdoc/ruby_token.rb416
-rw-r--r--lib/rdoc/rubygems_hook.rb220
-rw-r--r--lib/rdoc/single_class.rb23
-rw-r--r--lib/rdoc/stats.rb438
-rw-r--r--lib/rdoc/stats/normal.rb48
-rw-r--r--lib/rdoc/stats/quiet.rb59
-rw-r--r--lib/rdoc/stats/verbose.rb45
-rw-r--r--lib/rdoc/task.rb328
-rw-r--r--lib/rdoc/text.rb302
-rw-r--r--lib/rdoc/token_stream.rb50
-rw-r--r--lib/rdoc/top_level.rb474
-rw-r--r--lib/readbytes.rb36
-rw-r--r--lib/resolv-replace.rb74
-rw-r--r--lib/resolv.rb2395
-rw-r--r--lib/rexml/attlistdecl.rb62
-rw-r--r--lib/rexml/attribute.rb188
-rw-r--r--lib/rexml/cdata.rb67
-rw-r--r--lib/rexml/child.rb96
-rw-r--r--lib/rexml/comment.rb80
-rw-r--r--lib/rexml/doctype.rb269
-rw-r--r--lib/rexml/document.rb268
-rw-r--r--lib/rexml/dtd/attlistdecl.rb10
-rw-r--r--lib/rexml/dtd/dtd.rb51
-rw-r--r--lib/rexml/dtd/elementdecl.rb17
-rw-r--r--lib/rexml/dtd/entitydecl.rb56
-rw-r--r--lib/rexml/dtd/notationdecl.rb39
-rw-r--r--lib/rexml/element.rb1245
-rw-r--r--lib/rexml/encoding.rb49
-rw-r--r--lib/rexml/entity.rb166
-rw-r--r--lib/rexml/formatters/default.rb111
-rw-r--r--lib/rexml/formatters/pretty.rb141
-rw-r--r--lib/rexml/formatters/transitive.rb57
-rw-r--r--lib/rexml/functions.rb394
-rw-r--r--lib/rexml/instruction.rb70
-rw-r--r--lib/rexml/light/node.rb195
-rw-r--r--lib/rexml/namespace.rb47
-rw-r--r--lib/rexml/node.rb75
-rw-r--r--lib/rexml/output.rb24
-rw-r--r--lib/rexml/parent.rb167
-rw-r--r--lib/rexml/parseexception.rb51
-rw-r--r--lib/rexml/parsers/baseparser.rb530
-rw-r--r--lib/rexml/parsers/lightparser.rb58
-rw-r--r--lib/rexml/parsers/pullparser.rb196
-rw-r--r--lib/rexml/parsers/sax2parser.rb247
-rw-r--r--lib/rexml/parsers/streamparser.rb46
-rw-r--r--lib/rexml/parsers/treeparser.rb100
-rw-r--r--lib/rexml/parsers/ultralightparser.rb56
-rw-r--r--lib/rexml/parsers/xpathparser.rb697
-rw-r--r--lib/rexml/quickpath.rb265
-rw-r--r--lib/rexml/rexml.rb31
-rw-r--r--lib/rexml/sax2listener.rb97
-rw-r--r--lib/rexml/source.rb295
-rw-r--r--lib/rexml/streamlistener.rb92
-rw-r--r--lib/rexml/syncenumerator.rb32
-rw-r--r--lib/rexml/text.rb404
-rw-r--r--lib/rexml/undefinednamespaceexception.rb8
-rw-r--r--lib/rexml/validation/relaxng.rb559
-rw-r--r--lib/rexml/validation/validation.rb155
-rw-r--r--lib/rexml/validation/validationexception.rb9
-rw-r--r--lib/rexml/xmldecl.rb119
-rw-r--r--lib/rexml/xmltokens.rb18
-rw-r--r--lib/rexml/xpath.rb80
-rw-r--r--lib/rexml/xpath_parser.rb803
-rw-r--r--lib/rinda/rinda.rb283
-rw-r--r--lib/rinda/ring.rb275
-rw-r--r--lib/rinda/tuplespace.rb642
-rw-r--r--lib/rss.rb91
-rw-r--r--lib/rss/0.9.rb428
-rw-r--r--lib/rss/1.0.rb452
-rw-r--r--lib/rss/2.0.rb111
-rw-r--r--lib/rss/atom.rb756
-rw-r--r--lib/rss/content.rb31
-rw-r--r--lib/rss/content/1.0.rb9
-rw-r--r--lib/rss/content/2.0.rb11
-rw-r--r--lib/rss/converter.rb170
-rw-r--r--lib/rss/dublincore.rb161
-rw-r--r--lib/rss/dublincore/1.0.rb12
-rw-r--r--lib/rss/dublincore/2.0.rb12
-rw-r--r--lib/rss/dublincore/atom.rb16
-rw-r--r--lib/rss/image.rb193
-rw-r--r--lib/rss/itunes.rb410
-rw-r--r--lib/rss/maker.rb54
-rw-r--r--lib/rss/maker/0.9.rb508
-rw-r--r--lib/rss/maker/1.0.rb435
-rw-r--r--lib/rss/maker/2.0.rb223
-rw-r--r--lib/rss/maker/atom.rb172
-rw-r--r--lib/rss/maker/base.rb944
-rw-r--r--lib/rss/maker/content.rb21
-rw-r--r--lib/rss/maker/dublincore.rb121
-rw-r--r--lib/rss/maker/entry.rb163
-rw-r--r--lib/rss/maker/feed.rb426
-rw-r--r--lib/rss/maker/image.rb111
-rw-r--r--lib/rss/maker/itunes.rb242
-rw-r--r--lib/rss/maker/slash.rb33
-rw-r--r--lib/rss/maker/syndication.rb18
-rw-r--r--lib/rss/maker/taxonomy.rb118
-rw-r--r--lib/rss/maker/trackback.rb61
-rw-r--r--lib/rss/parser.rb568
-rw-r--r--lib/rss/rexmlparser.rb54
-rw-r--r--lib/rss/rss.rb1342
-rw-r--r--lib/rss/slash.rb49
-rw-r--r--lib/rss/syndication.rb67
-rw-r--r--lib/rss/taxonomy.rb145
-rw-r--r--lib/rss/trackback.rb288
-rw-r--r--lib/rss/utils.rb111
-rw-r--r--lib/rss/xml-stylesheet.rb105
-rw-r--r--lib/rss/xml.rb71
-rw-r--r--lib/rss/xmlparser.rb93
-rw-r--r--lib/rss/xmlscanner.rb121
-rw-r--r--lib/rubygems.rb1305
-rw-r--r--lib/rubygems/builder.rb99
-rw-r--r--lib/rubygems/command.rb536
-rw-r--r--lib/rubygems/command_manager.rb194
-rw-r--r--lib/rubygems/commands/build_command.rb59
-rw-r--r--lib/rubygems/commands/cert_command.rb86
-rw-r--r--lib/rubygems/commands/check_command.rb65
-rw-r--r--lib/rubygems/commands/cleanup_command.rb100
-rw-r--r--lib/rubygems/commands/contents_command.rb101
-rw-r--r--lib/rubygems/commands/dependency_command.rb160
-rw-r--r--lib/rubygems/commands/environment_command.rb130
-rw-r--r--lib/rubygems/commands/fetch_command.rb78
-rw-r--r--lib/rubygems/commands/generate_index_command.rb124
-rw-r--r--lib/rubygems/commands/help_command.rb167
-rw-r--r--lib/rubygems/commands/install_command.rb165
-rw-r--r--lib/rubygems/commands/list_command.rb35
-rw-r--r--lib/rubygems/commands/lock_command.rb110
-rw-r--r--lib/rubygems/commands/outdated_command.rb30
-rw-r--r--lib/rubygems/commands/owner_command.rb76
-rw-r--r--lib/rubygems/commands/pristine_command.rb110
-rw-r--r--lib/rubygems/commands/push_command.rb60
-rw-r--r--lib/rubygems/commands/query_command.rb263
-rw-r--r--lib/rubygems/commands/rdoc_command.rb91
-rw-r--r--lib/rubygems/commands/search_command.rb31
-rw-r--r--lib/rubygems/commands/server_command.rb86
-rw-r--r--lib/rubygems/commands/setup_command.rb361
-rw-r--r--lib/rubygems/commands/sources_command.rb136
-rw-r--r--lib/rubygems/commands/specification_command.rb131
-rw-r--r--lib/rubygems/commands/stale_command.rb28
-rw-r--r--lib/rubygems/commands/uninstall_command.rb94
-rw-r--r--lib/rubygems/commands/unpack_command.rb160
-rw-r--r--lib/rubygems/commands/update_command.rb232
-rw-r--r--lib/rubygems/commands/which_command.rb82
-rw-r--r--lib/rubygems/config_file.rb375
-rw-r--r--lib/rubygems/custom_require.rb69
-rw-r--r--lib/rubygems/defaults.rb124
-rw-r--r--lib/rubygems/dependency.rb260
-rw-r--r--lib/rubygems/dependency_installer.rb304
-rw-r--r--lib/rubygems/dependency_list.rb252
-rw-r--r--lib/rubygems/deprecate.rb70
-rw-r--r--lib/rubygems/doc_manager.rb243
-rw-r--r--lib/rubygems/errors.rb35
-rw-r--r--lib/rubygems/exceptions.rb91
-rw-r--r--lib/rubygems/ext.rb18
-rw-r--r--lib/rubygems/ext/builder.rb56
-rw-r--r--lib/rubygems/ext/configure_builder.rb25
-rw-r--r--lib/rubygems/ext/ext_conf_builder.rb24
-rw-r--r--lib/rubygems/ext/rake_builder.rb39
-rw-r--r--lib/rubygems/format.rb82
-rw-r--r--lib/rubygems/gem_openssl.rb90
-rw-r--r--lib/rubygems/gem_path_searcher.rb172
-rw-r--r--lib/rubygems/gem_runner.rb86
-rw-r--r--lib/rubygems/gemcutter_utilities.rb82
-rw-r--r--lib/rubygems/indexer.rb644
-rw-r--r--lib/rubygems/install_update_options.rb128
-rw-r--r--lib/rubygems/installer.rb626
-rw-r--r--lib/rubygems/installer_test_case.rb144
-rw-r--r--lib/rubygems/local_remote_options.rb148
-rw-r--r--lib/rubygems/mock_gem_ui.rb71
-rw-r--r--lib/rubygems/old_format.rb153
-rw-r--r--lib/rubygems/package.rb83
-rw-r--r--lib/rubygems/package/f_sync_dir.rb23
-rw-r--r--lib/rubygems/package/tar_header.rb266
-rw-r--r--lib/rubygems/package/tar_input.rb235
-rw-r--r--lib/rubygems/package/tar_output.rb146
-rw-r--r--lib/rubygems/package/tar_reader.rb106
-rw-r--r--lib/rubygems/package/tar_reader/entry.rb145
-rw-r--r--lib/rubygems/package/tar_test_case.rb137
-rw-r--r--lib/rubygems/package/tar_writer.rb241
-rw-r--r--lib/rubygems/package_task.rb126
-rw-r--r--lib/rubygems/path_support.rb70
-rw-r--r--lib/rubygems/platform.rb194
-rw-r--r--lib/rubygems/psych_additions.rb9
-rw-r--r--lib/rubygems/psych_tree.rb27
-rw-r--r--lib/rubygems/remote_fetcher.rb518
-rw-r--r--lib/rubygems/require_paths_builder.rb18
-rw-r--r--lib/rubygems/requirement.rb204
-rw-r--r--lib/rubygems/security.rb826
-rw-r--r--lib/rubygems/server.rb832
-rw-r--r--lib/rubygems/source_index.rb406
-rw-r--r--lib/rubygems/spec_fetcher.rb297
-rw-r--r--lib/rubygems/specification.rb2171
-rw-r--r--lib/rubygems/ssl_certs/ca-bundle.pem3366
-rw-r--r--lib/rubygems/syck_hack.rb74
-rw-r--r--lib/rubygems/test_case.rb875
-rw-r--r--lib/rubygems/test_utilities.rb160
-rw-r--r--lib/rubygems/text.rb65
-rw-r--r--lib/rubygems/uninstaller.rb271
-rw-r--r--lib/rubygems/user_interaction.rb562
-rw-r--r--lib/rubygems/validator.rb169
-rw-r--r--lib/rubygems/version.rb329
-rw-r--r--lib/rubygems/version_option.rb65
-rw-r--r--lib/scanf.rb771
-rw-r--r--lib/securerandom.rb266
-rwxr-xr-xlib/set.rb1375
-rw-r--r--lib/shell.rb324
-rw-r--r--lib/shell/builtin-command.rb160
-rw-r--r--lib/shell/command-processor.rb593
-rw-r--r--lib/shell/error.rb25
-rw-r--r--lib/shell/filter.rb109
-rw-r--r--lib/shell/process-controller.rb319
-rw-r--r--lib/shell/system-command.rb159
-rw-r--r--lib/shell/version.rb15
-rw-r--r--lib/shellwords.rb235
-rw-r--r--lib/singleton.rb201
-rw-r--r--lib/sync.rb370
-rw-r--r--lib/telnet.rb9
-rw-r--r--lib/tempfile.rb369
-rw-r--r--lib/test/unit.rb851
-rw-r--r--lib/test/unit/assertions.rb324
-rw-r--r--lib/test/unit/parallel.rb182
-rw-r--r--lib/test/unit/test-unit.gemspec14
-rw-r--r--lib/test/unit/testcase.rb34
-rw-r--r--lib/thread.rb436
-rw-r--r--lib/thwait.rb153
-rw-r--r--lib/time.rb632
-rw-r--r--lib/timeout.rb121
-rw-r--r--lib/tmpdir.rb152
-rw-r--r--lib/tracer.rb279
-rw-r--r--lib/tsort.rb242
-rw-r--r--lib/ubygems.rb10
-rw-r--r--lib/un.rb349
-rw-r--r--lib/uri.rb111
-rw-r--r--lib/uri/common.rb1001
-rw-r--r--lib/uri/ftp.rb262
-rw-r--r--lib/uri/generic.rb1676
-rw-r--r--lib/uri/http.rb106
-rw-r--r--lib/uri/https.rb22
-rw-r--r--lib/uri/ldap.rb260
-rw-r--r--lib/uri/ldaps.rb20
-rw-r--r--lib/uri/mailto.rb280
-rw-r--r--lib/weakref.rb95
-rw-r--r--lib/webrick.rb226
-rw-r--r--lib/webrick/accesslog.rb151
-rw-r--r--lib/webrick/cgi.rb260
-rw-r--r--lib/webrick/compat.rb35
-rw-r--r--lib/webrick/config.rb121
-rw-r--r--lib/webrick/cookie.rb110
-rw-r--r--lib/webrick/htmlutils.rb28
-rw-r--r--lib/webrick/httpauth.rb95
-rw-r--r--lib/webrick/httpauth/authenticator.rb112
-rw-r--r--lib/webrick/httpauth/basicauth.rb108
-rw-r--r--lib/webrick/httpauth/digestauth.rb392
-rw-r--r--lib/webrick/httpauth/htdigest.rb128
-rw-r--r--lib/webrick/httpauth/htgroup.rb93
-rw-r--r--lib/webrick/httpauth/htpasswd.rb121
-rw-r--r--lib/webrick/httpauth/userdb.rb52
-rw-r--r--lib/webrick/httpproxy.rb333
-rw-r--r--lib/webrick/httprequest.rb461
-rw-r--r--lib/webrick/httpresponse.rb404
-rw-r--r--lib/webrick/https.rb64
-rw-r--r--lib/webrick/httpserver.rb264
-rw-r--r--lib/webrick/httpservlet.rb22
-rw-r--r--lib/webrick/httpservlet/abstract.rb153
-rw-r--r--lib/webrick/httpservlet/cgi_runner.rb46
-rw-r--r--lib/webrick/httpservlet/cgihandler.rb108
-rw-r--r--lib/webrick/httpservlet/erbhandler.rb87
-rw-r--r--lib/webrick/httpservlet/filehandler.rb470
-rw-r--r--lib/webrick/httpservlet/prochandler.rb33
-rw-r--r--lib/webrick/httpstatus.rb194
-rw-r--r--lib/webrick/httputils.rb394
-rw-r--r--lib/webrick/httpversion.rb49
-rw-r--r--lib/webrick/log.rb136
-rw-r--r--lib/webrick/server.rb253
-rw-r--r--lib/webrick/ssl.rb129
-rw-r--r--lib/webrick/utils.rb243
-rw-r--r--lib/webrick/version.rb13
-rw-r--r--lib/xmlrpc.rb301
-rw-r--r--lib/xmlrpc/base64.rb62
-rw-r--r--lib/xmlrpc/client.rb602
-rw-r--r--lib/xmlrpc/config.rb42
-rw-r--r--lib/xmlrpc/create.rb286
-rw-r--r--lib/xmlrpc/datetime.rb129
-rw-r--r--lib/xmlrpc/httpserver.rb173
-rw-r--r--lib/xmlrpc/marshal.rb66
-rw-r--r--lib/xmlrpc/parser.rb838
-rw-r--r--lib/xmlrpc/server.rb707
-rw-r--r--lib/xmlrpc/utils.rb171
-rw-r--r--lib/yaml.rb42
-rw-r--r--lib/yaml/dbm.rb224
-rw-r--r--lib/yaml/store.rb81
-rw-r--r--load.c814
-rw-r--r--main.c50
-rw-r--r--man/erb.1157
-rw-r--r--man/goruby.139
-rw-r--r--man/irb.1173
-rw-r--r--man/rake.1169
-rw-r--r--man/ri.1180
-rw-r--r--man/ruby.1511
-rw-r--r--marshal.c1819
-rw-r--r--math.c773
-rw-r--r--method.h111
-rw-r--r--misc/README17
-rw-r--r--misc/inf-ruby.el239
-rw-r--r--misc/rb_optparse.bash20
-rwxr-xr-xmisc/rb_optparse.zsh38
-rw-r--r--misc/rdoc-mode.el130
-rw-r--r--misc/ruby-additional.el59
-rw-r--r--misc/ruby-electric.el205
-rw-r--r--misc/ruby-mode.el1802
-rw-r--r--misc/ruby-style.el78
-rw-r--r--misc/rubydb3x.el42
-rw-r--r--missing/acosh.c93
-rw-r--r--missing/alloca.c18
-rw-r--r--missing/cbrt.c11
-rw-r--r--missing/close.c72
-rw-r--r--missing/crypt.c1185
-rw-r--r--missing/dir.h65
-rw-r--r--missing/dup2.c5
-rw-r--r--missing/erf.c89
-rw-r--r--missing/ffs.c49
-rw-r--r--missing/fileblocks.c1
-rw-r--r--missing/finite.c7
-rw-r--r--missing/flock.c41
-rw-r--r--missing/hypot.c17
-rw-r--r--missing/isinf.c51
-rw-r--r--missing/isnan.c28
-rw-r--r--missing/langinfo.c148
-rw-r--r--missing/lgamma_r.c80
-rw-r--r--missing/memcmp.c15
-rw-r--r--missing/memmove.c38
-rw-r--r--missing/mkdir.c104
-rw-r--r--missing/os2.c31
-rw-r--r--missing/setproctitle.c166
-rw-r--r--missing/signbit.c19
-rw-r--r--missing/strcasecmp.c12
-rw-r--r--missing/strchr.c57
-rw-r--r--missing/strerror.c13
-rw-r--r--missing/strftime.c888
-rw-r--r--missing/strlcat.c74
-rw-r--r--missing/strlcpy.c70
-rw-r--r--missing/strncasecmp.c18
-rw-r--r--missing/strstr.c82
-rw-r--r--missing/strtod.c271
-rw-r--r--missing/strtol.c87
-rw-r--r--missing/strtoul.c184
-rw-r--r--missing/tgamma.c92
-rw-r--r--missing/vsnprintf.c1131
-rw-r--r--missing/x68.c38
-rw-r--r--missing/x86_64-chkstk.s10
-rw-r--r--mkconfig.rb113
-rw-r--r--nacl/GNUmakefile.in87
-rw-r--r--nacl/README.nacl34
-rw-r--r--nacl/create_nmf.rb70
-rw-r--r--nacl/dirent.h15
-rw-r--r--nacl/example.html150
-rw-r--r--nacl/ioctl.h7
-rw-r--r--nacl/nacl-config.rb61
-rw-r--r--nacl/package.rb109
-rw-r--r--nacl/pepper_main.c870
-rw-r--r--nacl/resource.h8
-rw-r--r--nacl/select.h7
-rw-r--r--nacl/signal.h6
-rw-r--r--nacl/stat.h10
-rw-r--r--nacl/unistd.h9
-rw-r--r--nacl/utime.h11
-rw-r--r--node.c899
-rw-r--r--node.h470
-rw-r--r--numeric.c3547
-rw-r--r--object.c3137
-rw-r--r--pack.c2255
-rw-r--r--parse.y11508
-rw-r--r--prec.c81
-rw-r--r--prelude.rb31
-rw-r--r--proc.c2342
-rw-r--r--process.c6992
-rw-r--r--random.c1473
-rw-r--r--range.c1102
-rw-r--r--rational.c2432
-rw-r--r--re.c3762
-rw-r--r--re.h44
-rw-r--r--regcomp.c6686
-rw-r--r--regenc.c955
-rw-r--r--regenc.h227
-rw-r--r--regerror.c402
-rw-r--r--regex.c4512
-rw-r--r--regex.h228
-rw-r--r--regexec.c4341
-rw-r--r--regint.h914
-rw-r--r--regparse.c6319
-rw-r--r--regparse.h367
-rw-r--r--regsyntax.c387
-rw-r--r--ruby.1291
-rw-r--r--ruby.c2097
-rw-r--r--ruby.h604
-rw-r--r--rubyio.h66
-rw-r--r--rubysig.h88
-rw-r--r--rubytest.rb44
-rw-r--r--safe.c135
-rw-r--r--sample/README15
-rw-r--r--sample/biorhythm.rb143
-rw-r--r--sample/cal.rb243
-rw-r--r--sample/cbreak.rb4
-rw-r--r--sample/clnt.rb12
-rw-r--r--sample/coverage.rb62
-rw-r--r--sample/dbmtest.rb14
-rw-r--r--sample/dir.rb6
-rw-r--r--sample/drb/README.rd56
-rw-r--r--sample/drb/README.rd.ja59
-rw-r--r--sample/drb/darray.rb12
-rw-r--r--sample/drb/darrayc.rb47
-rw-r--r--sample/drb/dbiff.rb51
-rw-r--r--sample/drb/dcdbiff.rb43
-rw-r--r--sample/drb/dchatc.rb41
-rw-r--r--sample/drb/dchats.rb70
-rw-r--r--sample/drb/dhasen.rb42
-rw-r--r--sample/drb/dhasenc.rb14
-rw-r--r--sample/drb/dlogc.rb16
-rw-r--r--sample/drb/dlogd.rb39
-rw-r--r--sample/drb/dqin.rb13
-rw-r--r--sample/drb/dqlib.rb14
-rw-r--r--sample/drb/dqout.rb14
-rw-r--r--sample/drb/dqueue.rb12
-rw-r--r--sample/drb/drbc.rb45
-rw-r--r--sample/drb/drbch.rb48
-rw-r--r--sample/drb/drbm.rb60
-rw-r--r--sample/drb/drbmc.rb22
-rw-r--r--sample/drb/drbs-acl.rb51
-rw-r--r--sample/drb/drbs.rb64
-rw-r--r--sample/drb/drbssl_c.rb19
-rw-r--r--sample/drb/drbssl_s.rb31
-rw-r--r--sample/drb/extserv_test.rb80
-rw-r--r--sample/drb/gw_ct.rb29
-rw-r--r--sample/drb/gw_cu.rb28
-rw-r--r--sample/drb/gw_s.rb10
-rw-r--r--sample/drb/holderc.rb22
-rw-r--r--sample/drb/holders.rb63
-rw-r--r--sample/drb/http0.rb77
-rw-r--r--sample/drb/http0serv.rb119
-rw-r--r--sample/drb/name.rb117
-rw-r--r--sample/drb/namec.rb36
-rw-r--r--sample/drb/old_tuplespace.rb214
-rw-r--r--sample/drb/rinda_ts.rb7
-rw-r--r--sample/drb/rindac.rb17
-rw-r--r--sample/drb/rindas.rb18
-rw-r--r--sample/drb/ring_echo.rb30
-rw-r--r--sample/drb/ring_inspect.rb30
-rw-r--r--sample/drb/ring_place.rb25
-rw-r--r--sample/drb/simpletuple.rb91
-rw-r--r--sample/drb/speedc.rb21
-rw-r--r--sample/drb/speeds.rb31
-rw-r--r--sample/dualstack-fetch.rb48
-rw-r--r--sample/dualstack-httpd.rb55
-rw-r--r--sample/eval.rb17
-rw-r--r--sample/exyacc.rb32
-rw-r--r--sample/fact.rb5
-rw-r--r--sample/from.rb161
-rw-r--r--sample/fullpath.rb16
-rw-r--r--sample/getopts.test36
-rw-r--r--sample/goodfriday.rb48
-rw-r--r--sample/io.rb44
-rw-r--r--sample/irb.rb27
-rw-r--r--sample/list.rb1
-rw-r--r--sample/list2.rb2
-rw-r--r--sample/list3.rb2
-rw-r--r--sample/logger/app.rb46
-rw-r--r--sample/logger/log.rb27
-rw-r--r--sample/logger/shifting.rb26
-rwxr-xr-x[-rw-r--r--]sample/mine.rb39
-rw-r--r--sample/mkproto.rb12
-rw-r--r--sample/mrshtest.rb13
-rw-r--r--sample/occur.rb4
-rw-r--r--sample/occur2.rb11
-rw-r--r--sample/openssl/c_rehash.rb174
-rw-r--r--sample/openssl/cert2text.rb23
-rw-r--r--sample/openssl/certstore.rb161
-rw-r--r--sample/openssl/cipher.rb54
-rw-r--r--sample/openssl/crlstore.rb122
-rw-r--r--sample/openssl/echo_cli.rb44
-rw-r--r--sample/openssl/echo_svr.rb65
-rw-r--r--sample/openssl/gen_csr.rb51
-rw-r--r--sample/openssl/smime_read.rb23
-rw-r--r--sample/openssl/smime_write.rb23
-rw-r--r--sample/openssl/wget.rb34
-rwxr-xr-xsample/optparse/opttest.rb85
-rwxr-xr-xsample/optparse/subcommand.rb19
-rw-r--r--sample/philos.rb2
-rw-r--r--sample/pi.rb2
-rw-r--r--sample/pty/expect_sample.rb48
-rw-r--r--sample/pty/script.rb37
-rw-r--r--sample/pty/shl.rb92
-rw-r--r--sample/rbc.rb1015
-rw-r--r--sample/rcs.rb20
-rw-r--r--sample/rdoc/markup/rdoc2latex.rb15
-rw-r--r--sample/rdoc/markup/sample.rb40
-rw-r--r--sample/regx.rb23
-rw-r--r--sample/rename.rb297
-rw-r--r--sample/ripper/ruby2html.rb112
-rw-r--r--sample/ripper/strip-comment.rb19
-rwxr-xr-xsample/rss/blend.rb79
-rwxr-xr-xsample/rss/convert.rb69
-rwxr-xr-xsample/rss/list_description.rb91
-rwxr-xr-xsample/rss/re_read.rb64
-rwxr-xr-xsample/rss/rss_recent.rb85
-rw-r--r--sample/sieve.rb2
-rw-r--r--sample/svr.rb12
-rwxr-xr-x[-rw-r--r--]sample/test.rb1508
-rw-r--r--sample/testunit/adder.rb13
-rw-r--r--sample/testunit/subtracter.rb12
-rw-r--r--sample/testunit/tc_adder.rb18
-rw-r--r--sample/testunit/tc_subtracter.rb18
-rw-r--r--sample/testunit/ts_examples.rb7
-rw-r--r--sample/time.rb16
-rw-r--r--sample/timeout.rb42
-rw-r--r--sample/trojan.rb2
-rw-r--r--sample/tsvr.rb8
-rw-r--r--sample/uumerge.rb12
-rw-r--r--sample/webrick/demo-app.rb66
-rw-r--r--sample/webrick/demo-multipart.cgi12
-rw-r--r--sample/webrick/demo-servlet.rb6
-rw-r--r--sample/webrick/demo-urlencoded.cgi12
-rw-r--r--sample/webrick/hello.cgi11
-rw-r--r--sample/webrick/hello.rb8
-rw-r--r--sample/webrick/httpd.rb23
-rw-r--r--sample/webrick/httpproxy.rb25
-rw-r--r--sample/webrick/httpsd.rb33
-rw-r--r--signal.c1172
-rw-r--r--sparc.c31
-rw-r--r--spec/README31
-rw-r--r--spec/default.mspec21
-rw-r--r--sprintf.c1294
-rw-r--r--st.c1557
-rw-r--r--st.h46
-rw-r--r--strftime.c1162
-rw-r--r--string.c8137
-rw-r--r--struct.c1004
-rw-r--r--symbian/README.SYMBIAN93
-rw-r--r--symbian/configure.bat123
-rw-r--r--symbian/missing-aeabi.c18
-rw-r--r--symbian/missing-pips.c65
-rw-r--r--symbian/pre-build83
-rw-r--r--symbian/setup440
-rw-r--r--template/Doxyfile.tmpl265
-rw-r--r--template/encdb.h.tmpl83
-rwxr-xr-xtemplate/fake.rb.in47
-rw-r--r--template/id.h.tmpl123
-rw-r--r--template/insns.inc.tmpl20
-rw-r--r--template/insns_info.inc.tmpl83
-rw-r--r--template/known_errors.inc.tmpl14
-rw-r--r--template/minsns.inc.tmpl14
-rw-r--r--template/opt_sc.inc.tmpl32
-rw-r--r--template/optinsn.inc.tmpl30
-rw-r--r--template/optunifs.inc.tmpl35
-rw-r--r--template/ruby.pc.in44
-rw-r--r--template/transdb.h.tmpl59
-rw-r--r--template/vm.inc.tmpl29
-rw-r--r--template/vmtc.inc.tmpl18
-rw-r--r--template/yarvarch.en7
-rw-r--r--template/yarvarch.ja454
-rw-r--r--template/yasmdata.rb.tmpl20
-rw-r--r--test/-ext-/array/test_resize.rb29
-rw-r--r--test/-ext-/exception/test_enc_raise.rb15
-rw-r--r--test/-ext-/funcall/test_passing_block.rb22
-rw-r--r--test/-ext-/iter/test_iter_break.rb9
-rw-r--r--test/-ext-/load/test_dot_dot.rb10
-rw-r--r--test/-ext-/marshal/test_usrmarshal.rb34
-rw-r--r--test/-ext-/num2int/test_num2int.rb227
-rw-r--r--test/-ext-/old_thread_select/test_old_thread_select.rb100
-rw-r--r--test/-ext-/path_to_class/test_path_to_class.rb12
-rw-r--r--test/-ext-/st/test_numhash.rb49
-rw-r--r--test/-ext-/st/test_update.rb38
-rw-r--r--test/-ext-/string/test_cstr.rb17
-rw-r--r--test/-ext-/string/test_ellipsize.rb46
-rw-r--r--test/-ext-/string/test_enc_associate.rb12
-rw-r--r--test/-ext-/string/test_enc_str_buf_cat.rb15
-rw-r--r--test/-ext-/string/test_modify_expand.rb15
-rw-r--r--test/-ext-/string/test_qsort.rb19
-rw-r--r--test/-ext-/string/test_set_len.rb25
-rw-r--r--test/-ext-/symbol/test_inadvertent_creation.rb163
-rw-r--r--test/-ext-/test_bug-3571.rb21
-rw-r--r--test/-ext-/test_bug-3662.rb10
-rw-r--r--test/-ext-/test_bug-5832.rb21
-rw-r--r--test/-ext-/test_printf.rb49
-rw-r--r--test/-ext-/typeddata/test_typeddata.rb21
-rw-r--r--test/-ext-/wait_for_single_fd/test_wait_for_single_fd.rb45
-rw-r--r--test/-ext-/win32/test_dln.rb13
-rw-r--r--test/-ext-/win32/test_fd_setsize.rb25
-rw-r--r--test/base64/test_base64.rb99
-rw-r--r--test/benchmark/test_benchmark.rb169
-rw-r--r--test/bigdecimal/test_bigdecimal.rb1365
-rw-r--r--test/bigdecimal/test_bigdecimal_util.rb43
-rw-r--r--test/bigdecimal/test_bigmath.rb63
-rw-r--r--test/bigdecimal/testbase.rb27
-rw-r--r--test/cgi/test_cgi_cookie.rb110
-rw-r--r--test/cgi/test_cgi_core.rb371
-rw-r--r--test/cgi/test_cgi_header.rb185
-rw-r--r--test/cgi/test_cgi_modruby.rb146
-rw-r--r--test/cgi/test_cgi_multipart.rb325
-rw-r--r--test/cgi/test_cgi_session.rb172
-rw-r--r--test/cgi/test_cgi_tag_helper.rb341
-rw-r--r--test/cgi/test_cgi_util.rb64
-rw-r--r--test/cgi/testdata/file1.html10
-rw-r--r--test/cgi/testdata/large.pngbin0 -> 156414 bytes-rw-r--r--test/cgi/testdata/small.pngbin0 -> 82 bytes-rw-r--r--test/coverage/test_coverage.rb64
-rw-r--r--test/csv/base.rb8
-rw-r--r--test/csv/line_endings.gzbin0 -> 59 bytes-rwxr-xr-xtest/csv/test_csv_parsing.rb221
-rwxr-xr-xtest/csv/test_csv_writing.rb97
-rwxr-xr-xtest/csv/test_data_converters.rb263
-rwxr-xr-xtest/csv/test_encodings.rb339
-rwxr-xr-xtest/csv/test_features.rb310
-rwxr-xr-xtest/csv/test_headers.rb289
-rwxr-xr-xtest/csv/test_interface.rb337
-rwxr-xr-xtest/csv/test_row.rb313
-rwxr-xr-xtest/csv/test_serialization.rb158
-rwxr-xr-xtest/csv/test_table.rb420
-rw-r--r--test/csv/ts_all.rb21
-rw-r--r--test/date/test_date.rb144
-rw-r--r--test/date/test_date_arith.rb286
-rw-r--r--test/date/test_date_attr.rb112
-rw-r--r--test/date/test_date_base.rb442
-rw-r--r--test/date/test_date_compat.rb21
-rw-r--r--test/date/test_date_conv.rb137
-rw-r--r--test/date/test_date_marshal.rb41
-rw-r--r--test/date/test_date_new.rb271
-rw-r--r--test/date/test_date_parse.rb1123
-rw-r--r--test/date/test_date_strftime.rb422
-rw-r--r--test/date/test_date_strptime.rb492
-rw-r--r--test/date/test_switch_hitter.rb609
-rw-r--r--test/dbm/test_dbm.rb636
-rwxr-xr-xtest/digest/test_digest.rb156
-rw-r--r--test/digest/test_digest_extend.rb158
-rw-r--r--test/digest/test_digest_hmac.rb2
-rw-r--r--test/dl/test_base.rb130
-rw-r--r--test/dl/test_c_struct_entry.rb53
-rw-r--r--test/dl/test_c_union_entity.rb30
-rw-r--r--test/dl/test_callback.rb72
-rw-r--r--test/dl/test_cfunc.rb80
-rw-r--r--test/dl/test_cparser.rb33
-rw-r--r--test/dl/test_cptr.rb222
-rw-r--r--test/dl/test_dl2.rb167
-rw-r--r--test/dl/test_func.rb115
-rw-r--r--test/dl/test_handle.rb184
-rw-r--r--test/dl/test_import.rb164
-rw-r--r--test/dl/test_win32.rb54
-rw-r--r--test/drb/drbtest.rb377
-rw-r--r--test/drb/ignore_test_drb.rb24
-rw-r--r--test/drb/test_acl.rb195
-rw-r--r--test/drb/test_drb.rb318
-rw-r--r--test/drb/test_drbssl.rb64
-rw-r--r--test/drb/test_drbunix.rb48
-rw-r--r--test/drb/ut_array.rb15
-rw-r--r--test/drb/ut_array_drbssl.rb35
-rw-r--r--test/drb/ut_array_drbunix.rb15
-rw-r--r--test/drb/ut_drb.rb163
-rw-r--r--test/drb/ut_drb_drbssl.rb36
-rw-r--r--test/drb/ut_drb_drbunix.rb16
-rw-r--r--test/drb/ut_eq.rb30
-rw-r--r--test/drb/ut_eval.rb31
-rw-r--r--test/drb/ut_large.rb38
-rw-r--r--test/drb/ut_port.rb14
-rw-r--r--test/drb/ut_safe1.rb15
-rw-r--r--test/drb/ut_timerholder.rb49
-rw-r--r--test/erb/hello.erb4
-rw-r--r--test/erb/test_erb.rb480
-rw-r--r--test/erb/test_erb_m17n.rb123
-rw-r--r--test/etc/test_etc.rb115
-rw-r--r--test/fiddle/helper.rb111
-rw-r--r--test/fiddle/test_closure.rb84
-rw-r--r--test/fiddle/test_fiddle.rb37
-rw-r--r--test/fiddle/test_function.rb69
-rw-r--r--test/fileutils/clobber.rb91
-rw-r--r--test/fileutils/fileasserts.rb72
-rw-r--r--test/fileutils/test_dryrun.rb28
-rw-r--r--test/fileutils/test_fileutils.rb1214
-rw-r--r--test/fileutils/test_nowrite.rb28
-rw-r--r--test/fileutils/test_verbose.rb26
-rw-r--r--test/gdbm/test_gdbm.rb736
-rw-r--r--test/inlinetest.rb55
-rw-r--r--test/io/console/test_io_console.rb246
-rw-r--r--test/io/nonblock/test_flush.rb46
-rw-r--r--test/io/wait/test_io_wait.rb72
-rw-r--r--test/irb/test_completion.rb22
-rw-r--r--test/irb/test_option.rb12
-rw-r--r--test/json/fixtures/fail1.json1
-rw-r--r--test/json/fixtures/fail10.json1
-rw-r--r--test/json/fixtures/fail11.json1
-rw-r--r--test/json/fixtures/fail12.json1
-rw-r--r--test/json/fixtures/fail13.json1
-rw-r--r--test/json/fixtures/fail14.json1
-rw-r--r--test/json/fixtures/fail18.json1
-rw-r--r--test/json/fixtures/fail19.json1
-rw-r--r--test/json/fixtures/fail2.json1
-rw-r--r--test/json/fixtures/fail20.json1
-rw-r--r--test/json/fixtures/fail21.json1
-rw-r--r--test/json/fixtures/fail22.json1
-rw-r--r--test/json/fixtures/fail23.json1
-rw-r--r--test/json/fixtures/fail24.json1
-rw-r--r--test/json/fixtures/fail25.json1
-rw-r--r--test/json/fixtures/fail27.json2
-rw-r--r--test/json/fixtures/fail28.json2
-rw-r--r--test/json/fixtures/fail3.json1
-rw-r--r--test/json/fixtures/fail4.json1
-rw-r--r--test/json/fixtures/fail5.json1
-rw-r--r--test/json/fixtures/fail6.json1
-rw-r--r--test/json/fixtures/fail7.json1
-rw-r--r--test/json/fixtures/fail8.json1
-rw-r--r--test/json/fixtures/fail9.json1
-rw-r--r--test/json/fixtures/pass1.json56
-rw-r--r--test/json/fixtures/pass15.json1
-rw-r--r--test/json/fixtures/pass16.json1
-rw-r--r--test/json/fixtures/pass17.json1
-rw-r--r--test/json/fixtures/pass2.json1
-rw-r--r--test/json/fixtures/pass26.json1
-rw-r--r--test/json/fixtures/pass3.json6
-rw-r--r--test/json/setup_variant.rb11
-rwxr-xr-xtest/json/test_json.rb539
-rwxr-xr-xtest/json/test_json_addition.rb188
-rw-r--r--test/json/test_json_encoding.rb65
-rwxr-xr-xtest/json/test_json_fixtures.rb35
-rwxr-xr-xtest/json/test_json_generate.rb252
-rw-r--r--test/json/test_json_string_matching.rb40
-rwxr-xr-xtest/json/test_json_unicode.rb72
-rw-r--r--test/logger/test_logger.rb522
-rw-r--r--test/matrix/test_matrix.rb426
-rw-r--r--test/matrix/test_vector.rb149
-rw-r--r--test/minitest/metametameta.rb62
-rw-r--r--test/minitest/test_minitest_benchmark.rb120
-rw-r--r--test/minitest/test_minitest_mock.rb281
-rw-r--r--test/minitest/test_minitest_spec.rb726
-rw-r--r--test/minitest/test_minitest_unit.rb1554
-rw-r--r--test/misc/test_ruby_mode.rb169
-rw-r--r--test/mkmf/base.rb134
-rw-r--r--test/mkmf/test_convertible.rb34
-rw-r--r--test/mkmf/test_find_executable.rb50
-rw-r--r--test/mkmf/test_flags.rb35
-rw-r--r--test/mkmf/test_framework.rb14
-rw-r--r--test/mkmf/test_signedness.rb29
-rw-r--r--test/mkmf/test_sizeof.rb47
-rw-r--r--test/monitor/test_monitor.rb190
-rw-r--r--test/net/ftp/test_ftp.rb813
-rw-r--r--test/net/http/test_buffered_io.rb17
-rw-r--r--test/net/http/test_http.rb840
-rw-r--r--test/net/http/test_http_request.rb57
-rw-r--r--test/net/http/test_httpheader.rb334
-rw-r--r--test/net/http/test_httpresponse.rb212
-rw-r--r--test/net/http/test_httpresponses.rb24
-rw-r--r--test/net/http/test_https.rb154
-rw-r--r--test/net/http/test_https_proxy.rb43
-rw-r--r--test/net/http/utils.rb117
-rw-r--r--test/net/imap/cacert.pem60
-rw-r--r--test/net/imap/server.crt61
-rw-r--r--test/net/imap/server.key15
-rw-r--r--test/net/imap/test_imap.rb536
-rw-r--r--test/net/imap/test_imap_response_parser.rb183
-rw-r--r--test/net/pop/test_pop.rb132
-rw-r--r--test/net/smtp/test_response.rb99
-rw-r--r--test/net/smtp/test_smtp.rb16
-rw-r--r--test/net/smtp/test_ssl_socket.rb91
-rw-r--r--test/nkf/test_kconv.rb81
-rw-r--r--test/nkf/test_nkf.rb22
-rw-r--r--test/objspace/test_objspace.rb95
-rw-r--r--test/open-uri/test_open-uri.rb701
-rw-r--r--test/open-uri/test_ssl.rb325
-rw-r--r--test/openssl/ssl_server.rb81
-rw-r--r--test/openssl/test_asn1.rb601
-rw-r--r--test/openssl/test_bn.rb23
-rw-r--r--test/openssl/test_buffering.rb87
-rw-r--r--test/openssl/test_cipher.rb106
-rw-r--r--test/openssl/test_config.rb299
-rw-r--r--test/openssl/test_digest.rb126
-rw-r--r--test/openssl/test_engine.rb75
-rw-r--r--test/openssl/test_hmac.rb32
-rw-r--r--test/openssl/test_ns_spki.rb51
-rw-r--r--test/openssl/test_ocsp.rb47
-rw-r--r--test/openssl/test_pair.rb249
-rw-r--r--test/openssl/test_pkcs12.rb209
-rw-r--r--test/openssl/test_pkcs5.rb97
-rw-r--r--test/openssl/test_pkcs7.rb156
-rw-r--r--test/openssl/test_pkey_dh.rb83
-rw-r--r--test/openssl/test_pkey_dsa.rb240
-rw-r--r--test/openssl/test_pkey_ec.rb207
-rw-r--r--test/openssl/test_pkey_rsa.rb283
-rw-r--r--test/openssl/test_ssl.rb614
-rw-r--r--test/openssl/test_ssl_session.rb367
-rw-r--r--test/openssl/test_x509cert.rb219
-rw-r--r--test/openssl/test_x509crl.rb221
-rw-r--r--test/openssl/test_x509ext.rb69
-rw-r--r--test/openssl/test_x509name.rb366
-rw-r--r--test/openssl/test_x509req.rb150
-rw-r--r--test/openssl/test_x509store.rb229
-rw-r--r--test/openssl/utils.rb326
-rw-r--r--test/optparse/test_autoconf.rb63
-rw-r--r--test/optparse/test_bash_completion.rb42
-rw-r--r--test/optparse/test_getopts.rb34
-rw-r--r--test/optparse/test_noarg.rb57
-rw-r--r--test/optparse/test_optarg.rb46
-rw-r--r--test/optparse/test_optparse.rb65
-rw-r--r--test/optparse/test_placearg.rb56
-rw-r--r--test/optparse/test_reqarg.rb77
-rw-r--r--test/optparse/test_summary.rb46
-rw-r--r--test/optparse/test_zsh_completion.rb22
-rw-r--r--test/ostruct/test_ostruct.rb117
-rw-r--r--test/pathname/test_pathname.rb1301
-rw-r--r--test/profile_test_all.rb52
-rw-r--r--test/psych/handlers/test_recorder.rb25
-rw-r--r--test/psych/helper.rb56
-rw-r--r--test/psych/json/test_stream.rb109
-rw-r--r--test/psych/nodes/test_enumerable.rb43
-rw-r--r--test/psych/test_alias_and_anchor.rb96
-rw-r--r--test/psych/test_array.rb57
-rw-r--r--test/psych/test_boolean.rb36
-rw-r--r--test/psych/test_class.rb36
-rw-r--r--test/psych/test_coder.rb184
-rw-r--r--test/psych/test_date_time.rb17
-rw-r--r--test/psych/test_deprecated.rb210
-rw-r--r--test/psych/test_document.rb46
-rw-r--r--test/psych/test_emitter.rb94
-rw-r--r--test/psych/test_encoding.rb268
-rw-r--r--test/psych/test_engine_manager.rb47
-rw-r--r--test/psych/test_exception.rb151
-rw-r--r--test/psych/test_hash.rb44
-rw-r--r--test/psych/test_json_tree.rb65
-rw-r--r--test/psych/test_merge_keys.rb81
-rw-r--r--test/psych/test_nil.rb18
-rw-r--r--test/psych/test_null.rb19
-rw-r--r--test/psych/test_numeric.rb25
-rw-r--r--test/psych/test_object.rb44
-rw-r--r--test/psych/test_object_references.rb67
-rw-r--r--test/psych/test_omap.rb75
-rw-r--r--test/psych/test_parser.rb339
-rw-r--r--test/psych/test_psych.rb168
-rw-r--r--test/psych/test_scalar.rb11
-rw-r--r--test/psych/test_scalar_scanner.rb106
-rw-r--r--test/psych/test_serialize_subclasses.rb38
-rw-r--r--test/psych/test_set.rb49
-rw-r--r--test/psych/test_stream.rb93
-rw-r--r--test/psych/test_string.rb95
-rw-r--r--test/psych/test_struct.rb49
-rw-r--r--test/psych/test_symbol.rb17
-rw-r--r--test/psych/test_tainted.rb130
-rw-r--r--test/psych/test_to_yaml_properties.rb63
-rw-r--r--test/psych/test_tree_builder.rb79
-rw-r--r--test/psych/test_yaml.rb1269
-rw-r--r--test/psych/test_yamldbm.rb197
-rw-r--r--test/psych/test_yamlstore.rb87
-rw-r--r--test/psych/visitors/test_depth_first.rb49
-rw-r--r--test/psych/visitors/test_emitter.rb144
-rw-r--r--test/psych/visitors/test_to_ruby.rb325
-rw-r--r--test/psych/visitors/test_yaml_tree.rb173
-rw-r--r--test/rake/file_creation.rb34
-rw-r--r--test/rake/helper.rb492
-rw-r--r--test/rake/test_rake.rb40
-rw-r--r--test/rake/test_rake_application.rb489
-rw-r--r--test/rake/test_rake_application_options.rb335
-rw-r--r--test/rake/test_rake_clean.rb14
-rw-r--r--test/rake/test_rake_definitions.rb80
-rw-r--r--test/rake/test_rake_directory_task.rb52
-rw-r--r--test/rake/test_rake_dsl.rb77
-rw-r--r--test/rake/test_rake_early_time.rb31
-rw-r--r--test/rake/test_rake_extension.rb59
-rw-r--r--test/rake/test_rake_file_creation_task.rb56
-rw-r--r--test/rake/test_rake_file_list.rb628
-rw-r--r--test/rake/test_rake_file_list_path_map.rb8
-rw-r--r--test/rake/test_rake_file_task.rb102
-rw-r--r--test/rake/test_rake_file_utils.rb305
-rw-r--r--test/rake/test_rake_ftp_file.rb59
-rw-r--r--test/rake/test_rake_functional.rb450
-rw-r--r--test/rake/test_rake_invocation_chain.rb52
-rw-r--r--test/rake/test_rake_makefile_loader.rb44
-rw-r--r--test/rake/test_rake_multi_task.rb51
-rw-r--r--test/rake/test_rake_name_space.rb43
-rw-r--r--test/rake/test_rake_package_task.rb79
-rw-r--r--test/rake/test_rake_path_map.rb157
-rw-r--r--test/rake/test_rake_path_map_explode.rb34
-rw-r--r--test/rake/test_rake_path_map_partial.rb18
-rw-r--r--test/rake/test_rake_pseudo_status.rb21
-rw-r--r--test/rake/test_rake_rake_test_loader.rb21
-rw-r--r--test/rake/test_rake_rdoc_task.rb83
-rw-r--r--test/rake/test_rake_require.rb40
-rw-r--r--test/rake/test_rake_rules.rb327
-rw-r--r--test/rake/test_rake_task.rb267
-rw-r--r--test/rake/test_rake_task_argument_parsing.rb103
-rw-r--r--test/rake/test_rake_task_arguments.rb88
-rw-r--r--test/rake/test_rake_task_lib.rb9
-rw-r--r--test/rake/test_rake_task_manager.rb157
-rw-r--r--test/rake/test_rake_task_manager_argument_resolution.rb36
-rw-r--r--test/rake/test_rake_task_with_arguments.rb173
-rw-r--r--test/rake/test_rake_test_task.rb120
-rw-r--r--test/rake/test_rake_top_level_functions.rb111
-rw-r--r--test/rake/test_rake_win32.rb72
-rw-r--r--test/rake/test_sys.rb20
-rw-r--r--test/rdoc/README1
-rw-r--r--test/rdoc/binary.datbin0 -> 1024 bytes-rw-r--r--test/rdoc/hidden.zip.txt1
-rw-r--r--test/rdoc/test.ja.largedoc3
-rw-r--r--test/rdoc/test.ja.rdoc10
-rw-r--r--test/rdoc/test.ja.txt8
-rw-r--r--test/rdoc/test.txt1
-rw-r--r--test/rdoc/test_attribute_manager.rb120
-rw-r--r--test/rdoc/test_rdoc_alias.rb13
-rw-r--r--test/rdoc/test_rdoc_any_method.rb263
-rw-r--r--test/rdoc/test_rdoc_attr.rb123
-rw-r--r--test/rdoc/test_rdoc_class_module.rb718
-rw-r--r--test/rdoc/test_rdoc_code_object.rb290
-rw-r--r--test/rdoc/test_rdoc_constant.rb15
-rw-r--r--test/rdoc/test_rdoc_context.rb695
-rw-r--r--test/rdoc/test_rdoc_context_section.rb54
-rw-r--r--test/rdoc/test_rdoc_cross_reference.rb154
-rw-r--r--test/rdoc/test_rdoc_encoding.rb191
-rw-r--r--test/rdoc/test_rdoc_generator_darkfish.rb125
-rw-r--r--test/rdoc/test_rdoc_generator_ri.rb87
-rw-r--r--test/rdoc/test_rdoc_include.rb96
-rw-r--r--test/rdoc/test_rdoc_markup.rb91
-rw-r--r--test/rdoc/test_rdoc_markup_attribute_manager.rb240
-rw-r--r--test/rdoc/test_rdoc_markup_document.rb152
-rw-r--r--test/rdoc/test_rdoc_markup_formatter.rb57
-rw-r--r--test/rdoc/test_rdoc_markup_indented_paragraph.rb40
-rw-r--r--test/rdoc/test_rdoc_markup_paragraph.rb21
-rw-r--r--test/rdoc/test_rdoc_markup_parser.rb1486
-rw-r--r--test/rdoc/test_rdoc_markup_pre_process.rb410
-rw-r--r--test/rdoc/test_rdoc_markup_raw.rb27
-rw-r--r--test/rdoc/test_rdoc_markup_to_ansi.rb332
-rw-r--r--test/rdoc/test_rdoc_markup_to_bs.rb345
-rw-r--r--test/rdoc/test_rdoc_markup_to_html.rb355
-rw-r--r--test/rdoc/test_rdoc_markup_to_html_crossref.rb110
-rw-r--r--test/rdoc/test_rdoc_markup_to_rdoc.rb341
-rw-r--r--test/rdoc/test_rdoc_markup_to_tt_only.rb229
-rw-r--r--test/rdoc/test_rdoc_method_attr.rb122
-rw-r--r--test/rdoc/test_rdoc_normal_class.rb23
-rw-r--r--test/rdoc/test_rdoc_normal_module.rb37
-rw-r--r--test/rdoc/test_rdoc_options.rb401
-rw-r--r--test/rdoc/test_rdoc_parser.rb93
-rw-r--r--test/rdoc/test_rdoc_parser_c.rb1436
-rw-r--r--test/rdoc/test_rdoc_parser_ruby.rb2477
-rw-r--r--test/rdoc/test_rdoc_parser_simple.rb99
-rw-r--r--test/rdoc/test_rdoc_rdoc.rb209
-rw-r--r--test/rdoc/test_rdoc_require.rb25
-rw-r--r--test/rdoc/test_rdoc_ri_driver.rb1061
-rw-r--r--test/rdoc/test_rdoc_ri_paths.rb43
-rw-r--r--test/rdoc/test_rdoc_ri_store.rb473
-rw-r--r--test/rdoc/test_rdoc_ruby_lex.rb23
-rw-r--r--test/rdoc/test_rdoc_rubygems_hook.rb199
-rw-r--r--test/rdoc/test_rdoc_single_class.rb12
-rw-r--r--test/rdoc/test_rdoc_stats.rb543
-rw-r--r--test/rdoc/test_rdoc_task.rb111
-rw-r--r--test/rdoc/test_rdoc_text.rb397
-rw-r--r--test/rdoc/test_rdoc_top_level.rb240
-rw-r--r--test/rdoc/xref_data.rb76
-rw-r--r--test/rdoc/xref_test_case.rb71
-rw-r--r--test/readline/test_readline.rb497
-rw-r--r--test/readline/test_readline_history.rb327
-rw-r--r--test/resolv/test_addr.rb16
-rw-r--r--test/resolv/test_dns.rb153
-rw-r--r--test/rexml/data/LostineRiver.kml.gzbin0 -> 50154 bytes-rw-r--r--test/rexml/data/ProductionSupport.xml29
-rw-r--r--test/rexml/data/axis.xml25
-rw-r--r--test/rexml/data/bad.xml5
-rw-r--r--test/rexml/data/basic.xml11
-rw-r--r--test/rexml/data/basicupdate.xml47
-rw-r--r--test/rexml/data/broken.rss20
-rw-r--r--test/rexml/data/contents.xml70
-rw-r--r--test/rexml/data/dash.xml12
-rw-r--r--test/rexml/data/defaultNamespace.xml6
-rw-r--r--test/rexml/data/doctype_test.xml34
-rw-r--r--test/rexml/data/documentation.xml542
-rw-r--r--test/rexml/data/euc.xml296
-rw-r--r--test/rexml/data/evaluate.xml28
-rw-r--r--test/rexml/data/fibo.xml29
-rw-r--r--test/rexml/data/foo.xml10
-rw-r--r--test/rexml/data/google.2.xml156
-rw-r--r--test/rexml/data/id.xml21
-rw-r--r--test/rexml/data/iso8859-1.xml4
-rw-r--r--test/rexml/data/jaxen24.xml2
-rw-r--r--test/rexml/data/jaxen3.xml15
-rw-r--r--test/rexml/data/lang.xml11
-rw-r--r--test/rexml/data/lang0.xml18
-rw-r--r--test/rexml/data/message.xml27
-rw-r--r--test/rexml/data/moreover.xml244
-rw-r--r--test/rexml/data/much_ado.xml6850
-rw-r--r--test/rexml/data/namespaces.xml18
-rw-r--r--test/rexml/data/nitf.xml67
-rw-r--r--test/rexml/data/numbers.xml18
-rw-r--r--test/rexml/data/ofbiz-issues-full-177.xml13971
-rw-r--r--test/rexml/data/pi.xml13
-rw-r--r--test/rexml/data/pi2.xml6
-rw-r--r--test/rexml/data/project.xml1
-rw-r--r--test/rexml/data/simple.xml2
-rw-r--r--test/rexml/data/stream_accents.xml4
-rw-r--r--test/rexml/data/t63-1.xmlbin0 -> 161690 bytes-rw-r--r--test/rexml/data/t63-2.svg2828
-rw-r--r--test/rexml/data/t75.xml31
-rw-r--r--test/rexml/data/test/tests.xml683
-rw-r--r--test/rexml/data/test/tests.xsl369
-rw-r--r--test/rexml/data/testNamespaces.xml22
-rw-r--r--test/rexml/data/testsrc.xml64
-rw-r--r--test/rexml/data/text.xml10
-rw-r--r--test/rexml/data/ticket_110_utf16.xmlbin0 -> 207464 bytes-rw-r--r--test/rexml/data/ticket_61.xml4
-rw-r--r--test/rexml/data/ticket_68.xml590
-rw-r--r--test/rexml/data/tutorial.xml678
-rw-r--r--test/rexml/data/underscore.xml6
-rw-r--r--test/rexml/data/web.xml42
-rw-r--r--test/rexml/data/web2.xml7
-rw-r--r--test/rexml/data/working.rss202
-rw-r--r--test/rexml/data/xmlfile-bug.xml15
-rw-r--r--test/rexml/data/xp.tst27
-rw-r--r--test/rexml/data/yahoo.xml80
-rw-r--r--test/rexml/listener.rb50
-rw-r--r--test/rexml/rexml_test_utils.rb5
-rw-r--r--test/rexml/test_attributes.rb198
-rw-r--r--test/rexml/test_attributes_mixin.rb32
-rw-r--r--test/rexml/test_changing_encoding.rb44
-rw-r--r--test/rexml/test_comment.rb25
-rw-r--r--test/rexml/test_contrib.rb581
-rw-r--r--test/rexml/test_core.rb1462
-rw-r--r--test/rexml/test_doctype.rb107
-rw-r--r--test/rexml/test_document.rb292
-rw-r--r--test/rexml/test_elements.rb116
-rw-r--r--test/rexml/test_encoding.rb93
-rw-r--r--test/rexml/test_encoding_2.rb59
-rw-r--r--test/rexml/test_entity.rb149
-rw-r--r--test/rexml/test_functions.rb223
-rw-r--r--test/rexml/test_functions_number.rb32
-rw-r--r--test/rexml/test_jaxen.rb126
-rw-r--r--test/rexml/test_light.rb104
-rw-r--r--test/rexml/test_lightparser.rb12
-rw-r--r--test/rexml/test_listener.rb129
-rw-r--r--test/rexml/test_martin_fowler.rb37
-rw-r--r--test/rexml/test_namespace.rb38
-rw-r--r--test/rexml/test_notationdecl_mixin.rb58
-rw-r--r--test/rexml/test_notationdecl_parsetest.rb23
-rw-r--r--test/rexml/test_order.rb105
-rw-r--r--test/rexml/test_preceding_sibling.rb38
-rw-r--r--test/rexml/test_pullparser.rb100
-rw-r--r--test/rexml/test_rexml_issuezilla.rb14
-rw-r--r--test/rexml/test_sax.rb279
-rw-r--r--test/rexml/test_stream.rb104
-rw-r--r--test/rexml/test_ticket_80.rb56
-rw-r--r--test/rexml/test_validation_rng.rb790
-rw-r--r--test/rexml/test_xml_declaration_parent_child.rb33
-rw-r--r--test/rexml/test_xpath.rb1079
-rw-r--r--test/rexml/test_xpath_attribute_query.rb89
-rw-r--r--test/rexml/test_xpath_msw.rb38
-rw-r--r--test/rexml/test_xpath_pred.rb80
-rw-r--r--test/rexml/test_xpathtext.rb72
-rw-r--r--test/rinda/test_rinda.rb484
-rw-r--r--test/rinda/test_tuplebag.rb172
-rw-r--r--test/ripper/dummyparser.rb216
-rw-r--r--test/ripper/test_files.rb46
-rw-r--r--test/ripper/test_filter.rb83
-rw-r--r--test/ripper/test_parser_events.rb1171
-rw-r--r--test/ripper/test_ripper.rb49
-rw-r--r--test/ripper/test_scanner_events.rb856
-rw-r--r--test/rss/dot.pngbin0 -> 111 bytes-rw-r--r--test/rss/rss-assertions.rb2090
-rw-r--r--test/rss/rss-testcase.rb478
-rw-r--r--test/rss/test_1.0.rb307
-rw-r--r--test/rss/test_2.0.rb411
-rw-r--r--test/rss/test_accessor.rb103
-rw-r--r--test/rss/test_atom.rb683
-rw-r--r--test/rss/test_content.rb104
-rw-r--r--test/rss/test_dublincore.rb269
-rw-r--r--test/rss/test_image.rb214
-rw-r--r--test/rss/test_inherit.rb40
-rw-r--r--test/rss/test_itunes.rb347
-rw-r--r--test/rss/test_maker_0.9.rb474
-rw-r--r--test/rss/test_maker_1.0.rb516
-rw-r--r--test/rss/test_maker_2.0.rb757
-rw-r--r--test/rss/test_maker_atom_entry.rb393
-rw-r--r--test/rss/test_maker_atom_feed.rb454
-rw-r--r--test/rss/test_maker_content.rb47
-rw-r--r--test/rss/test_maker_dc.rb149
-rw-r--r--test/rss/test_maker_image.rb62
-rw-r--r--test/rss/test_maker_itunes.rb471
-rw-r--r--test/rss/test_maker_slash.rb37
-rw-r--r--test/rss/test_maker_sy.rb44
-rw-r--r--test/rss/test_maker_taxo.rb81
-rw-r--r--test/rss/test_maker_trackback.rb41
-rw-r--r--test/rss/test_maker_xml-stylesheet.rb83
-rw-r--r--test/rss/test_parser.rb62
-rw-r--r--test/rss/test_parser_1.0.rb528
-rw-r--r--test/rss/test_parser_2.0.rb122
-rw-r--r--test/rss/test_parser_atom_entry.rb163
-rw-r--r--test/rss/test_parser_atom_feed.rb276
-rw-r--r--test/rss/test_setup_maker_0.9.rb246
-rw-r--r--test/rss/test_setup_maker_1.0.rb550
-rw-r--r--test/rss/test_setup_maker_2.0.rb308
-rw-r--r--test/rss/test_setup_maker_atom_entry.rb409
-rw-r--r--test/rss/test_setup_maker_atom_feed.rb445
-rw-r--r--test/rss/test_setup_maker_itunes.rb144
-rw-r--r--test/rss/test_setup_maker_slash.rb38
-rw-r--r--test/rss/test_slash.rb64
-rw-r--r--test/rss/test_syndication.rb125
-rw-r--r--test/rss/test_taxonomy.rb172
-rw-r--r--test/rss/test_to_s.rb670
-rw-r--r--test/rss/test_trackback.rb135
-rw-r--r--test/rss/test_version.rb9
-rw-r--r--test/rss/test_xml-stylesheet.rb108
-rw-r--r--test/ruby/allpairs.rb103
-rw-r--r--test/ruby/beginmainend.rb80
-rw-r--r--test/ruby/enc/test_big5.rb28
-rw-r--r--test/ruby/enc/test_cp949.rb28
-rw-r--r--test/ruby/enc/test_emoji.rb442
-rw-r--r--test/ruby/enc/test_euc_jp.rb24
-rw-r--r--test/ruby/enc/test_euc_kr.rb28
-rw-r--r--test/ruby/enc/test_euc_tw.rb28
-rw-r--r--test/ruby/enc/test_gb18030.rb126
-rw-r--r--test/ruby/enc/test_gbk.rb28
-rw-r--r--test/ruby/enc/test_iso_8859.rb163
-rw-r--r--test/ruby/enc/test_koi8.rb22
-rw-r--r--test/ruby/enc/test_shift_jis.rb27
-rw-r--r--test/ruby/enc/test_utf16.rb384
-rw-r--r--test/ruby/enc/test_utf32.rb93
-rw-r--r--test/ruby/enc/test_windows_1251.rb16
-rw-r--r--test/ruby/endblockwarn_rb12
-rw-r--r--test/ruby/envutil.rb269
-rw-r--r--test/ruby/lbtest.rb49
-rw-r--r--test/ruby/marshaltestlib.rb466
-rw-r--r--test/ruby/memory_status.rb92
-rw-r--r--test/ruby/sentence.rb668
-rw-r--r--test/ruby/test_alias.rb132
-rw-r--r--test/ruby/test_argf.rb773
-rw-r--r--test/ruby/test_arity.rb71
-rw-r--r--test/ruby/test_array.rb2216
-rw-r--r--test/ruby/test_assignment.rb695
-rw-r--r--test/ruby/test_autoload.rb182
-rw-r--r--test/ruby/test_backtrace.rb94
-rw-r--r--test/ruby/test_basicinstructions.rb687
-rw-r--r--test/ruby/test_beginendblock.rb170
-rw-r--r--test/ruby/test_bignum.rb517
-rw-r--r--test/ruby/test_call.rb19
-rw-r--r--test/ruby/test_case.rb106
-rw-r--r--test/ruby/test_class.rb273
-rw-r--r--test/ruby/test_clone.rb28
-rw-r--r--test/ruby/test_comparable.rb72
-rw-r--r--test/ruby/test_complex.rb1162
-rw-r--r--test/ruby/test_complex2.rb735
-rw-r--r--test/ruby/test_complexrational.rb407
-rw-r--r--test/ruby/test_condition.rb16
-rw-r--r--test/ruby/test_const.rb57
-rw-r--r--test/ruby/test_continuation.rb135
-rw-r--r--test/ruby/test_defined.rb184
-rw-r--r--test/ruby/test_dir.rb223
-rw-r--r--test/ruby/test_dir_m17n.rb272
-rw-r--r--test/ruby/test_econv.rb931
-rw-r--r--test/ruby/test_encoding.rb116
-rw-r--r--test/ruby/test_enum.rb423
-rw-r--r--test/ruby/test_enumerator.rb402
-rw-r--r--test/ruby/test_env.rb408
-rw-r--r--test/ruby/test_eval.rb456
-rw-r--r--test/ruby/test_exception.rb513
-rw-r--r--test/ruby/test_fiber.rb266
-rw-r--r--test/ruby/test_file.rb362
-rw-r--r--test/ruby/test_file_exhaustive.rb1111
-rw-r--r--test/ruby/test_fixnum.rb282
-rw-r--r--test/ruby/test_float.rb610
-rw-r--r--test/ruby/test_fnmatch.rb106
-rw-r--r--test/ruby/test_gc.rb121
-rw-r--r--test/ruby/test_hash.rb989
-rw-r--r--test/ruby/test_ifunless.rb14
-rw-r--r--test/ruby/test_integer.rb208
-rw-r--r--test/ruby/test_integer_comb.rb622
-rw-r--r--test/ruby/test_io.rb2586
-rw-r--r--test/ruby/test_io_m17n.rb2466
-rw-r--r--test/ruby/test_iseq.rb28
-rw-r--r--test/ruby/test_iterator.rb497
-rw-r--r--test/ruby/test_keyword.rb114
-rw-r--r--test/ruby/test_lambda.rb92
-rw-r--r--test/ruby/test_lazy_enumerator.rb326
-rw-r--r--test/ruby/test_literal.rb301
-rw-r--r--test/ruby/test_m17n.rb1473
-rw-r--r--test/ruby/test_m17n_comb.rb1580
-rw-r--r--test/ruby/test_marshal.rb495
-rw-r--r--test/ruby/test_math.rb281
-rw-r--r--test/ruby/test_metaclass.rb167
-rw-r--r--test/ruby/test_method.rb492
-rw-r--r--test/ruby/test_mixed_unicode_escapes.rb25
-rw-r--r--test/ruby/test_module.rb1498
-rw-r--r--test/ruby/test_not.rb12
-rw-r--r--test/ruby/test_notimp.rb64
-rw-r--r--test/ruby/test_numeric.rb235
-rw-r--r--test/ruby/test_object.rb859
-rw-r--r--test/ruby/test_objectspace.rb68
-rw-r--r--test/ruby/test_optimization.rb202
-rw-r--r--test/ruby/test_pack.rb699
-rw-r--r--test/ruby/test_parse.rb842
-rw-r--r--test/ruby/test_path.rb259
-rw-r--r--test/ruby/test_pipe.rb16
-rw-r--r--test/ruby/test_primitive.rb423
-rw-r--r--test/ruby/test_proc.rb1143
-rw-r--r--test/ruby/test_process.rb1561
-rw-r--r--test/ruby/test_rand.rb517
-rw-r--r--test/ruby/test_range.rb350
-rw-r--r--test/ruby/test_rational.rb1149
-rw-r--r--test/ruby/test_rational2.rb1386
-rw-r--r--test/ruby/test_readpartial.rb72
-rw-r--r--test/ruby/test_refinement.rb603
-rw-r--r--test/ruby/test_regexp.rb920
-rw-r--r--test/ruby/test_require.rb438
-rw-r--r--test/ruby/test_rubyoptions.rb607
-rw-r--r--test/ruby/test_settracefunc.rb565
-rw-r--r--test/ruby/test_signal.rb243
-rw-r--r--test/ruby/test_sleep.rb15
-rw-r--r--test/ruby/test_sprintf.rb394
-rw-r--r--test/ruby/test_sprintf_comb.rb553
-rw-r--r--test/ruby/test_string.rb2064
-rw-r--r--test/ruby/test_stringchar.rb181
-rw-r--r--test/ruby/test_struct.rb272
-rw-r--r--test/ruby/test_super.rb367
-rw-r--r--test/ruby/test_symbol.rb175
-rw-r--r--test/ruby/test_syntax.rb230
-rw-r--r--test/ruby/test_system.rb143
-rw-r--r--test/ruby/test_thread.rb866
-rw-r--r--test/ruby/test_time.rb970
-rw-r--r--test/ruby/test_time_tz.rb353
-rw-r--r--test/ruby/test_trace.rb61
-rw-r--r--test/ruby/test_transcode.rb2063
-rw-r--r--test/ruby/test_undef.rb37
-rw-r--r--test/ruby/test_unicode_escape.rb271
-rw-r--r--test/ruby/test_variable.rb97
-rw-r--r--test/ruby/test_whileuntil.rb83
-rw-r--r--test/ruby/test_yield.rb382
-rw-r--r--test/ruby/ut_eof.rb128
-rw-r--r--test/rubygems/bogussources.rb8
-rw-r--r--test/rubygems/ca_cert.pem45
-rw-r--r--test/rubygems/data/gem-private_key.pem27
-rw-r--r--test/rubygems/data/gem-public_cert.pem20
-rw-r--r--test/rubygems/data/null-type.gemspec.rzbin0 -> 553 bytes-rw-r--r--test/rubygems/fake_certlib/openssl.rb7
-rw-r--r--test/rubygems/fix_openssl_warnings.rb12
-rw-r--r--test/rubygems/foo/discover.rb0
-rw-r--r--test/rubygems/insure_session.rb43
-rw-r--r--test/rubygems/plugin/exception/rubygems_plugin.rb2
-rw-r--r--test/rubygems/plugin/load/rubygems_plugin.rb3
-rw-r--r--test/rubygems/plugin/standarderror/rubygems_plugin.rb2
-rw-r--r--test/rubygems/private_key.pem27
-rw-r--r--test/rubygems/public_cert.pem20
-rw-r--r--test/rubygems/rubygems/commands/crash_command.rb5
-rw-r--r--test/rubygems/rubygems_plugin.rb21
-rw-r--r--test/rubygems/sff/discover.rb0
-rw-r--r--test/rubygems/simple_gem.rb66
-rw-r--r--test/rubygems/ssl_cert.pem19
-rw-r--r--test/rubygems/ssl_key.pem15
-rw-r--r--test/rubygems/test_config.rb16
-rw-r--r--test/rubygems/test_gem.rb1281
-rw-r--r--test/rubygems/test_gem_builder.rb44
-rw-r--r--test/rubygems/test_gem_command.rb178
-rw-r--r--test/rubygems/test_gem_command_manager.rb215
-rw-r--r--test/rubygems/test_gem_commands_build_command.rb118
-rw-r--r--test/rubygems/test_gem_commands_cert_command.rb125
-rw-r--r--test/rubygems/test_gem_commands_check_command.rb18
-rw-r--r--test/rubygems/test_gem_commands_cleanup_command.rb89
-rw-r--r--test/rubygems/test_gem_commands_contents_command.rb145
-rw-r--r--test/rubygems/test_gem_commands_dependency_command.rb226
-rw-r--r--test/rubygems/test_gem_commands_environment_command.rb144
-rw-r--r--test/rubygems/test_gem_commands_fetch_command.rb102
-rw-r--r--test/rubygems/test_gem_commands_generate_index_command.rb131
-rw-r--r--test/rubygems/test_gem_commands_help_command.rb58
-rw-r--r--test/rubygems/test_gem_commands_install_command.rb354
-rw-r--r--test/rubygems/test_gem_commands_list_command.rb33
-rw-r--r--test/rubygems/test_gem_commands_lock_command.rb68
-rw-r--r--test/rubygems/test_gem_commands_outdated_command.rb38
-rw-r--r--test/rubygems/test_gem_commands_owner_command.rb147
-rw-r--r--test/rubygems/test_gem_commands_pristine_command.rb199
-rw-r--r--test/rubygems/test_gem_commands_push_command.rb107
-rw-r--r--test/rubygems/test_gem_commands_query_command.rb353
-rw-r--r--test/rubygems/test_gem_commands_server_command.rb59
-rw-r--r--test/rubygems/test_gem_commands_sources_command.rb210
-rw-r--r--test/rubygems/test_gem_commands_specification_command.rb241
-rw-r--r--test/rubygems/test_gem_commands_stale_command.rb40
-rw-r--r--test/rubygems/test_gem_commands_uninstall_command.rb137
-rw-r--r--test/rubygems/test_gem_commands_unpack_command.rb224
-rw-r--r--test/rubygems/test_gem_commands_update_command.rb372
-rw-r--r--test/rubygems/test_gem_commands_which_command.rb83
-rw-r--r--test/rubygems/test_gem_config_file.rb319
-rw-r--r--test/rubygems/test_gem_dependency.rb177
-rw-r--r--test/rubygems/test_gem_dependency_installer.rb853
-rw-r--r--test/rubygems/test_gem_dependency_list.rb268
-rw-r--r--test/rubygems/test_gem_doc_manager.rb32
-rw-r--r--test/rubygems/test_gem_ext_configure_builder.rb84
-rw-r--r--test/rubygems/test_gem_ext_ext_conf_builder.rb162
-rw-r--r--test/rubygems/test_gem_ext_rake_builder.rb66
-rw-r--r--test/rubygems/test_gem_format.rb88
-rw-r--r--test/rubygems/test_gem_gem_path_searcher.rb94
-rw-r--r--test/rubygems/test_gem_gem_runner.rb42
-rw-r--r--test/rubygems/test_gem_gemcutter_utilities.rb151
-rw-r--r--test/rubygems/test_gem_indexer.rb564
-rw-r--r--test/rubygems/test_gem_install_update_options.rb67
-rw-r--r--test/rubygems/test_gem_installer.rb1244
-rw-r--r--test/rubygems/test_gem_local_remote_options.rb114
-rw-r--r--test/rubygems/test_gem_package_tar_header.rb130
-rw-r--r--test/rubygems/test_gem_package_tar_input.rb129
-rw-r--r--test/rubygems/test_gem_package_tar_output.rb101
-rw-r--r--test/rubygems/test_gem_package_tar_reader.rb46
-rw-r--r--test/rubygems/test_gem_package_tar_reader_entry.rb119
-rw-r--r--test/rubygems/test_gem_package_tar_writer.rb144
-rw-r--r--test/rubygems/test_gem_package_task.rb59
-rw-r--r--test/rubygems/test_gem_path_support.rb93
-rw-r--r--test/rubygems/test_gem_platform.rb278
-rw-r--r--test/rubygems/test_gem_remote_fetcher.rb981
-rw-r--r--test/rubygems/test_gem_requirement.rb309
-rw-r--r--test/rubygems/test_gem_security.rb100
-rw-r--r--test/rubygems/test_gem_server.rb234
-rw-r--r--test/rubygems/test_gem_silent_ui.rb111
-rw-r--r--test/rubygems/test_gem_source_index.rb250
-rw-r--r--test/rubygems/test_gem_spec_fetcher.rb408
-rw-r--r--test/rubygems/test_gem_specification.rb1746
-rw-r--r--test/rubygems/test_gem_stream_ui.rb238
-rw-r--r--test/rubygems/test_gem_text.rb58
-rw-r--r--test/rubygems/test_gem_uninstaller.rb235
-rw-r--r--test/rubygems/test_gem_validator.rb63
-rw-r--r--test/rubygems/test_gem_version.rb181
-rw-r--r--test/rubygems/test_gem_version_option.rb89
-rw-r--r--test/rubygems/test_kernel.rb55
-rw-r--r--test/runner.rb25
-rw-r--r--test/scanf/data.txt6
-rw-r--r--test/scanf/test_scanf.rb325
-rw-r--r--test/scanf/test_scanfblocks.rb81
-rw-r--r--test/scanf/test_scanfio.rb20
-rw-r--r--test/sdbm/test_sdbm.rb555
-rw-r--r--test/socket/test_addrinfo.rb640
-rw-r--r--test/socket/test_ancdata.rb66
-rw-r--r--test/socket/test_basicsocket.rb88
-rw-r--r--test/socket/test_nonblock.rb284
-rw-r--r--test/socket/test_socket.rb551
-rw-r--r--test/socket/test_sockopt.rb33
-rw-r--r--test/socket/test_tcp.rb42
-rw-r--r--test/socket/test_udp.rb39
-rw-r--r--test/socket/test_unix.rb534
-rw-r--r--test/stringio/test_stringio.rb515
-rw-r--r--test/strscan/test_stringscanner.rb693
-rw-r--r--test/syslog/test_syslog_logger.rb521
-rw-r--r--test/test_cmath.rb16
-rw-r--r--test/test_curses.rb12
-rw-r--r--test/test_delegate.rb136
-rw-r--r--test/test_find.rb226
-rw-r--r--test/test_ipaddr.rb3
-rw-r--r--test/test_mathn.rb12
-rw-r--r--test/test_mutex_m.rb26
-rw-r--r--test/test_open3.rb242
-rw-r--r--test/test_pp.rb187
-rw-r--r--test/test_prettyprint.rb519
-rw-r--r--test/test_prime.rb174
-rw-r--r--test/test_pstore.rb137
-rw-r--r--test/test_pty.rb219
-rw-r--r--test/test_securerandom.rb185
-rw-r--r--test/test_set.rb3
-rw-r--r--test/test_shellwords.rb61
-rw-r--r--test/test_singleton.rb103
-rw-r--r--test/test_syslog.rb185
-rw-r--r--test/test_tempfile.rb308
-rw-r--r--test/test_time.rb414
-rw-r--r--test/test_timeout.rb32
-rw-r--r--test/test_tmpdir.rb21
-rw-r--r--test/test_tracer.rb63
-rw-r--r--test/test_tsort.rb44
-rw-r--r--test/test_weakref.rb24
-rw-r--r--test/testunit/test4test_hideskip.rb7
-rw-r--r--test/testunit/test4test_redefinition.rb11
-rw-r--r--test/testunit/test4test_sorting.rb15
-rw-r--r--test/testunit/test_assertion.rb8
-rw-r--r--test/testunit/test_hideskip.rb27
-rw-r--r--test/testunit/test_parallel.rb189
-rw-r--r--test/testunit/test_rake_integration.rb35
-rw-r--r--test/testunit/test_redefinition.rb13
-rw-r--r--test/testunit/test_sorting.rb17
-rw-r--r--test/testunit/tests_for_parallel/ptest_first.rb7
-rw-r--r--test/testunit/tests_for_parallel/ptest_forth.rb21
-rw-r--r--test/testunit/tests_for_parallel/ptest_second.rb11
-rw-r--r--test/testunit/tests_for_parallel/ptest_third.rb10
-rw-r--r--test/testunit/tests_for_parallel/runner.rb10
-rw-r--r--test/thread/test_queue.rb127
-rw-r--r--test/thread/test_sync.rb57
-rw-r--r--test/uri/test_common.rb124
-rw-r--r--test/uri/test_ftp.rb66
-rw-r--r--test/uri/test_generic.rb799
-rw-r--r--test/uri/test_http.rb64
-rw-r--r--test/uri/test_ldap.rb100
-rw-r--r--test/uri/test_mailto.rb132
-rw-r--r--test/uri/test_parser.rb41
-rw-r--r--test/webrick/.htaccess1
-rw-r--r--test/webrick/test_cgi.rb139
-rw-r--r--test/webrick/test_cookie.rb131
-rw-r--r--test/webrick/test_filehandler.rb285
-rw-r--r--test/webrick/test_httpauth.rb167
-rw-r--r--test/webrick/test_httpproxy.rb282
-rw-r--r--test/webrick/test_httprequest.rb411
-rw-r--r--test/webrick/test_httpresponse.rb49
-rw-r--r--test/webrick/test_httpserver.rb369
-rw-r--r--test/webrick/test_httputils.rb96
-rw-r--r--test/webrick/test_httpversion.rb40
-rw-r--r--test/webrick/test_server.rb92
-rw-r--r--test/webrick/test_utils.rb64
-rw-r--r--test/webrick/utils.rb57
-rw-r--r--test/webrick/webrick.cgi36
-rw-r--r--test/webrick/webrick_long_filename.cgi36
-rw-r--r--test/win32ole/err_in_callback.rb9
-rw-r--r--test/win32ole/orig_data.csv5
-rw-r--r--test/win32ole/test_err_in_callback.rb52
-rw-r--r--test/win32ole/test_folderitem2_invokeverb.rb65
-rw-r--r--test/win32ole/test_nil2vtempty.rb36
-rw-r--r--test/win32ole/test_ole_methods.rb36
-rw-r--r--test/win32ole/test_propertyputref.rb30
-rw-r--r--test/win32ole/test_thread.rb20
-rw-r--r--test/win32ole/test_win32ole.rb517
-rw-r--r--test/win32ole/test_win32ole_event.rb334
-rw-r--r--test/win32ole/test_win32ole_method.rb146
-rw-r--r--test/win32ole/test_win32ole_param.rb106
-rw-r--r--test/win32ole/test_win32ole_type.rb249
-rw-r--r--test/win32ole/test_win32ole_typelib.rb116
-rw-r--r--test/win32ole/test_win32ole_variable.rb61
-rw-r--r--test/win32ole/test_win32ole_variant.rb660
-rw-r--r--test/win32ole/test_win32ole_variant_m.rb35
-rw-r--r--test/win32ole/test_win32ole_variant_outarg.rb68
-rw-r--r--test/win32ole/test_word.rb72
-rw-r--r--test/with_different_ofs.rb17
-rw-r--r--test/xmlrpc/data/blog.xml18
-rw-r--r--test/xmlrpc/data/bug_bool.expected3
-rw-r--r--test/xmlrpc/data/bug_bool.xml8
-rw-r--r--test/xmlrpc/data/bug_cdata.expected3
-rw-r--r--test/xmlrpc/data/bug_cdata.xml8
-rw-r--r--test/xmlrpc/data/bug_covert.expected10
-rw-r--r--test/xmlrpc/data/bug_covert.xml6
-rw-r--r--test/xmlrpc/data/datetime_iso8601.xml8
-rw-r--r--test/xmlrpc/data/fault.xml16
-rw-r--r--test/xmlrpc/data/value.expected7
-rw-r--r--test/xmlrpc/data/value.xml22
-rw-r--r--test/xmlrpc/data/xml1.expected243
-rw-r--r--test/xmlrpc/data/xml1.xml1
-rw-r--r--test/xmlrpc/htpasswd2
-rw-r--r--test/xmlrpc/test_client.rb293
-rw-r--r--test/xmlrpc/test_cookie.rb96
-rw-r--r--test/xmlrpc/test_datetime.rb159
-rw-r--r--test/xmlrpc/test_features.rb48
-rw-r--r--test/xmlrpc/test_marshal.rb108
-rw-r--r--test/xmlrpc/test_parser.rb91
-rw-r--r--test/xmlrpc/test_webrick_server.rb134
-rw-r--r--test/xmlrpc/webrick_testing.rb44
-rw-r--r--test/zlib/test_zlib.rb1053
-rw-r--r--thread.c4876
-rw-r--r--thread_pthread.c1468
-rw-r--r--thread_pthread.h56
-rw-r--r--thread_win32.c787
-rw-r--r--thread_win32.h45
-rw-r--r--time.c5138
-rw-r--r--timev.h21
-rwxr-xr-xtool/asm_parse.rb51
-rwxr-xr-xtool/build-transcode16
-rwxr-xr-xtool/change_maker.rb30
-rwxr-xr-xtool/compile_prelude.rb198
-rwxr-xr-xtool/config.guess1522
-rwxr-xr-xtool/config.sub1771
-rw-r--r--tool/enc-emoji-citrus-gen.rb131
-rw-r--r--tool/enc-emoji4unicode.rb133
-rwxr-xr-xtool/enc-unicode.rb358
-rwxr-xr-xtool/eval.rb159
-rwxr-xr-xtool/file2lastrev.rb160
-rwxr-xr-xtool/generic_erb.rb48
-rwxr-xr-xtool/id2token.rb29
-rwxr-xr-xtool/ifchange48
-rwxr-xr-xtool/insns2vm.rb15
-rw-r--r--tool/install-sh17
-rwxr-xr-xtool/instruction.rb1399
-rw-r--r--tool/jisx0208.rb84
-rwxr-xr-xtool/make-snapshot262
-rwxr-xr-xtool/mdoc2man.rb465
-rwxr-xr-xtool/merger.rb213
-rwxr-xr-xtool/mkconfig.rb272
-rwxr-xr-xtool/mkrunnable.rb83
-rwxr-xr-xtool/node_name.rb6
-rwxr-xr-xtool/parse.rb13
-rwxr-xr-xtool/rbinstall.rb681
-rwxr-xr-xtool/rmdirs11
-rwxr-xr-xtool/rubytest.rb29
-rwxr-xr-xtool/runruby.rb99
-rwxr-xr-xtool/strip-rdoc.rb22
-rw-r--r--tool/test/test_jisx0208.rb40
-rwxr-xr-xtool/transcode-tblgen.rb1074
-rwxr-xr-xtool/update-deps139
-rwxr-xr-xtool/vtlh.rb15
-rwxr-xr-xtool/ytab.sed37
-rw-r--r--transcode.c4462
-rw-r--r--transcode_data.h127
-rw-r--r--util.c4263
-rw-r--r--util.h53
-rw-r--r--variable.c2599
-rw-r--r--version.c149
-rw-r--r--version.h57
-rw-r--r--vm.c2497
-rw-r--r--vm_backtrace.c832
-rw-r--r--vm_core.h911
-rw-r--r--vm_dump.c708
-rw-r--r--vm_eval.c1864
-rw-r--r--vm_exec.c143
-rw-r--r--vm_exec.h173
-rw-r--r--vm_insnhelper.c2200
-rw-r--r--vm_insnhelper.h273
-rw-r--r--vm_method.c1565
-rw-r--r--vm_opts.h52
-rw-r--r--vm_trace.c905
-rw-r--r--vsnprintf.c1322
-rw-r--r--win32/Makefile.sub1223
-rw-r--r--win32/README.win3268
-rw-r--r--win32/config.h.in59
-rw-r--r--win32/config.status.in66
-rwxr-xr-xwin32/configure.bat211
-rw-r--r--win32/dir.h46
-rw-r--r--win32/enc-setup.mak10
-rw-r--r--win32/file.c661
-rwxr-xr-xwin32/ifchange.bat77
-rwxr-xr-xwin32/makedirs.bat3
-rwxr-xr-x[-rw-r--r--]win32/mkexports.rb186
-rwxr-xr-x[-rw-r--r--]win32/resource.rb55
-rwxr-xr-xwin32/rm.bat18
-rwxr-xr-xwin32/rmall.bat6
-rwxr-xr-xwin32/rmdirs.bat29
-rw-r--r--win32/setup.mak266
-rw-r--r--win32/stub.c42
-rw-r--r--win32/win32.c7411
-rw-r--r--win32/win32.h446
-rw-r--r--win32/winmain.c4
-rw-r--r--x68/_dtos18.c250
-rw-r--r--x68/_round.c45
-rw-r--r--x68/fconvert.c81
-rw-r--r--x68/select.c167
3868 files changed, 1491973 insertions, 89192 deletions
diff --git a/.cvsignore b/.cvsignore
deleted file mode 100644
index 35fff17b58..0000000000
--- a/.cvsignore
+++ /dev/null
@@ -1,20 +0,0 @@
-*.bak
-*.orig
-*.rej
-*.sav
-*~
-.cvsignore
-Makefile
-README.fat-patch
-archive
-config.cache
-config.h
-config.log
-config.status
-configure
-miniruby
-newver.rb
-parse.c
-ppack
-rbconfig.rb
-ruby
diff --git a/.document b/.document
new file mode 100644
index 0000000000..8a05d61beb
--- /dev/null
+++ b/.document
@@ -0,0 +1,22 @@
+# This file determines which files in the
+# Ruby hierarchy will be processed by the RDoc
+# tool when it is given the top-level directory
+# as an argument
+
+# Process all the C source files
+*.c
+
+# prelude
+prelude.rb
+
+# the lib/ directory (which has its own .document file)
+
+lib
+
+
+# and some of the ext/ directory (which has its own .document file)
+
+ext
+
+# rdoc files
+doc/*.rdoc
diff --git a/.editorconfig b/.editorconfig
new file mode 100644
index 0000000000..67abf4b978
--- /dev/null
+++ b/.editorconfig
@@ -0,0 +1,16 @@
+root = true
+
+[*]
+end_of_line = lf
+insert_final_newline = true
+trim_trailing_whitespace = true
+tab_width = 8
+indent_style = tab
+indent_size = 4
+
+[**.bat]
+end_of_line = crlf
+
+[**.rb]
+indent_style = space
+indent_size = 2
diff --git a/.gdbinit b/.gdbinit
new file mode 100644
index 0000000000..b67115b6a2
--- /dev/null
+++ b/.gdbinit
@@ -0,0 +1,802 @@
+define rp
+ if ruby_dummy_gdb_enums.special_consts
+ end
+ if (VALUE)($arg0) & RUBY_FIXNUM_FLAG
+ printf "FIXNUM: %ld\n", (long)($arg0) >> 1
+ else
+ if ((VALUE)($arg0) & ~(~(VALUE)0<<RUBY_SPECIAL_SHIFT)) == RUBY_SYMBOL_FLAG
+ set $id = (($arg0) >> RUBY_SPECIAL_SHIFT)
+ if $id == '!' || $id == '+' || $id == '-' || $id == '*' || $id == '/' || $id == '%' || $id == '<' || $id == '>' || $id == '`'
+ printf "SYMBOL(:%c)\n", $id
+ else
+ if $id == idDot2
+ echo SYMBOL(:..)\n
+ else
+ if $id == idDot3
+ echo SYMBOL(:...)\n
+ else
+ if $id == idUPlus
+ echo SYMBOL(:+@)\n
+ else
+ if $id == idUMinus
+ echo SYMBOL(:-@)\n
+ else
+ if $id == idPow
+ echo SYMBOL(:**)\n
+ else
+ if $id == idCmp
+ echo SYMBOL(:<=>)\n
+ else
+ if $id == idLTLT
+ echo SYMBOL(:<<)\n
+ else
+ if $id == idLE
+ echo SYMBOL(:<=)\n
+ else
+ if $id == idGE
+ echo SYMBOL(:>=)\n
+ else
+ if $id == idEq
+ echo SYMBOL(:==)\n
+ else
+ if $id == idEqq
+ echo SYMBOL(:===)\n
+ else
+ if $id == idNeq
+ echo SYMBOL(:!=)\n
+ else
+ if $id == idEqTilde
+ echo SYMBOL(:=~)\n
+ else
+ if $id == idNeqTilde
+ echo SYMBOL(:!~)\n
+ else
+ if $id == idAREF
+ echo SYMBOL(:[])\n
+ else
+ if $id == idASET
+ echo SYMBOL(:[]=)\n
+ else
+ printf "SYMBOL(%ld)\n", $id
+ end
+ end
+ end
+ end
+ end
+ end
+ end
+ end
+ end
+ end
+ end
+ end
+ end
+ end
+ end
+ end
+ end
+ else
+ if ($arg0) == RUBY_Qfalse
+ echo false\n
+ else
+ if ($arg0) == RUBY_Qtrue
+ echo true\n
+ else
+ if ($arg0) == RUBY_Qnil
+ echo nil\n
+ else
+ if ($arg0) == RUBY_Qundef
+ echo undef\n
+ else
+ if (VALUE)($arg0) & RUBY_IMMEDIATE_MASK
+ if ((VALUE)($arg0) & RUBY_FLONUM_MASK) == RUBY_FLONUM_FLAG
+ printf "FLONUM: %g\n", (double)rb_float_value($arg0)
+ else
+ echo immediate\n
+ end
+ else
+ set $flags = ((struct RBasic*)($arg0))->flags
+ if ($flags & RUBY_T_MASK) == RUBY_T_NONE
+ printf "T_NONE: "
+ print (struct RBasic *)($arg0)
+ else
+ if ($flags & RUBY_T_MASK) == RUBY_T_NIL
+ printf "T_NIL: "
+ print (struct RBasic *)($arg0)
+ else
+ if ($flags & RUBY_T_MASK) == RUBY_T_OBJECT
+ printf "T_OBJECT: "
+ print (struct RObject *)($arg0)
+ else
+ if ($flags & RUBY_T_MASK) == RUBY_T_CLASS
+ printf "T_CLASS%s: ", ($flags & RUBY_FL_SINGLETON) ? "*" : ""
+ rp_class $arg0
+ else
+ if ($flags & RUBY_T_MASK) == RUBY_T_ICLASS
+ printf "T_ICLASS: "
+ rp_class $arg0
+ else
+ if ($flags & RUBY_T_MASK) == RUBY_T_MODULE
+ printf "T_MODULE: "
+ rp_class $arg0
+ else
+ if ($flags & RUBY_T_MASK) == RUBY_T_FLOAT
+ printf "T_FLOAT: %.16g ", (((struct RFloat*)($arg0))->float_value)
+ print (struct RFloat *)($arg0)
+ else
+ if ($flags & RUBY_T_MASK) == RUBY_T_STRING
+ printf "T_STRING: "
+ set print address off
+ output (char *)(($flags & RUBY_FL_USER1) ? \
+ ((struct RString*)($arg0))->as.heap.ptr : \
+ ((struct RString*)($arg0))->as.ary)
+ set print address on
+ printf " bytesize:%ld ", ($flags & RUBY_FL_USER1) ? \
+ ((struct RString*)($arg0))->as.heap.len : \
+ (($flags & (RUBY_FL_USER2|RUBY_FL_USER3|RUBY_FL_USER4|RUBY_FL_USER5|RUBY_FL_USER6)) >> RUBY_FL_USHIFT+2)
+ if !($flags & RUBY_FL_USER1)
+ printf "(embed) "
+ else
+ if ($flags & RUBY_FL_USER2)
+ printf "(shared) "
+ end
+ if ($flags & RUBY_FL_USER3)
+ printf "(assoc) "
+ end
+ end
+ printf "encoding:%d ", ($flags & RUBY_ENCODING_MASK) >> RUBY_ENCODING_SHIFT
+ if ($flags & RUBY_ENC_CODERANGE_MASK) == 0
+ printf "coderange:unknown "
+ else
+ if ($flags & RUBY_ENC_CODERANGE_MASK) == RUBY_ENC_CODERANGE_7BIT
+ printf "coderange:7bit "
+ else
+ if ($flags & RUBY_ENC_CODERANGE_MASK) == RUBY_ENC_CODERANGE_VALID
+ printf "coderange:valid "
+ else
+ printf "coderange:broken "
+ end
+ end
+ end
+ print (struct RString *)($arg0)
+ else
+ if ($flags & RUBY_T_MASK) == RUBY_T_REGEXP
+ set $regsrc = ((struct RRegexp*)($arg0))->src
+ set $rsflags = ((struct RBasic*)$regsrc)->flags
+ printf "T_REGEXP: "
+ set print address off
+ output (char *)(($rsflags & RUBY_FL_USER1) ? \
+ ((struct RString*)$regsrc)->as.heap.ptr : \
+ ((struct RString*)$regsrc)->as.ary)
+ set print address on
+ printf " len:%ld ", ($rsflags & RUBY_FL_USER1) ? \
+ ((struct RString*)$regsrc)->as.heap.len : \
+ (($rsflags & (RUBY_FL_USER2|RUBY_FL_USER3|RUBY_FL_USER4|RUBY_FL_USER5|RUBY_FL_USER6)) >> RUBY_FL_USHIFT+2)
+ if $flags & RUBY_FL_USER6
+ printf "(none) "
+ end
+ if $flags & RUBY_FL_USER5
+ printf "(literal) "
+ end
+ if $flags & RUBY_FL_USER4
+ printf "(fixed) "
+ end
+ printf "encoding:%d ", ($flags & RUBY_ENCODING_MASK) >> RUBY_ENCODING_SHIFT
+ print (struct RRegexp *)($arg0)
+ else
+ if ($flags & RUBY_T_MASK) == RUBY_T_ARRAY
+ if ($flags & RUBY_FL_USER1)
+ set $len = (($flags & (RUBY_FL_USER3|RUBY_FL_USER4)) >> (RUBY_FL_USHIFT+3))
+ printf "T_ARRAY: len=%ld ", $len
+ printf "(embed) "
+ if ($len == 0)
+ printf "{(empty)} "
+ else
+ output/x *((VALUE*)((struct RArray*)($arg0))->as.ary) @ $len
+ printf " "
+ end
+ else
+ set $len = ((struct RArray*)($arg0))->as.heap.len
+ printf "T_ARRAY: len=%ld ", $len
+ if ($flags & RUBY_FL_USER2)
+ printf "(shared) shared="
+ output/x ((struct RArray*)($arg0))->as.heap.aux.shared
+ printf " "
+ else
+ printf "(ownership) capa=%ld ", ((struct RArray*)($arg0))->as.heap.aux.capa
+ end
+ if ($len == 0)
+ printf "{(empty)} "
+ else
+ output/x *((VALUE*)((struct RArray*)($arg0))->as.heap.ptr) @ $len
+ printf " "
+ end
+ end
+ print (struct RArray *)($arg0)
+ else
+ if ($flags & RUBY_T_MASK) == RUBY_T_FIXNUM
+ printf "T_FIXNUM: "
+ print (struct RBasic *)($arg0)
+ else
+ if ($flags & RUBY_T_MASK) == RUBY_T_HASH
+ printf "T_HASH: ",
+ if ((struct RHash *)($arg0))->ntbl
+ printf "len=%ld ", ((struct RHash *)($arg0))->ntbl->num_entries
+ end
+ print (struct RHash *)($arg0)
+ else
+ if ($flags & RUBY_T_MASK) == RUBY_T_STRUCT
+ printf "T_STRUCT: len=%ld ", \
+ (($flags & (RUBY_FL_USER1|RUBY_FL_USER2)) ? \
+ ($flags & (RUBY_FL_USER1|RUBY_FL_USER2)) >> (RUBY_FL_USHIFT+1) : \
+ ((struct RStruct *)($arg0))->as.heap.len)
+ print (struct RStruct *)($arg0)
+ x/xw (($flags & (RUBY_FL_USER1|RUBY_FL_USER2)) ? \
+ ((struct RStruct *)($arg0))->as.ary : \
+ ((struct RStruct *)($arg0))->as.heap.ptr)
+ else
+ if ($flags & RUBY_T_MASK) == RUBY_T_BIGNUM
+ printf "T_BIGNUM: sign=%d len=%ld ", \
+ (($flags & RUBY_FL_USER1) != 0), \
+ (($flags & RUBY_FL_USER2) ? \
+ ($flags & (RUBY_FL_USER5|RUBY_FL_USER4|RUBY_FL_USER3)) >> (RUBY_FL_USHIFT+3) : \
+ ((struct RBignum*)($arg0))->as.heap.len)
+ if $flags & RUBY_FL_USER2
+ printf "(embed) "
+ end
+ print (struct RBignum *)($arg0)
+ x/xw (($flags & RUBY_FL_USER2) ? \
+ ((struct RBignum*)($arg0))->as.ary : \
+ ((struct RBignum*)($arg0))->as.heap.digits)
+ else
+ if ($flags & RUBY_T_MASK) == RUBY_T_RATIONAL
+ printf "T_RATIONAL: "
+ print (struct RRational *)($arg0)
+ else
+ if ($flags & RUBY_T_MASK) == RUBY_T_COMPLEX
+ printf "T_COMPLEX: "
+ print (struct RComplex *)($arg0)
+ else
+ if ($flags & RUBY_T_MASK) == RUBY_T_FILE
+ printf "T_FILE: "
+ print (struct RFile *)($arg0)
+ output *((struct RFile *)($arg0))->fptr
+ printf "\n"
+ else
+ if ($flags & RUBY_T_MASK) == RUBY_T_TRUE
+ printf "T_TRUE: "
+ print (struct RBasic *)($arg0)
+ else
+ if ($flags & RUBY_T_MASK) == RUBY_T_FALSE
+ printf "T_FALSE: "
+ print (struct RBasic *)($arg0)
+ else
+ if ($flags & RUBY_T_MASK) == RUBY_T_DATA
+ if ((struct RTypedData *)($arg0))->typed_flag == 1
+ printf "T_DATA(%s): ", ((struct RTypedData *)($arg0))->type->wrap_struct_name
+ print (struct RTypedData *)($arg0)
+ else
+ printf "T_DATA: "
+ print (struct RData *)($arg0)
+ end
+ else
+ if ($flags & RUBY_T_MASK) == RUBY_T_MATCH
+ printf "T_MATCH: "
+ print (struct RMatch *)($arg0)
+ else
+ if ($flags & RUBY_T_MASK) == RUBY_T_SYMBOL
+ printf "T_SYMBOL: "
+ print (struct RBasic *)($arg0)
+ else
+ if ($flags & RUBY_T_MASK) == RUBY_T_UNDEF
+ printf "T_UNDEF: "
+ print (struct RBasic *)($arg0)
+ else
+ if ($flags & RUBY_T_MASK) == RUBY_T_NODE
+ printf "T_NODE("
+ output (enum node_type)(($flags&RUBY_NODE_TYPEMASK)>>RUBY_NODE_TYPESHIFT)
+ printf "): "
+ print *(NODE *)($arg0)
+ else
+ if ($flags & RUBY_T_MASK) == RUBY_T_ZOMBIE
+ printf "T_ZOMBIE: "
+ print (struct RData *)($arg0)
+ else
+ printf "unknown: "
+ print (struct RBasic *)($arg0)
+ end
+ end
+ end
+ end
+ end
+ end
+ end
+ end
+ end
+ end
+ end
+ end
+ end
+ end
+ end
+ end
+ end
+ end
+ end
+ end
+ end
+ end
+ end
+ end
+ end
+ end
+ end
+ end
+ end
+ end
+ end
+ end
+end
+document rp
+ Print a Ruby's VALUE.
+end
+
+define rp_class
+ printf "(struct RClass *) %p", (void*)$arg0
+ if ((struct RClass *)($arg0))->ptr.origin != $arg0
+ printf " -> %p", ((struct RClass *)($arg0))->ptr.origin
+ end
+ printf "\n"
+ print *(struct RClass *)($arg0)
+ print *((struct RClass *)($arg0))->ptr
+end
+document rp_class
+ Print the content of a Class/Module.
+end
+
+define nd_type
+ print (enum node_type)((((NODE*)($arg0))->flags&RUBY_NODE_TYPEMASK)>>RUBY_NODE_TYPESHIFT)
+end
+document nd_type
+ Print a Ruby' node type.
+end
+
+define nd_file
+ print ((NODE*)($arg0))->nd_file
+end
+document nd_file
+ Print the source file name of a node.
+end
+
+define nd_line
+ print ((unsigned int)((((NODE*)($arg0))->flags>>RUBY_NODE_LSHIFT)&RUBY_NODE_LMASK))
+end
+document nd_line
+ Print the source line number of a node.
+end
+
+# Print members of ruby node.
+
+define nd_head
+ printf "u1.node: "
+ rp ($arg0).u1.node
+end
+
+define nd_alen
+ printf "u2.argc: "
+ p ($arg0).u2.argc
+end
+
+define nd_next
+ printf "u3.node: "
+ rp ($arg0).u3.node
+end
+
+
+define nd_cond
+ printf "u1.node: "
+ rp ($arg0).u1.node
+end
+
+define nd_body
+ printf "u2.node: "
+ rp ($arg0).u2.node
+end
+
+define nd_else
+ printf "u3.node: "
+ rp ($arg0).u3.node
+end
+
+
+define nd_orig
+ printf "u3.value: "
+ rp ($arg0).u3.value
+end
+
+
+define nd_resq
+ printf "u2.node: "
+ rp ($arg0).u2.node
+end
+
+define nd_ensr
+ printf "u3.node: "
+ rp ($arg0).u3.node
+end
+
+
+define nd_1st
+ printf "u1.node: "
+ rp ($arg0).u1.node
+end
+
+define nd_2nd
+ printf "u2.node: "
+ rp ($arg0).u2.node
+end
+
+
+define nd_stts
+ printf "u1.node: "
+ rp ($arg0).u1.node
+end
+
+
+define nd_entry
+ printf "u3.entry: "
+ p ($arg0).u3.entry
+end
+
+define nd_vid
+ printf "u1.id: "
+ p ($arg0).u1.id
+end
+
+define nd_cflag
+ printf "u2.id: "
+ p ($arg0).u2.id
+end
+
+define nd_cval
+ printf "u3.value: "
+ rp ($arg0).u3.value
+end
+
+
+define nd_cnt
+ printf "u3.cnt: "
+ p ($arg0).u3.cnt
+end
+
+define nd_tbl
+ printf "u1.tbl: "
+ p ($arg0).u1.tbl
+end
+
+
+define nd_var
+ printf "u1.node: "
+ rp ($arg0).u1.node
+end
+
+define nd_ibdy
+ printf "u2.node: "
+ rp ($arg0).u2.node
+end
+
+define nd_iter
+ printf "u3.node: "
+ rp ($arg0).u3.node
+end
+
+
+define nd_value
+ printf "u2.node: "
+ rp ($arg0).u2.node
+end
+
+define nd_aid
+ printf "u3.id: "
+ p ($arg0).u3.id
+end
+
+
+define nd_lit
+ printf "u1.value: "
+ rp ($arg0).u1.value
+end
+
+
+define nd_frml
+ printf "u1.node: "
+ rp ($arg0).u1.node
+end
+
+define nd_rest
+ printf "u2.argc: "
+ p ($arg0).u2.argc
+end
+
+define nd_opt
+ printf "u1.node: "
+ rp ($arg0).u1.node
+end
+
+
+define nd_recv
+ printf "u1.node: "
+ rp ($arg0).u1.node
+end
+
+define nd_mid
+ printf "u2.id: "
+ p ($arg0).u2.id
+end
+
+define nd_args
+ printf "u3.node: "
+ rp ($arg0).u3.node
+end
+
+
+define nd_noex
+ printf "u1.id: "
+ p ($arg0).u1.id
+end
+
+define nd_defn
+ printf "u3.node: "
+ rp ($arg0).u3.node
+end
+
+
+define nd_old
+ printf "u1.id: "
+ p ($arg0).u1.id
+end
+
+define nd_new
+ printf "u2.id: "
+ p ($arg0).u2.id
+end
+
+
+define nd_cfnc
+ printf "u1.cfunc: "
+ p ($arg0).u1.cfunc
+end
+
+define nd_argc
+ printf "u2.argc: "
+ p ($arg0).u2.argc
+end
+
+
+define nd_cname
+ printf "u1.id: "
+ p ($arg0).u1.id
+end
+
+define nd_super
+ printf "u3.node: "
+ rp ($arg0).u3.node
+end
+
+
+define nd_modl
+ printf "u1.id: "
+ p ($arg0).u1.id
+end
+
+define nd_clss
+ printf "u1.value: "
+ rp ($arg0).u1.value
+end
+
+
+define nd_beg
+ printf "u1.node: "
+ rp ($arg0).u1.node
+end
+
+define nd_end
+ printf "u2.node: "
+ rp ($arg0).u2.node
+end
+
+define nd_state
+ printf "u3.state: "
+ p ($arg0).u3.state
+end
+
+define nd_rval
+ printf "u2.value: "
+ rp ($arg0).u2.value
+end
+
+
+define nd_nth
+ printf "u2.argc: "
+ p ($arg0).u2.argc
+end
+
+
+define nd_tag
+ printf "u1.id: "
+ p ($arg0).u1.id
+end
+
+define nd_tval
+ printf "u2.value: "
+ rp ($arg0).u2.value
+end
+
+define rb_p
+ call rb_p($arg0)
+end
+
+define rb_numtable_entry
+ set $rb_numtable_tbl = $arg0
+ set $rb_numtable_id = (st_data_t)$arg1
+ set $rb_numtable_key = 0
+ set $rb_numtable_rec = 0
+ if $rb_numtable_tbl->entries_packed
+ set $rb_numtable_p = $rb_numtable_tbl->as.packed.bins
+ while $rb_numtable_p && $rb_numtable_p < $rb_numtable_tbl->as.packed.bins+$rb_numtable_tbl->num_entries
+ if $rb_numtable_p.k == $rb_numtable_id
+ set $rb_numtable_key = $rb_numtable_p.k
+ set $rb_numtable_rec = $rb_numtable_p.v
+ set $rb_numtable_p = 0
+ else
+ set $rb_numtable_p = $rb_numtable_p + 1
+ end
+ end
+ else
+ set $rb_numtable_p = $rb_numtable_tbl->as.big.bins[$rb_numtable_id % $rb_numtable_tbl->num_bins]
+ while $rb_numtable_p
+ if $rb_numtable_p->key == $rb_numtable_id
+ set $rb_numtable_key = $rb_numtable_p->key
+ set $rb_numtable_rec = $rb_numtable_p->record
+ set $rb_numtable_p = 0
+ else
+ set $rb_numtable_p = $rb_numtable_p->next
+ end
+ end
+ end
+end
+
+define rb_id2name
+ rb_numtable_entry global_symbols.id_str (ID)$arg0
+ if $rb_numtable_rec
+ rp $rb_numtable_rec
+ else
+ echo undef\n
+ end
+end
+document rb_id2name
+ Print the name of id
+end
+
+define rb_method_entry
+ set $rb_method_entry_klass = (struct RClass *)$arg0
+ set $rb_method_entry_id = (ID)$arg1
+ set $rb_method_entry_me = (rb_method_entry_t *)0
+ while !$rb_method_entry_me && $rb_method_entry_klass
+ rb_numtable_entry $rb_method_entry_klass->m_tbl $rb_method_entry_id
+ set $rb_method_entry_me = (rb_method_entry_t *)$rb_numtable_rec
+ if !$rb_method_entry_me
+ set $rb_method_entry_klass = (struct RClass *)$rb_method_entry_klass->ptr->super
+ end
+ end
+ if $rb_method_entry_me
+ print *$rb_method_entry_klass
+ print *$rb_method_entry_me
+ else
+ echo method not found\n
+ end
+end
+document rb_method_entry
+ Search method entry by class and id
+end
+
+define rb_classname
+ call classname($arg0)
+ rb_p $
+ print *(struct RClass*)($arg0)
+end
+
+define rb_ancestors
+ set $rb_ancestors_module = $arg0
+ while $rb_ancestors_module
+ rp $rb_ancestors_module
+ set $rb_ancestors_module = ((struct RClass *)($rb_ancestors_module))->ptr.super
+ end
+end
+document rb_ancestors
+ Print ancestors.
+end
+
+define rb_backtrace
+ call rb_backtrace()
+end
+
+define iseq
+ if dummy_gdb_enums.special_consts
+ end
+ if ($arg0)->type == ISEQ_ELEMENT_NONE
+ echo [none]\n
+ end
+ if ($arg0)->type == ISEQ_ELEMENT_LABEL
+ print *(LABEL*)($arg0)
+ end
+ if ($arg0)->type == ISEQ_ELEMENT_INSN
+ print *(INSN*)($arg0)
+ if ((INSN*)($arg0))->insn_id != YARVINSN_jump
+ set $i = 0
+ set $operand_size = ((INSN*)($arg0))->operand_size
+ set $operands = ((INSN*)($arg0))->operands
+ while $i < $operand_size
+ rp $operands[$i++]
+ end
+ end
+ end
+ if ($arg0)->type == ISEQ_ELEMENT_ADJUST
+ print *(ADJUST*)($arg0)
+ end
+end
+
+define rb_ps
+ rb_ps_vm ruby_current_vm
+end
+document rb_ps
+Dump all threads and their callstacks
+end
+
+define rb_ps_vm
+ print $ps_vm = (rb_vm_t*)$arg0
+ set $ps_threads = (st_table*)$ps_vm->living_threads
+ if $ps_threads->entries_packed
+ set $ps_threads_i = 0
+ while $ps_threads_i < $ps_threads->num_entries
+ set $ps_threads_key = (st_data_t)$ps_threads->as.packed.entries[$ps_threads_i].key
+ set $ps_threads_val = (st_data_t)$ps_threads->as.packed.entries[$ps_threads_i].val
+ rb_ps_thread $ps_threads_key $ps_threads_val
+ set $ps_threads_i = $ps_threads_i + 1
+ end
+ else
+ set $ps_threads_ptr = (st_table_entry*)$ps_threads->head
+ while $ps_threads_ptr
+ set $ps_threads_key = (st_data_t)$ps_threads_ptr->key
+ set $ps_threads_val = (st_data_t)$ps_threads_ptr->record
+ rb_ps_thread $ps_threads_key $ps_threads_val
+ set $ps_threads_ptr = (st_table_entry*)$ps_threads_ptr->fore
+ end
+ end
+end
+document rb_ps_vm
+Dump all threads in a (rb_vm_t*) and their callstacks
+end
+
+define rb_ps_thread
+ set $ps_thread = (struct RTypedData*)$arg0
+ set $ps_thread_id = $arg1
+ print $ps_thread_th = (rb_thread_t*)$ps_thread->data
+end
+
+# Details: https://bugs.ruby-lang.org/projects/ruby-trunk/wiki/MachineInstructionsTraceWithGDB
+define trace_machine_instructions
+ set logging on
+ set height 0
+ set width 0
+ display/i $pc
+ while !$exit_code
+ info line *$pc
+ si
+ end
+end
+
+define SDR
+ call rb_vmdebug_stack_dump_raw_current()
+end
+
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000000..d743d60510
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,124 @@
+*-*-*.def
+*.a
+*.bak
+*.dSYM
+*.dylib
+*.inc
+*.log
+*.o
+*.orig
+*.rej
+*.sav
+*.swp
+*~
+.*-*
+.*.list
+.*.time
+.DS_Store
+.ccmalloc
+.ext
+.pc
+.ppack
+.svn
+Makefile
+extconf.h
+y.output
+y.tab.c
+
+# /
+/*.pc
+/*_prelude.c
+/COPYING.LIB
+/ChangeLog-1.8.0
+/ChangeLog.pre-alpha
+/ChangeLog.pre1_1
+/Doxyfile
+/GNUmakefile
+/README.atheos
+/README.fat-patch
+/README.v6
+/TAGS
+/archive
+/autom4te*.cache
+/automake
+/beos
+/breakpoints.gdb
+/config.cache
+/config.h
+/config.h.in
+/config.status
+/config.status.lineno
+/configure
+/doc/capi
+/enc.mk
+/encdb.h
+/exts.mk
+/goruby
+/id.h
+/largefile.h
+/lex.c
+/libruby*.*
+/miniprelude.c
+/miniruby
+/newdate.rb
+/newline.c
+/newver.rb
+/parse.c
+/parse.h
+/patches
+/patches-master
+/pitest.rb
+/ppack
+/prelude.c
+/preview
+/rbconfig.rb
+/rename2.h
+/repack
+/revision.h
+/riscos
+/rubicon
+/ruby
+/ruby-man.rd.gz
+/test.rb
+/tmp
+/transdb.h
+/uncommon.mk
+/verconf.h
+/web
+/yasmdata.rb
+
+# /benchmark/
+/benchmark/bmx_*.rb
+
+# /enc/trans/
+/enc/trans/*.c
+
+# /ext/
+/ext/extinit.c
+
+# /ext/dl/callback/
+/ext/dl/callback/callback-*.c
+/ext/dl/callback/callback.c
+
+# /ext/ripper/
+/ext/ripper/eventids1.c
+/ext/ripper/eventids2table.c
+/ext/ripper/ripper.*
+/ext/ripper/ids1
+/ext/ripper/ids2
+
+# /ext/socket/
+/ext/socket/constants.h
+/ext/socket/constdefs.h
+/ext/socket/constdefs.c
+
+# /ext/tk/
+/ext/tk/config_list
+
+# /spec/
+/spec/mspec
+/spec/rubyspec
+
+# /win32/
+/win32/*.ico
+/win32/.time
diff --git a/.indent.pro b/.indent.pro
new file mode 100644
index 0000000000..6a207a0554
--- /dev/null
+++ b/.indent.pro
@@ -0,0 +1,21 @@
+-bap
+-nbbb
+-nbc
+-br
+-nbs
+-ncdb
+-ce
+-cli0.5
+-ndj
+-ei
+-nfc1
+-i4
+-l120
+-lp
+-npcs
+-psl
+-sc
+-sob
+
+-TID
+-TVALUE
diff --git a/.travis.yml b/.travis.yml
new file mode 100644
index 0000000000..582835a594
--- /dev/null
+++ b/.travis.yml
@@ -0,0 +1,71 @@
+# Copyright (C) 2011 Urabe, Shyouhei. All rights reserved.
+#
+# This file is a part of the programming language Ruby. Permission is hereby
+# granted, to either redistribute or modify this file, provided that the
+# conditions mentioned in the file COPYING are met. Consult the file for
+# details.
+
+# This is a Travis-CI build configuration file. The list of configurations
+# available is located in
+#
+# http://about.travis-ci.org/docs/user/build-configuration/
+#
+# and as Ruby itself is a project written in C language,
+#
+# http://about.travis-ci.org/docs/user/languages/c/
+#
+# is also a good place to look at.
+
+# Language specification.
+language: c
+
+# Compilers. Several compilers are provided in Travis, so we try them all.
+# The value set here is visible via $CC environment variable.
+compiler:
+ - gcc
+ - clang
+
+# Dependencies. Some header files are missing in a Travis' worker VM, so we
+# have to install them. The "1.9.1" here is OK. It is the most adopted
+# version string for Debian/Ubuntu, and no dependencies have been changed so
+# far since the 1.9.1 release.
+before_install:
+ - "sudo apt-get -qq update"
+ - "sudo apt-get -qq install $CC" # upgrade if any
+install: "sudo apt-get -qq build-dep ruby1.9.1 2>/dev/null"
+
+# Script is where the test runs. Note we just do "make test", not other tests
+# like test-all, test-rubyspec. This is because they take too much time,
+# enough for Travis to shut down the VM as being stalled.
+before_script:
+ - "autoconf"
+ - "./configure --with-gcc=$CC"
+ - "make -sj encs"
+ - "make -sj exts"
+script: "make test"
+
+# Branch matrix. Not all branches are Travis-ready so we limit branches here.
+branches:
+ only:
+ - trunk
+ - ruby_1_9_3
+
+# We want to be notified when something happens.
+notifications:
+ irc:
+ channels:
+ - "irc.freenode.org#ruby-core"
+ - "irc.freenode.org#ruby-ja"
+ on_success: change # [always|never|change] # default: always
+ on_failure: change # [always|never|change] # default: always
+ template:
+ - "%{message} by @%{author}: See %{build_url}"
+
+# Local Variables:
+# mode: YAML
+# coding: utf-8-unix
+# indent-tabs-mode: nil
+# tab-width: 4
+# fill-column: 79
+# default-justification: full
+# End:
diff --git a/BSDL b/BSDL
new file mode 100644
index 0000000000..82725534fa
--- /dev/null
+++ b/BSDL
@@ -0,0 +1,22 @@
+Copyright (C) 1993-2010 Yukihiro Matsumoto. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+1. Redistributions of source code must retain the above copyright
+notice, this list of conditions and the following disclaimer.
+2. Redistributions in binary form must reproduce the above copyright
+notice, this list of conditions and the following disclaimer in the
+documentation and/or other materials provided with the distribution.
+
+THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGE.
diff --git a/COPYING b/COPYING
index eeb586b392..a1f19ff99d 100644
--- a/COPYING
+++ b/COPYING
@@ -1,340 +1,56 @@
- GNU GENERAL PUBLIC LICENSE
- Version 2, June 1991
+Ruby is copyrighted free software by Yukihiro Matsumoto <matz@netlab.jp>.
+You can redistribute it and/or modify it under either the terms of the
+2-clause BSDL (see the file BSDL), or the conditions below:
- Copyright (C) 1989, 1991 Free Software Foundation, Inc.
- 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- Everyone is permitted to copy and distribute verbatim copies
- of this license document, but changing it is not allowed.
+ 1. You may make and give away verbatim copies of the source form of the
+ software without restriction, provided that you duplicate all of the
+ original copyright notices and associated disclaimers.
- Preamble
+ 2. You may modify your copy of the software in any way, provided that
+ you do at least ONE of the following:
- The licenses for most software are designed to take away your
-freedom to share and change it. By contrast, the GNU General Public
-License is intended to guarantee your freedom to share and change free
-software--to make sure the software is free for all its users. This
-General Public License applies to most of the Free Software
-Foundation's software and to any other program whose authors commit to
-using it. (Some other Free Software Foundation software is covered by
-the GNU Library General Public License instead.) You can apply it to
-your programs, too.
+ a) place your modifications in the Public Domain or otherwise
+ make them Freely Available, such as by posting said
+ modifications to Usenet or an equivalent medium, or by allowing
+ the author to include your modifications in the software.
- When we speak of free software, we are referring to freedom, not
-price. Our General Public Licenses are designed to make sure that you
-have the freedom to distribute copies of free software (and charge for
-this service if you wish), that you receive source code or can get it
-if you want it, that you can change the software or use pieces of it
-in new free programs; and that you know you can do these things.
+ b) use the modified software only within your corporation or
+ organization.
- To protect your rights, we need to make restrictions that forbid
-anyone to deny you these rights or to ask you to surrender the rights.
-These restrictions translate to certain responsibilities for you if you
-distribute copies of the software, or if you modify it.
+ c) give non-standard binaries non-standard names, with
+ instructions on where to get the original software distribution.
- For example, if you distribute copies of such a program, whether
-gratis or for a fee, you must give the recipients all the rights that
-you have. You must make sure that they, too, receive or can get the
-source code. And you must show them these terms so they know their
-rights.
+ d) make other distribution arrangements with the author.
- We protect your rights with two steps: (1) copyright the software, and
-(2) offer you this license which gives you legal permission to copy,
-distribute and/or modify the software.
+ 3. You may distribute the software in object code or binary form,
+ provided that you do at least ONE of the following:
- Also, for each author's protection and ours, we want to make certain
-that everyone understands that there is no warranty for this free
-software. If the software is modified by someone else and passed on, we
-want its recipients to know that what they have is not the original, so
-that any problems introduced by others will not reflect on the original
-authors' reputations.
+ a) distribute the binaries and library files of the software,
+ together with instructions (in the manual page or equivalent)
+ on where to get the original distribution.
- Finally, any free program is threatened constantly by software
-patents. We wish to avoid the danger that redistributors of a free
-program will individually obtain patent licenses, in effect making the
-program proprietary. To prevent this, we have made it clear that any
-patent must be licensed for everyone's free use or not licensed at all.
+ b) accompany the distribution with the machine-readable source of
+ the software.
- The precise terms and conditions for copying, distribution and
-modification follow.
-
- GNU GENERAL PUBLIC LICENSE
- TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+ c) give non-standard binaries non-standard names, with
+ instructions on where to get the original software distribution.
- 0. This License applies to any program or other work which contains
-a notice placed by the copyright holder saying it may be distributed
-under the terms of this General Public License. The "Program", below,
-refers to any such program or work, and a "work based on the Program"
-means either the Program or any derivative work under copyright law:
-that is to say, a work containing the Program or a portion of it,
-either verbatim or with modifications and/or translated into another
-language. (Hereinafter, translation is included without limitation in
-the term "modification".) Each licensee is addressed as "you".
+ d) make other distribution arrangements with the author.
-Activities other than copying, distribution and modification are not
-covered by this License; they are outside its scope. The act of
-running the Program is not restricted, and the output from the Program
-is covered only if its contents constitute a work based on the
-Program (independent of having been made by running the Program).
-Whether that is true depends on what the Program does.
+ 4. You may modify and include the part of the software into any other
+ software (possibly commercial). But some files in the distribution
+ are not written by the author, so that they are not under these terms.
- 1. You may copy and distribute verbatim copies of the Program's
-source code as you receive it, in any medium, provided that you
-conspicuously and appropriately publish on each copy an appropriate
-copyright notice and disclaimer of warranty; keep intact all the
-notices that refer to this License and to the absence of any warranty;
-and give any other recipients of the Program a copy of this License
-along with the Program.
+ For the list of those files and their copying conditions, see the
+ file LEGAL.
-You may charge a fee for the physical act of transferring a copy, and
-you may at your option offer warranty protection in exchange for a fee.
+ 5. The scripts and library files supplied as input to or produced as
+ output from the software do not automatically fall under the
+ copyright of the software, but belong to whomever generated them,
+ and may be sold commercially, and may be aggregated with this
+ software.
- 2. You may modify your copy or copies of the Program or any portion
-of it, thus forming a work based on the Program, and copy and
-distribute such modifications or work under the terms of Section 1
-above, provided that you also meet all of these conditions:
-
- a) You must cause the modified files to carry prominent notices
- stating that you changed the files and the date of any change.
-
- b) You must cause any work that you distribute or publish, that in
- whole or in part contains or is derived from the Program or any
- part thereof, to be licensed as a whole at no charge to all third
- parties under the terms of this License.
-
- c) If the modified program normally reads commands interactively
- when run, you must cause it, when started running for such
- interactive use in the most ordinary way, to print or display an
- announcement including an appropriate copyright notice and a
- notice that there is no warranty (or else, saying that you provide
- a warranty) and that users may redistribute the program under
- these conditions, and telling the user how to view a copy of this
- License. (Exception: if the Program itself is interactive but
- does not normally print such an announcement, your work based on
- the Program is not required to print an announcement.)
-
-These requirements apply to the modified work as a whole. If
-identifiable sections of that work are not derived from the Program,
-and can be reasonably considered independent and separate works in
-themselves, then this License, and its terms, do not apply to those
-sections when you distribute them as separate works. But when you
-distribute the same sections as part of a whole which is a work based
-on the Program, the distribution of the whole must be on the terms of
-this License, whose permissions for other licensees extend to the
-entire whole, and thus to each and every part regardless of who wrote it.
-
-Thus, it is not the intent of this section to claim rights or contest
-your rights to work written entirely by you; rather, the intent is to
-exercise the right to control the distribution of derivative or
-collective works based on the Program.
-
-In addition, mere aggregation of another work not based on the Program
-with the Program (or with a work based on the Program) on a volume of
-a storage or distribution medium does not bring the other work under
-the scope of this License.
-
- 3. You may copy and distribute the Program (or a work based on it,
-under Section 2) in object code or executable form under the terms of
-Sections 1 and 2 above provided that you also do one of the following:
-
- a) Accompany it with the complete corresponding machine-readable
- source code, which must be distributed under the terms of Sections
- 1 and 2 above on a medium customarily used for software interchange; or,
-
- b) Accompany it with a written offer, valid for at least three
- years, to give any third party, for a charge no more than your
- cost of physically performing source distribution, a complete
- machine-readable copy of the corresponding source code, to be
- distributed under the terms of Sections 1 and 2 above on a medium
- customarily used for software interchange; or,
-
- c) Accompany it with the information you received as to the offer
- to distribute corresponding source code. (This alternative is
- allowed only for noncommercial distribution and only if you
- received the program in object code or executable form with such
- an offer, in accord with Subsection b above.)
-
-The source code for a work means the preferred form of the work for
-making modifications to it. For an executable work, complete source
-code means all the source code for all modules it contains, plus any
-associated interface definition files, plus the scripts used to
-control compilation and installation of the executable. However, as a
-special exception, the source code distributed need not include
-anything that is normally distributed (in either source or binary
-form) with the major components (compiler, kernel, and so on) of the
-operating system on which the executable runs, unless that component
-itself accompanies the executable.
-
-If distribution of executable or object code is made by offering
-access to copy from a designated place, then offering equivalent
-access to copy the source code from the same place counts as
-distribution of the source code, even though third parties are not
-compelled to copy the source along with the object code.
-
- 4. You may not copy, modify, sublicense, or distribute the Program
-except as expressly provided under this License. Any attempt
-otherwise to copy, modify, sublicense or distribute the Program is
-void, and will automatically terminate your rights under this License.
-However, parties who have received copies, or rights, from you under
-this License will not have their licenses terminated so long as such
-parties remain in full compliance.
-
- 5. You are not required to accept this License, since you have not
-signed it. However, nothing else grants you permission to modify or
-distribute the Program or its derivative works. These actions are
-prohibited by law if you do not accept this License. Therefore, by
-modifying or distributing the Program (or any work based on the
-Program), you indicate your acceptance of this License to do so, and
-all its terms and conditions for copying, distributing or modifying
-the Program or works based on it.
-
- 6. Each time you redistribute the Program (or any work based on the
-Program), the recipient automatically receives a license from the
-original licensor to copy, distribute or modify the Program subject to
-these terms and conditions. You may not impose any further
-restrictions on the recipients' exercise of the rights granted herein.
-You are not responsible for enforcing compliance by third parties to
-this License.
-
- 7. If, as a consequence of a court judgment or allegation of patent
-infringement or for any other reason (not limited to patent issues),
-conditions are imposed on you (whether by court order, agreement or
-otherwise) that contradict the conditions of this License, they do not
-excuse you from the conditions of this License. If you cannot
-distribute so as to satisfy simultaneously your obligations under this
-License and any other pertinent obligations, then as a consequence you
-may not distribute the Program at all. For example, if a patent
-license would not permit royalty-free redistribution of the Program by
-all those who receive copies directly or indirectly through you, then
-the only way you could satisfy both it and this License would be to
-refrain entirely from distribution of the Program.
-
-If any portion of this section is held invalid or unenforceable under
-any particular circumstance, the balance of the section is intended to
-apply and the section as a whole is intended to apply in other
-circumstances.
-
-It is not the purpose of this section to induce you to infringe any
-patents or other property right claims or to contest validity of any
-such claims; this section has the sole purpose of protecting the
-integrity of the free software distribution system, which is
-implemented by public license practices. Many people have made
-generous contributions to the wide range of software distributed
-through that system in reliance on consistent application of that
-system; it is up to the author/donor to decide if he or she is willing
-to distribute software through any other system and a licensee cannot
-impose that choice.
-
-This section is intended to make thoroughly clear what is believed to
-be a consequence of the rest of this License.
-
- 8. If the distribution and/or use of the Program is restricted in
-certain countries either by patents or by copyrighted interfaces, the
-original copyright holder who places the Program under this License
-may add an explicit geographical distribution limitation excluding
-those countries, so that distribution is permitted only in or among
-countries not thus excluded. In such case, this License incorporates
-the limitation as if written in the body of this License.
-
- 9. The Free Software Foundation may publish revised and/or new versions
-of the General Public License from time to time. Such new versions will
-be similar in spirit to the present version, but may differ in detail to
-address new problems or concerns.
-
-Each version is given a distinguishing version number. If the Program
-specifies a version number of this License which applies to it and "any
-later version", you have the option of following the terms and conditions
-either of that version or of any later version published by the Free
-Software Foundation. If the Program does not specify a version number of
-this License, you may choose any version ever published by the Free Software
-Foundation.
-
- 10. If you wish to incorporate parts of the Program into other free
-programs whose distribution conditions are different, write to the author
-to ask for permission. For software which is copyrighted by the Free
-Software Foundation, write to the Free Software Foundation; we sometimes
-make exceptions for this. Our decision will be guided by the two goals
-of preserving the free status of all derivatives of our free software and
-of promoting the sharing and reuse of software generally.
-
- NO WARRANTY
-
- 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
-FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
-OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
-PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
-OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
-MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
-TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
-PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
-REPAIR OR CORRECTION.
-
- 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
-WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
-REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
-INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
-OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
-TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
-YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
-PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
-POSSIBILITY OF SUCH DAMAGES.
-
- END OF TERMS AND CONDITIONS
-
- How to Apply These Terms to Your New Programs
-
- If you develop a new program, and you want it to be of the greatest
-possible use to the public, the best way to achieve this is to make it
-free software which everyone can redistribute and change under these terms.
-
- To do so, attach the following notices to the program. It is safest
-to attach them to the start of each source file to most effectively
-convey the exclusion of warranty; and each file should have at least
-the "copyright" line and a pointer to where the full notice is found.
-
- <one line to give the program's name and a brief idea of what it does.>
- Copyright (C) 19yy <name of author>
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-
-
-Also add information on how to contact you by electronic and paper mail.
-
-If the program is interactive, make it output a short notice like this
-when it starts in an interactive mode:
-
- Gnomovision version 69, Copyright (C) 19yy name of author
- Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
- This is free software, and you are welcome to redistribute it
- under certain conditions; type `show c' for details.
-
-The hypothetical commands `show w' and `show c' should show the appropriate
-parts of the General Public License. Of course, the commands you use may
-be called something other than `show w' and `show c'; they could even be
-mouse-clicks or menu items--whatever suits your program.
-
-You should also get your employer (if you work as a programmer) or your
-school, if any, to sign a "copyright disclaimer" for the program, if
-necessary. Here is a sample; alter the names:
-
- Yoyodyne, Inc., hereby disclaims all copyright interest in the program
- `Gnomovision' (which makes passes at compilers) written by James Hacker.
-
- <signature of Ty Coon>, 1 April 1989
- Ty Coon, President of Vice
-
-This General Public License does not permit incorporating your program into
-proprietary programs. If your program is a subroutine library, you may
-consider it more useful to permit linking proprietary applications with the
-library. If this is what you want to do, use the GNU Library General
-Public License instead of this License.
+ 6. THIS SOFTWARE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR
+ IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
+ WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ PURPOSE.
diff --git a/COPYING.ja b/COPYING.ja
new file mode 100644
index 0000000000..e50d01c8d1
--- /dev/null
+++ b/COPYING.ja
@@ -0,0 +1,51 @@
+本プログラムã¯ãƒ•リーソフトウェアã§ã™ï¼Ž2-clause BSDL
+ã¾ãŸã¯ä»¥ä¸‹ã«ç¤ºã™æ¡ä»¶ã§æœ¬ãƒ—ログラムをå†é…布ã§ãã¾ã™
+2-clause BSDLã«ã¤ã„ã¦ã¯BSDLファイルをå‚ç…§ã—ã¦ä¸‹ã•ã„.
+
+ 1. 複製ã¯åˆ¶é™ãªã自由ã§ã™ï¼Ž
+
+ 2. ä»¥ä¸‹ã®æ¡ä»¶ã®ã„ãšã‚Œã‹ã‚’満ãŸã™æ™‚ã«æœ¬ãƒ—ログラムã®ã‚½ãƒ¼ã‚¹ã‚’
+ 自由ã«å¤‰æ›´ã§ãã¾ã™ï¼Ž
+
+ (a) ãƒãƒƒãƒˆãƒ‹ãƒ¥ãƒ¼ã‚ºã«ãƒã‚¹ãƒˆã—ãŸã‚Šï¼Œä½œè€…ã«å¤‰æ›´ã‚’é€ä»˜ã™ã‚‹
+ ãªã©ã®æ–¹æ³•ã§ï¼Œå¤‰æ›´ã‚’公開ã™ã‚‹ï¼Ž
+
+ (b) 変更ã—ãŸæœ¬ãƒ—ãƒ­ã‚°ãƒ©ãƒ ã‚’è‡ªåˆ†ã®æ‰€å±žã™ã‚‹çµ„織内部ã ã‘ã§
+ 使ã†ï¼Ž
+
+ (c) 変更点を明示ã—ãŸã†ãˆï¼Œã‚½ãƒ•トウェアã®åå‰ã‚’変更ã™ã‚‹ï¼Ž
+ ãã®ã‚½ãƒ•トウェアをé…布ã™ã‚‹æ™‚ã«ã¯å¤‰æ›´å‰ã®æœ¬ãƒ—ログラ
+ ãƒ ã‚‚åŒæ™‚ã«é…布ã™ã‚‹ï¼Žã¾ãŸã¯å¤‰æ›´å‰ã®æœ¬ãƒ—ログラムã®ã‚½ãƒ¼
+ スã®å…¥æ‰‹æ³•を明示ã™ã‚‹ï¼Ž
+
+ (d) ãã®ä»–ã®å¤‰æ›´æ¡ä»¶ã‚’作者ã¨åˆæ„ã™ã‚‹ï¼Ž
+
+ 3. ä»¥ä¸‹ã®æ¡ä»¶ã®ã„ãšã‚Œã‹ã‚’満ãŸã™æ™‚ã«æœ¬ãƒ—ログラムをコンパイ
+ ルã—ãŸã‚ªãƒ–ジェクトコードや実行形å¼ã§ã‚‚é…布ã§ãã¾ã™ï¼Ž
+
+ (a) ãƒã‚¤ãƒŠãƒªã‚’å—ã‘å–ã£ãŸäººãŒã‚½ãƒ¼ã‚¹ã‚’入手ã§ãるよã†ã«ï¼Œ
+ ソースã®å…¥æ‰‹æ³•を明示ã™ã‚‹ï¼Ž
+
+ (b) 機械å¯èª­ãªã‚½ãƒ¼ã‚¹ã‚³ãƒ¼ãƒ‰ã‚’添付ã™ã‚‹ï¼Ž
+
+ (c) 変更を行ã£ãŸãƒã‚¤ãƒŠãƒªã¯åå‰ã‚’変更ã—ãŸã†ãˆï¼Œã‚ªãƒªã‚¸ãƒŠ
+ ルã®ã‚½ãƒ¼ã‚¹ã‚³ãƒ¼ãƒ‰ã®å…¥æ‰‹æ³•を明示ã™ã‚‹ï¼Ž
+
+ (d) ãã®ä»–ã®é…布æ¡ä»¶ã‚’作者ã¨åˆæ„ã™ã‚‹ï¼Ž
+
+ 4. ä»–ã®ãƒ—ログラムã¸ã®å¼•用ã¯ã„ã‹ãªã‚‹ç›®çš„ã§ã‚れ自由ã§ã™ï¼ŽãŸ
+ ã ã—,本プログラムã«å«ã¾ã‚Œã‚‹ä»–ã®ä½œè€…ã«ã‚ˆã‚‹ã‚³ãƒ¼ãƒ‰ã¯ï¼Œã
+ れãžã‚Œã®ä½œè€…ã®æ„å‘ã«ã‚ˆã‚‹åˆ¶é™ãŒåŠ ãˆã‚‰ã‚Œã‚‹å ´åˆãŒã‚りã¾ã™ï¼Ž
+
+ ãれらファイルã®ä¸€è¦§ã¨ãれãžã‚Œã®é…布æ¡ä»¶ãªã©ã«ä»˜ã„ã¦ã¯
+ LEGALファイルをå‚ç…§ã—ã¦ãã ã•ã„.
+
+ 5. 本プログラムã¸ã®å…¥åŠ›ã¨ãªã‚‹ã‚¹ã‚¯ãƒªãƒ—トãŠã‚ˆã³ï¼Œæœ¬ãƒ—ログラ
+ ムã‹ã‚‰ã®å‡ºåŠ›ã®æ¨©åˆ©ã¯æœ¬ãƒ—ログラムã®ä½œè€…ã§ã¯ãªã,ãれãž
+ れã®å…¥å‡ºåŠ›ã‚’ç”Ÿæˆã—ãŸäººã«å±žã—ã¾ã™ï¼Žã¾ãŸï¼Œæœ¬ãƒ—ログラムã«
+ 組ã¿è¾¼ã¾ã‚Œã‚‹ãŸã‚ã®æ‹¡å¼µãƒ©ã‚¤ãƒ–ラリã«ã¤ã„ã¦ã‚‚åŒæ§˜ã§ã™ï¼Ž
+
+ 6. 本プログラムã¯ç„¡ä¿è¨¼ã§ã™ï¼Žä½œè€…ã¯æœ¬ãƒ—ログラムをサãƒãƒ¼ãƒˆ
+ ã™ã‚‹æ„å¿—ã¯ã‚りã¾ã™ãŒï¼Œãƒ—ログラム自身ã®ãƒã‚°ã‚ã‚‹ã„ã¯æœ¬ãƒ—
+ ログラムã®å®Ÿè¡Œãªã©ã‹ã‚‰ç™ºç”Ÿã™ã‚‹ã„ã‹ãªã‚‹æå®³ã«å¯¾ã—ã¦ã‚‚責
+ 任をæŒã¡ã¾ã›ã‚“.
diff --git a/ChangeLog b/ChangeLog
index a540fc71a0..5c6015a3cf 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,9846 +1,16598 @@
-Tue Mar 20 23:09:33 2001 WATANABE Hirofumi <eban@ruby-lang.org>
+Fri Nov 2 03:23:37 2012 NARUSE, Yui <naruse@ruby-lang.org>
- * win32/win32.c (win32_stat): UNC support.
+ * lib/mkmf.rb: fix for if config["libdir"] is nil.
- * dir.c (extract_path): fix "./*" problem.
+Thu Nov 1 23:06:01 2012 NARUSE, Yui <naruse@ruby-lang.org>
-Mon Mar 19 16:52:23 2001 K.Kosako <kosako@sofnec.co.jp>
+ * tool/make-snapshot: fix wrong regexp for releasing preview.
+ patched by mame.
- * eval.c (ev_const_defined): need not to check if cbase->nd_class
- is rb_cObject.
+Thu Nov 1 22:27:11 2012 Koichi Sasada <ko1@atdot.net>
- * eval.c (ev_const_get): ditto.
+ * NEWS: add a news about objspace,
+ ObjectSpace.reachable_objects_from.
-Mon Mar 19 16:27:32 2001 Yukihiro Matsumoto <matz@ruby-lang.org>
+Thu Nov 1 21:57:00 2012 Kenta Murata <mrkn@mrkn.jp>
- * eval.c (THREAD_ALLOC): flags should be initialized.
+ * ext/bigdecimal/bigdecimal.c (BigDecimal_new),
+ test/bigdecimal/test_bigdecimal.rb:
+ Fix exception message of BigDecimal constructor with a Float.
- * signal.c (rb_f_kill): should use FIX2INT, not FIX2UINT.
+Thu Nov 1 21:52:20 2012 Kenta Murata <mrkn@mrkn.jp>
-Sun Mar 18 08:58:18 2001 Wakou Aoyama <wakou@fsinet.or.jp>
+ * ext/bigdecimal/bigdecimal.c (BigDecimal_add),
+ test/bigdecimal/test_bigdecimal.rb:
+ need to specify precision for converting Rational and Float.
+ [ruby-core:48045] [Bug #7176]
- * lib/net/cgi.rb: // === '' --> //.match('')
+Thu Nov 1 21:42:20 2012 Yusuke Endoh <mame@tsg.ne.jp>
- * lib/net/cgi.rb: cgi#header(): improvement for mod_ruby.
+ * test/ruby/test_process.rb: Revert r37404. My ubuntu box has
+ actually the directory named "/nonexistent"... Sorry.
- * lib/net/cgi.rb: cgi#rfc1123date(): improvement.
- thanks to TADA Tadashi <sho@spc.gr.jp>.
+Thu Nov 1 21:28:28 2012 Yusuke Endoh <mame@tsg.ne.jp>
- * lib/net/cgi.rb: cgi#rfc1123date(): document bug fix.
- thanks to Kazuhiro NISHIYAMA <zn@mbf.nifty.com>.
+ * test/ruby/test_process.rb: Process.exec raised EACCES on Linux
+ 3.5.0-17-generic. This is a temporal fix to rescue that exception.
+ Needs kosaki's review.
- * lib/net/cgi.rb: cgi#header(): bug fix.
- thanks to IWATSUKI Hiroyuki <don@na.rim.or.jp>.
+Thu Nov 1 21:19:56 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Fri Mar 16 17:21:25 2001 Akinori MUSHA <knu@iDaemons.org>
+ * iseq.c (set_relation): parent_iseq need to be set regardless iseq
+ type. fix r37397.
- * configure.in: Set SOLIBS properly for all ELF and
- FreeBSD/NetBSD/OpenBSD a.out platforms so that the shlib
- dependencies are recorded in the libruby shlib.
+Thu Nov 1 19:47:23 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Wed Mar 14 16:41:45 2001 Yukihiro Matsumoto <matz@ruby-lang.org>
+ * thread_pthread.c (RUBY_STACK_MIN): may not a compile time constant.
+ fix r37079. [ruby-dev:46322] [Bug #7247]
- * eval.c (rb_thread_schedule): raise FATAL just once to
- THREAD_TO_KILL.
+Thu Nov 1 16:44:36 2012 Shugo Maeda <shugo@ruby-lang.org>
-Wed Mar 14 10:41:34 2001 Yukihiro Matsumoto <matz@ruby-lang.org>
+ * NEWS: add note for Module#refine, Module#refinements,
+ Module#using, and Kernel#using.
- * eval.c (rb_yield_0): 0 (= Qfalse) is a valid value, so that
- default self should be checked by klass == 0.
+Thu Nov 1 14:41:47 2012 Shugo Maeda <shugo@ruby-lang.org>
- * bignum.c (rb_cstr2inum): should disallow '++1', '+-1', etc.
+ * eval.c (rb_using_module): using should be used indirectly.
+ [ruby-dev:46326] [Feature #7251]
-Tue Mar 13 17:51:09 2001 Yukihiro Matsumoto <matz@ruby-lang.org>
+Wed Oct 31 18:17:38 2012 Narihiro Nakamura <authornari@gmail.com>
- * eval.c (ev_const_defined): add new parameter self for special
- const fallback.
+ * gc.c (gc_profile_record): don't define unused variables when
+ GC_PROFILE_MORE_DETAIL is 0.
- * eval.c (ev_const_get): ditto.
+Wed Oct 31 18:10:53 2012 Narihiro Nakamura <authornari@gmail.com>
-Tue Mar 13 16:39:45 2001 WATANABE Hirofumi <eban@ruby-lang.org>
+ * gc.c (gc_prof_mark_timer_stop): count is not initialized.
- * dir.c (rb_glob_helper): fix drive letter handling on DOSISH.
+Wed Oct 31 09:28:24 2012 Eric Hodel <drbrain@segment7.net>
-Tue Mar 13 15:01:12 2001 Minero Aoki <aamine@dp.u-netsurf.ne.jp>
+ * thread.c (rb_thread_call_without_gvl2): Note that ubf() may or may
+ not be called with the GVL. Hinted that rb_thread_call_with_gvl()
+ can be used to access ruby functionality.
- * lib/net/http.rb: add HTTPRequest#basic_auth.
+Wed Oct 31 09:06:54 2012 Eric Hodel <drbrain@segment7.net>
- * lib/net/smtp.rb: raise if only account or password is given.
+ * thread.c (rb_thread_call_without_gvl2): Update documentation to
+ natural English.
+ * thread.c (rb_thread_call_with_gvl): ditto.
- * lib/net/protocol.rb: WriteAdapter#<< returns self.
+Wed Oct 31 02:53:07 2012 Aaron Patterson <aaron@tenderlovemaking.com>
-Tue Mar 13 14:41:16 2001 Yukihiro Matsumoto <matz@ruby-lang.org>
+ * ext/dl/lib/dl/struct.rb: fix strange require order. [ruby-dev:45702]
- * io.c (argf_seek): wrong calling sequence of rb_io_seek().
+ * ext/dl/lib/dl/value.rb: ditto
-Mon Mar 12 18:59:38 2001 WATANABE Hirofumi <eban@ruby-lang.org>
+ * test/dl/test_c_struct_entry.rb: remove strange require order from
+ tests.
- * lib/mkmf.rb (create_makefile): save/restore $libs and $LIBPATH.
+ * test/dl/test_c_union_entity.rb: ditto
-Sun Mar 11 00:55:31 2001 WATANABE Hirofumi <eban@ruby-lang.org>
+Tue Oct 30 23:59:32 2012 Shugo Maeda <shugo@ruby-lang.org>
- * lib/mkmf.rb (install_rb): fix handling of destination path.
+ * eval.c (rb_mod_refine): fix the error message when no block is
+ given. [ruby-dev:46319] [Bug #7244]
-Sat Mar 10 02:34:18 2001 WATANABE Hirofumi <eban@ruby-lang.org>
+ * test/ruby/test_refinement.rb: related test.
- * math.c (math_log, math_log10): use nan() instead of 0.0/0.0 on Cygwin.
+Tue Oct 30 19:27:48 2012 NAKAMURA Usaku <usa@ruby-lang.org>
-Thu Mar 8 17:43:59 2001 Minero Aoki <aamine@dp.u-netsurf.ne.jp>
+ * process.c (redirect_dup2): set standard handles when new fd is stdio,
+ because if there is no allocated console at the moment Windows does
+ not automatically associate it for child process's standard handle.
+ this is adhoc workaround.
+ reported by Martin Thiede at [ruby-core:48542] [Bug #7239].
- * lib/net/protocol.rb: one write(2) per one line.
+ * io.c (rb_cloexec_dup2): ditto.
-Wed Mar 7 14:26:11 2001 WATANABE Hirofumi <eban@ruby-lang.org>
+Tue Oct 30 03:08:53 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * math.c (math_log, math_log10): should return NaN if x < 0.0
- on Cygwin.
+ * lib/rbconfig/obsolete.rb (Config): re-introduce warnings for a
+ lame-duck. [ruby-core:46836] [Bug #6809]
-Thu Mar 7 10:31:26 2001 Nobuyoshi Nakada <nobu.nakada@nifty.ne.jp>
+Tue Oct 30 02:20:10 2012 Aaron Patterson <aaron@tenderlovemaking.com>
- * parse.y (stmt): while/until modifier must work for empty body.
+ * thread.c: added Thread#thread_variable_(get|set),
+ Thread#thread_variable?, and Thread#thread_variables for operating
+ on variables that are local to threads. [ruby-core:47790]
-Tue Mar 6 22:53:58 2001 Kazuhiro Yoshida <moriq.kazuhiro@nifty.ne.jp>
+ * vm.c: ditto
- * ruby.c (ruby_set_argv): clear ARGV contents before adding args.
+ * test/ruby/test_thread.rb: tests for thread variables.
-Tue Mar 6 10:50:29 2001 Yukihiro Matsumoto <matz@ruby-lang.org>
+Mon Oct 29 18:22:58 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * parse.y (primary): rescue and ensure clauses should be allowed
- to appear in singleton method body.
+ * ext/stringio/stringio.c (strio_close): close separately per each
+ instances, as well as IO.
-Mon Mar 5 17:25:13 2001 Yukihiro Matsumoto <matz@ruby-lang.org>
+Mon Oct 29 10:22:00 2012 Aaron Patterson <aaron@tenderlovemaking.com>
- * eval.c (proc_eq): compare Procs using blocktag equality.
+ * ext/psych/lib/psych/handlers/recorder.rb: added a class for
+ recording YAML parse and emit events.
- * eval.c (proc_to_s): stringify according to block tag address.
+ * ext/psych/lib/psych/handler.rb: adding a list of events so that
+ handler classes can more easily be meta-programmed.
-Mon Mar 5 17:19:56 2001 WATANABE Hirofumi <eban@ruby-lang.org>
+ * test/psych/handlers/test_recorder.rb: tests for the change.
- * win32/win32.c (gettimeofday): use GetLocalTime() instead of ftime()
- for high-resolution timing.
+Mon Oct 29 05:48:52 2012 Marc-Andre Lafortune <ruby-core@marc-andre.ca>
-Sun Mar 4 20:45:20 2001 Akinori MUSHA <knu@iDaemons.org>
+ * lib/ostruct.rb: Add [] and []=, base on a patch by Thomas Sawyer.
+ Also accept {Open}Struct as argument to new.
+ Add #eql?, #hash & #each_pair
+ Protect new_ostruct_member
- * ext/extmk.rb.in, lib/mkmf.rb: add C++ rules in addition to C
- rules.
+Mon Oct 29 03:20:58 2012 Marc-Andre Lafortune <ruby-core@marc-andre.ca>
-Sun Mar 4 17:01:09 2001 WATANABE Hirofumi <eban@ruby-lang.org>
+ * lib/matrix.rb: Fix determinant_e [ruby-dev:46305] [Bug #7228]
- * string.c (trnext): support backslash escape in String#tr.
+Sun Oct 28 23:52:25 2012 Kouhei Sutou <kou@cozmixng.org>
-Wed Feb 28 11:02:41 2001 Yukihiro Matsumoto <matz@ruby-lang.org>
+ * test/rexml/test_document.rb: Add tests for parsing XML encoded
+ by UTF-8 with BOM.
- * string.c (rb_str_delete_bang): delete! should take at least 1
- argument.
+Sun Oct 28 23:47:09 2012 Kouhei Sutou <kou@cozmixng.org>
-Tue Feb 27 16:38:15 2001 Yukihiro Matsumoto <matz@ruby-lang.org>
+ * lib/rexml/source.rb: Move encoding detection code to base class.
+ * lib/rexml/encoding.rb: Remove needless encoding detection code.
- * eval.c (ev_const_get): retrieve Object's caonstat if no current
- class is available (e.g. defining singleton class for Fixnums).
+Sun Oct 28 21:40:13 2012 Kouhei Sutou <kou@cozmixng.org>
- * eval.c (ev_const_defined): check Object's constant if no current
- class is available (e.g. defining singleton class for Fixnums).
+ * lib/rexml/parsers/baseparser.rb: Fix a bug that UTF-8 is used
+ for UTF-16XX encoded XML that doesn't have encoding="UTF-16" in
+ XML declaration.
+ * test/rexml/test_document.rb: Add tests for the above change.
- * eval.c (proc_call): ignore block to `call' always, despite of
- being orphan or not.
+Sun Oct 28 21:37:34 2012 Kouhei Sutou <kou@cozmixng.org>
-Wed Feb 27 10:16:32 2001 Nobuyoshi Nakada <nobu.nakada@nifty.ne.jp>
+ * test/rexml/test_document.rb: Group tests that they parse
+ UTF-16XX encoded XML that has encoding="UTF-16" in XML declaration.
- * eval.c (rb_yield_0): should check based on rb_block_given_p()
- and rb_f_block_given_p().
+Sun Oct 28 21:25:11 2012 Kouhei Sutou <kou@cozmixng.org>
-Mon Feb 26 16:20:27 2001 Yukihiro Matsumoto <matz@ruby-lang.org>
+ * lib/rexml/source.rb (REXML::IOSource#initialize): Reduce
+ @line_break initialize code. It should be done only in #encoding=.
+ * lib/rexml/parsers/baseparser.rb: Don't set UTF-16 encoding to
+ source by encoding="UTF-16" in XML declaration because UTF-16XX
+ source encoding should be set in Source#initialize or
+ IOSource#initialize. They should handle BOM. Parser should not
+ consider about it.
- * ruby.c (proc_options): call ruby_show_version() just once.
+Sun Oct 28 21:18:37 2012 Kouhei Sutou <kou@cozmixng.org>
-Mon Feb 26 00:04:52 2001 Yukihiro Matsumoto <matz@ruby-lang.org>
+ * test/rexml/test_document.rb: Add tests for parsing XML encoded
+ by UTF-16 with BOM.
- * eval.c (proc_call): should not modify ruby_block->frame.iter
- based on ruby_frame->iter altered by PUSH_ITER().
+Sun Oct 28 19:12:11 2012 Tadayoshi Funaba <tadf@dotrb.org>
-Mon Feb 26 05:27:52 2001 Wakou Aoyama <wakou@fsinet.or.jp>
+ * ext/date/date_parse.c (iso8601_{ext,bas}_time): should not match
+ empty string.
- * lib/net/telnet.rb: #telnetmode(), #binmode(): bug fix.
- thanks to nobu.nakada@nifty.ne.jp.
+Sun Oct 28 18:51:33 2012 Tadayoshi Funaba <tadf@dotrb.org>
-Mon Feb 26 04:55:50 2001 Wakou Aoyama <wakou@fsinet.or.jp>
+ * ext/date/date_parse.c (date__parse): revised the tight parser.
- * lib/cgi.rb: CGI#form(): bug fix.
- thanks to MoonWolf <moonwolf@moonwolf.com>.
+Sun Oct 28 15:41:50 2012 Kouhei Sutou <kou@cozmixng.org>
- * lib/cgi.rb: CGI#rfc1123_date(): improvement.
- thanks to Tomoyasu Akita <genzo-@dm4lab.to>.
+ * lib/rexml/document.rb (REXML::Document#write): Add :encoding option
+ to support custom XML encoding.
+ [Feature #4872] (work in progress)
+ * test/rexml/test_document.rb: Add tests for the above change.
- * lib/cgi.rb: CGI#header(): improvement for mod_ruby.
- thanks to Shugo Maeda <shugo@ruby-lang.org>.
+Sun Oct 28 15:00:19 2012 Kouhei Sutou <kou@cozmixng.org>
-Sun Feb 25 02:45:30 2001 WATANABE Hirofumi <eban@ruby-lang.org>
+ * lib/rexml/document.rb (REXML::Document#write): Remove needless
+ indent in document.
- * file.c (rb_file_s_rename): avoid Cygwin's bug.
+Sun Oct 28 14:59:14 2012 Kouhei Sutou <kou@cozmixng.org>
-Sat Feb 24 23:32:55 2001 Yukihiro Matsumoto <matz@ruby-lang.org>
+ * lib/rexml/document.rb (REXML::Document#write): Accept options
+ Hash as argument.
+ * test/rexml/test_document.rb: Add tests for the above change.
- * eval.c (rb_thread_fd_close): should save current context before
- raising exception.
+Sun Oct 28 14:09:44 2012 Kouhei Sutou <kou@cozmixng.org>
-Sat Feb 24 22:14:00 2001 WATANABE Hirofumi <eban@ruby-lang.org>
+ * lib/rexml/document.rb (REXML::Document#write): Fix wrong usage
+ in document.
- * win32/win32.c (myrename): fix error handling.
+Sun Oct 28 14:03:48 2012 Kouhei Sutou <kou@cozmixng.org>
-Sat Feb 24 15:43:31 2001 Minero Aoki <aamine@dp.u-netsurf.ne.jp>
+ * lib/rexml/document.rb (REXML::Document#write): Fix wrong method
+ names in document.
- * lib/net/protocol.rb: use net 1.2 for also ruby 1.6 branch.
+Sun Oct 28 10:12:15 2012 Aaron Patterson <aaron@tenderlovemaking.com>
- * lib/net/smtp.rb: ditto.
+ * ext/psych/lib/psych/visitors/yaml_tree.rb: `tree` should return the
+ same thing on every call.
- * lib/net/pop.rb: ditto.
+ * test/psych/visitors/test_yaml_tree.rb: related test.
- * lib/net/http.rb: ditto.
+Sun Oct 28 10:05:03 2012 Aaron Patterson <aaron@tenderlovemaking.com>
-Fri Feb 23 16:36:09 2001 Minero Aoki <aamine@dp.u-netsurf.ne.jp>
+ * ext/psych/lib/psych/visitors/yaml_tree.rb: YAML Tree object should
+ be able to take an emitter object as it's output.
- * lib/net/http.rb: always close connection if body is not exist.
+ * test/psych/visitors/test_yaml_tree.rb: related test.
-Fri Feb 23 13:27:05 2001 Minero Aoki <aamine@dp.u-netsurf.ne.jp>
+Sun Oct 28 08:23:16 2012 Koichi Sasada <ko1@atdot.net>
- * lib/net/http.rb: keep-alive detection was incomplete.
+ * bignum.c (bignew_1): Bignum instances are frozen.
+ Feature #3222
-Fri Feb 23 08:24:53 2001 Minero Aoki <aamine@dp.u-netsurf.ne.jp>
+ * include/ruby/ruby.h: Fixnum instances are also frozen.
- * lib/net/protocol.rb: clear read buffer after reopen.
+ * class.c (singleton_class_of): check Bignum before
+ singleton checking.
- * lib/net/http.rb: update RD document.
+ * test/ruby/test_bignum.rb: add a test.
-Tue Feb 20 16:37:58 2001 Yukihiro Matsumoto <matz@ruby-lang.org>
+ * test/ruby/test_fixnum.rb: ditto.
- * bignum.c (rb_big2long): should not raise RangeError for Bignum
- LONG_MIN value.
+ * test/ruby/marshaltestlib.rb, test/ruby/test_eval.rb,
+ test/ruby/test_object.rb: catch up above changes.
-Mon Feb 19 17:46:37 2001 Yukihiro Matsumoto <matz@ruby-lang.org>
+Sun Oct 28 04:38:06 2012 Koichi Sasada <ko1@atdot.net>
- * string.c (rb_str_substr): "a"[1,2] should return ""; need
- rubicon upgrade.
+ * vm.c (vm_define_method): remove type and frozen checking.
+ Checking is done in `rb_singleton_class()'.
-Mon Feb 19 01:55:43 2001 Yukihiro Matsumoto <matz@ruby-lang.org>
+Sun Oct 28 00:49:06 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * eval.c (secure_visibility): visibility check for untainted modules.
+ * parse.y (assign_in_cond): warn for static content object assignments
+ in conditional statements. [ruby-dev:43083] [Feature #4299]
-Mon Feb 19 00:29:29 2001 Nobuyoshi Nakada <nobu.nakada@nifty.ne.jp>
+Sat Oct 27 23:33:41 2012 Benoit Daloze <eregontp@gmail.com>
- * signal.c (sigpipe): sighandler which does nothing.
+ * gc.c (gc_profile_result, gc_profile_report): use internal structures
+ to avoid allocations and progressively print the output for #report.
+ [ruby-core:47163] [Bug #6865]
- * signal.c (trap): set sigpipe function for SIGPIPE.
+Sat Oct 27 11:01:10 2012 Koichi Sasada <ko1@atdot.net>
- * signal.c (Init_signal): default SIGPIPE handler should be
- sigpipe function.
+ * numeric.c (rb_float_new_in_heap), include/ruby/ruby.h:
+ make all Float objects frozen.
+ [ruby-dev:46081] [ruby-trunk - Feature #6936]
+ Most part of patch by NARUSE, Yui <naruse@ruby-lang.org>.
-Sun Feb 18 15:42:38 2001 WATANABE Hirofumi <eban@ruby-lang.org>
+ * class.c (singleton_class_of): raise TypeError when
+ trying to define a singleton method on Float objects.
- * ext/curses/extconf.rb: add dir_config.
+ * vm.c (vm_define_method): ditto.
- * missing/flock.c: use fcntl(2) instead of lockf(2).
+ * test/ruby/marshaltestlib.rb: catch up above changes.
-Sun Feb 18 13:02:03 2001 Yasushi Shoji <yashi@yashi.com>
+ * test/ruby/test_class.rb: ditto.
- * array.c (rb_ary_subseq): wrong boundary check.
+ * test/test_pp.rb: ditto.
-Fri Feb 16 01:44:56 2001 Yukihiro Matsumoto <matz@ruby-lang.org>
+Sat Oct 27 10:50:53 2012 Aaron Patterson <aaron@tenderlovemaking.com>
- * io.c (set_outfile): f should be the FILE* from the assigning value.
+ * object.c (rb_mod_const_get): make sure the constant name is
+ converted to a string before searching. [ruby-core:48405]
-Thu Feb 15 11:33:49 2001 Shugo Maeda <shugo@ruby-lang.org>
+Sat Oct 27 10:12:13 2012 URABE Shyouhei <shyouhei@ruby-lang.org>
- * lib/cgi/session.rb (close): fixed reversed condition.
+ * iseq.c (rb_iseq_compile_with_option): Instead of testing
+ respond_to, just check if the argument is actually a file,
+ because by calling user-defined gets something weired can
+ happen. Patch by Glass_saga. [ruby-dev:40202] [Bug #2861]
-Wed Feb 14 17:28:24 2001 Shugo Maeda <shugo@ruby-lang.org>
+ * parse.y (ripper_initialize): ditto.
- * lib/net/imap.rb: supports unknown resp_text_code.
+Sat Oct 27 10:07:57 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Wed Feb 14 00:44:17 2001 Yukihiro Matsumoto <matz@ruby-lang.org>
+ * parse.y (enum lex_state_e): [EXPERIMENTAL] lex_state as bit field /
+ IS_lex_state() macro. based on the patch by Dave B in
+ [ruby-core:23503]. [Feature #1493]
- * dir.c (dir_s_glob): call rb_yield directly (via push_pattern) if
- block is given to the method.
+Sat Oct 27 10:05:03 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * dir.c (push_pattern): do not call rb_ary_push; yield directly.
+ * include/ruby/win32.h (fstat): use _fstati64() instead of fstati64()
+ on mingw32.
-Tue Feb 13 23:05:38 2001 WATANABE Hirofumi <eban@ruby-lang.org>
+Sat Oct 27 06:28:33 2012 Aaron Patterson <aaron@tenderlovemaking.com>
- * dir.c (lstat): should use rb_sys_stat if lstat(2) is not
- available.
+ * object.c (rb_mod_const_get): const_get accepts qualified constant
+ strings. e.g. Object.const_get("Foo::Bar::Baz") [ruby-core:41404]
-Tue Feb 13 17:00:18 2001 Minero Aoki <aamine@dp.u-netsurf.ne.jp>
+ * test/ruby/test_module.rb: tests for new behavior
- * lib/net/http.rb: supports HTTP 1.0 server.
+Fri Oct 26 13:24:20 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Tue Feb 13 01:13:43 2001 Yukihiro Matsumoto <matz@ruby-lang.org>
+ * parse.y (literal_concat_gen): merge fixed strings across
+ concatenated literals, after an interpolation.
- * parse.y (primary): preserve and clear in_single and in_def using
- stack to prevent nested method errors in singleton class bodies.
+Thu Oct 25 17:48:54 2012 NAKAMURA Usaku <usa@ruby-lang.org>
-Sun Feb 11 16:00:30 2001 WATANABE Hirofumi <eban@ruby-lang.org>
+ * win32/win32.c (has_redirection): should use shell (cmd.exe) when
+ the commandline contains '&'.
+ reported by Roger Pack at [ruby-core:47912] [Bug #7143], and
+ patched by Heesob Park at [ruby-core:47931].
- * eval.c (stack_length): use __builtin_frame_address() only if
- GCC and i386 CPU.
+Thu Oct 25 15:00:08 2012 Koichi Sasada <ko1@atdot.net>
- * gc.c (rb_gc, Init_stack): ditto.
+ * include/ruby/ruby.h, class.c: remove (revert)
+ `rb_add_method_cfunc_frameless()' API.
+ This API is not mature to become an official API.
+ For example, we can not use this API with
+ `rb_define_private_method()'.
- * configure.in: add ac_cv_func_getpgrp_void=yes on DJGPP.
+ * method.h, vm_method.c (rb_add_method_cfunc_frameless): removed.
-Sat Feb 10 23:43:49 2001 Nobuyoshi Nakada <nobu.nakada@nifty.ne.jp>
+Thu Oct 25 13:35:07 2012 NAKAMURA Usaku <usa@ruby-lang.org>
- * hash.c (rb_any_hash): dumped core on machines sizeof(int) != sizeof(long).
+ * tool/mkconfig.rb: remove string literal concatenation.
-Sat Feb 10 23:07:15 2001 Yukihiro Matsumoto <matz@ruby-lang.org>
+Wed Oct 24 18:49:16 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * regex.c (PREV_IS_A_LETTER): should not treat c>0x7f as a word
- character if -Kn.
+ * ext/objspace/objspace.c (type2sym, count_objects_size): use enum
+ instead of size_t which may be larger than actual values.
-Sat Feb 10 00:06:28 2001 Nobuyoshi Nakada <nobu.nakada@nifty.ne.jp>
+Wed Oct 24 17:41:24 2012 Koichi Sasada <ko1@atdot.net>
- * win32/win32.c (win32_stat): replace stat for enable when pathname
- ends with '/' or '\' for mswin32 on Win9X / Win2k.
+ * benchmark/driver.rb: add `-x' or `--exclude' option
+ to specify exclude benchmark name pattern.
+ You can specify "-x foo" if you want to exclude the benchmarks
+ if the name of benchmark contains `foo'.
- * win32/win32.h: ditto.
+Wed Oct 24 11:57:24 2012 Narihiro Nakamura <authornari@gmail.com>
- * ruby.h: ditto.
+ * gc.c (gc_prepare_free_objects): rename to match the behavior of
+ this function.
- * dir.c (rb_glob_helper): ditto.
+Wed Oct 24 11:55:19 2012 Koichi Sasada <ko1@atdot.net>
- * file.c (rb_stat, rb_file_s_stat, eaccess, check3rdbyte): ditto.
+ * ext/objspace/objspace.c (reachable_object_from_i): change data
+ structure of the result of reachable objects. Keys of table
+ contains object_id of each reachable objects. Value of table
+ is an object itself or an instance of InternalObjectWrapper.
+ To avoid duplication, we use st_table and object_id keys.
-Fri Feb 9 22:54:57 2001 WATANABE Hirofumi <eban@ruby-lang.org>
+ * ext/objspace/objspace.c (type2sym): bug fix.
+ Should use `i' instead of `type'.
- * ruby.c (ruby_init_loadpath): convert '\\' to '/'
- before finding executable file path.
+Wed Oct 24 10:33:09 2012 Koichi Sasada <ko1@atdot.net>
-Fri Feb 9 17:41:53 2001 Triet H. Lai <thlai@mail.usyd.edu.au>
+ * gc.c (garbage_collect, gc_marks): move the location of
+ clear and restore rb_objspace_t::mark_func_data
+ from garbage_collect() to gc_marks().
- * dir.c (rb_glob_helper): do not follow symbolic links.
+Wed Oct 24 10:17:45 2012 Koichi Sasada <ko1@atdot.net>
-Fri Feb 8 23:53:08 2001 Usaku Nakamura <usa@osb.att.ne.jp>
+ * ext/objspace/objspace.c (Init_objspace): add a new method
+ `ObjectSpace::InternalObjectWrapper#internal_object_id' which returns
+ an object id of a wrapped internal object.
- * win32/config.h.in (inline): add inline definition.
+Wed Oct 24 08:55:04 2012 Koichi Sasada <ko1@atdot.net>
-Thu Feb 8 21:27:24 2001 WATANABE Hirofumi <eban@ruby-lang.org>
+ * ext/objspace/objspace.c (ObjectSpace.reachable_objects_from):
+ internal object support.
+ If given object `obj' has references to internal objects
+ (such as T_NODE objects), then this method returns instances of
+ `ObjectSpace::InternalObjectWrapper' instead of that internal objects.
+ This instance contains a reference to an internal object and you can
+ check the type of internal object using
+ `ObjectSpace::InternalObjectWrapper#type' method.
+ Rdoc of `InternalObjectWrapper' is not prepared yet.
- * lib/mkmf.rb (install_rb): fix handling of relative path.
+ * gc.c (rb_objspace_reachable_objects_from), gc.h: change
+ an interface of 'rb_objspace_reachable_objects_from()'
- * lib/mkmf.rb (create_makefile): add srcdir.
+ * gc.c, gc.h: add two APIs
+ - rb_objspace_markable_object_p(obj): check markable or not.
+ - rb_objspace_internal_object_p(obj): check internal or not.
-Wed Feb 7 16:05:22 2001 Nobuyoshi Nakada <nobu.nakada@nifty.ne.jp>
+Wed Oct 24 05:52:36 2012 Koichi Sasada <ko1@atdot.net>
- * parse.y (parse_quotedwords): %w should allow parenthesis escape.
+ * vm_insnhelper.c (vm_call_method): remove `default' and
+ add a case for `VM_METHOD_TYPE_UNDEF'.
-Wed Feb 7 00:57:42 2001 Yukihiro Matsumoto <matz@ruby-lang.org>
+Wed Oct 24 05:41:18 2012 Koichi Sasada <ko1@atdot.net>
- * parse.y (parse_qstring): %q should allow terminator escape.
+ * eval_error.c (error_print), vm_eval.c (eval_string_with_cref),
+ vm_trace.c (rb_suppress_tracing): use TH_PUSH_TAG() instead of
+ PUSH_TAG().
-Wed Feb 7 00:57:42 2001 Yukihiro Matsumoto <matz@ruby-lang.org>
+Wed Oct 24 05:17:52 2012 Koichi Sasada <ko1@atdot.net>
- * re.c (rb_reg_equal): all option flags should be same to be equal.
+ * vm_eval.c (vm_call0_body): remove RUBY_VM_CHECK_INTS()
+ after method invocation using rb_call0().
-Tue Feb 6 21:01:29 2001 Minero Aoki <aamine@dp.u-netsurf.ne.jp>
+ * vm_eval.c (vm_call0_body): remove default section on top of
+ switch statement and add cases for `VM_METHOD_TYPE_CFUNC_FRAMELESS'
+ and `VM_METHOD_TYPE_UNDEF'.
- * lib/net/protocol.rb: ignore EOFError on only specified case.
+ * vm_eval.c (vm_call0_body): remove useless brackets.
- * lib/net/http.rb: take HTTP 1.0 server into account.
+Tue Oct 23 22:34:49 2012 Koichi Sasada <ko1@atdot.net>
-Mon Feb 5 00:39:06 2001 KANEKO Naoshi <wbs01621@mail.wbs.ne.jp>
+ * thread.c (thread_raise_m): check interrupts after Thread#raise
+ if a target thread is the current thread because the behavior
+ of Thread.current.raise is expected to perform same as
+ Kernel.raise (by rubyspec).
- * dir.c: use ISXXX() instead of isxxx().
+Tue Oct 23 17:08:39 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * dln.c (aix_loaderror): ditto.
+ * ruby.c (usage, process_options): show more info in --help.
+ [EXPERIMENTAL] [ruby-core:48072] [Bug #7184]
- * file.c (rb_file_s_expand_path): ditto.
+Tue Oct 23 14:20:43 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * string.c (rb_str_upcase_bang): ditto.
+ * misc/ruby-electric.el using variable `last-command-event' instead of
+ obsolete `last-command-char', so that work with Emacs trunk.
+ a patch by Victor Deryagin <vderyagin AT gmail.com>.
- * win32/win32.c (do_spawn): ditto.
+Tue Oct 23 14:06:47 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * win32/win32.c (NtMakeCmdVector): ditto.
+ * configure.in (visibility_option): visibility attribute is not
+ available before GCC 4, so do not use -fvisibility option in that
+ case. [ruby-core:48147] [Bug #7205]
- * win32/win32.c (opendir): ditto.
+Tue Oct 23 12:57:29 2012 Koichi Sasada <ko1@atdot.net>
-Fri Feb 3 00:48:50 2001 Usaku Nakamura <usa@osb.att.ne.jp>
+ * vm_core.h, vm_insnhelper.c, vm_eval.c (OPT_CALL_CFUNC_WITHOUT_FRAME):
+ add a new optimization and its macro `OPT_CALL_CFUNC_WITHOUT_FRAME'.
+ This optimization makes all cfunc method calls `frameless', which
+ is faster than ordinal cfunc method call.
+ If `frame' is needed (for example, it calls another method with
+ `rb_funcall()'), then build a frame. In other words, this
+ optimization delays frame building.
+ However, to delay the frame building, we need additional overheads:
+ (1) Store the last call information.
+ (2) Check the delayed frame building before the frame is needed.
+ (3) Overhead to build a delayed frame.
+ rb_thread_t::passed_ci is storage of delayed cfunc call information.
+ (1) is lightweight because it is only 1 assignment to `passed_ci'.
+ To achieve (2), we modify GET_THREAD() to check `passed_ci' every
+ time. It causes 10% overhead on my environment.
+ This optimization only works for cfunc methods which do not need
+ their `frame'.
+ After evaluation on my environment, this optimization does not
+ effective every time. Because of this evaluation results, this
+ optimization is disabled at default.
- * win32/win32.c (isInternalCmd): ignore case for shell's internal
- command. (marge from HEAD)
+ * vm_insnhelper.c, vm.c: add VM_PROFILE* macros to measure behaviour
+ of VM internals. I will extend this feature.
-Fri Feb 2 16:14:51 2001 Yukihiro Matsumoto <matz@ruby-lang.org>
+ * vm_method.c, method.h: change parameters of the `invoker' function.
+ Receive `func' pointer as the first parameter.
- * eval.c (POP_VARS): propagate DVAR_DONT_RECYCLE, if
- SCOPE_DONT_RECYCLE of ruby_scope is set.
+Tue Oct 23 06:21:05 2012 Aaron Patterson <aaron@tenderlovemaking.com>
-Wed Jan 31 22:27:29 2001 WATANABE Hirofumi <eban@ruby-lang.org>
+ * ext/psych/parser.c: just get the constant defined in Ruby.
- * configure.in: gcc-2.95.2-7(cygwin) support.
- add -mwin32 if available.
+ * ext/psych/lib/psych/syntax_error.rb: Psych::SyntaxError now inherits
+ from StandardError rather than SyntaxError. Thanks Eric Hodel!
- * cygwin/GNUmakefile: ditto.
+ * test/psych/test_exception.rb: tests for change.
-Mon Jan 29 17:36:19 2001 TOYOFUKU Chikanobu <toyofuku@juice.or.jp>
+Tue Oct 23 06:17:36 2012 Aaron Patterson <aaron@tenderlovemaking.com>
- * eval.c (rb_eval): nd_iter evaluation should be wrapped by
- BEGIN_CALLARGS and END_CALLARGS.
+ * ext/psych/lib/psych/scalar_scanner.rb: Cache symbols while
+ tokenizing. Thanks Kevin Menard!
-Mon Jan 29 01:40:27 2001 Yukihiro Matsumoto <matz@ruby-lang.org>
+Tue Oct 23 06:15:40 2012 Aaron Patterson <aaron@tenderlovemaking.com>
- * string.c (str_independent): should not clear str->orig here.
- it's too early.
+ * ext/psych/lib/psych/scalar_scanner.rb: Updated the RegExp to catch
+ Strings earlier in the tokenization process. Thanks Kevin Menard!
-Wed Jan 24 01:45:49 2001 Yukihiro Matsumoto <matz@ruby-lang.org>
+Tue Oct 23 06:12:39 2012 Aaron Patterson <aaron@tenderlovemaking.com>
- * eval.c (POP_BLOCK_TAG): call rb_gc_force_recycle() if block has
- not been objectified.
+ * ext/psych/lib/psych/visitors/to_ruby.rb: Handle nil tags specially
+ to avoid slow method_missing calls. Thanks Kevin Menard!
- * eval.c (rb_callcc): should nail down block->tag history to avoid
- rb_gc_force_recycle().
+Tue Oct 23 06:07:57 2012 Aaron Patterson <aaron@tenderlovemaking.com>
-Tue Jan 23 18:51:57 2001 Yukihiro Matsumoto <matz@ruby-lang.org>
+ * ext/psych/lib/psych/scalar_scanner.rb: Ignore bad timestamps. If
+ something looks like a timestamp but has an invalid component, treat
+ it as a string instead of throwing an ArgumentError.
+ Thanks Rhett Sutphin!
- * gc.c (rb_gc_call_finalizer_at_exit): should finalize objects in
- deferred_final_list too.
+ * test/psych/test_scalar_scanner.rb: appropriate tests.
-Tue Jan 23 16:10:12 2001 Yukihiro Matsumoto <matz@ruby-lang.org>
+Tue Oct 23 06:04:07 2012 Aaron Patterson <aaron@tenderlovemaking.com>
- * gc.c (os_live_obj): do not list terminated object.
+ * ext/psych/lib/psych/scalar_scanner.rb: Fix scalar_scanner to
+ understand strings starting with an underscore and containing only
+ digits. Thanks Kelley Reynolds.
- * gc.c (os_obj_of): ditto.
+ * test/psych/test_scalar_scanner.rb: test for fix
- * gc.c (rb_gc_mark): support new T_BLKTAG tag.
+Tue Oct 23 06:00:41 2012 Aaron Patterson <aaron@tenderlovemaking.com>
- * gc.c (obj_free): ditto.
+ * ext/psych/lib/psych.rb: Changed comment in psych.rb to update new
+ home page for libyaml. Thanks to Carolyn Ann.
- * eval.c (new_blktag): creation of new block tag, which holds
- destination of global jump and orphan status.
+Sun Oct 21 19:12:59 2012 Kazuki Tsujimoto <kazuki@callcc.net>
- * eval.c (block_pass): break from orphan Proc object will raise a
- LocalJumpError exception.
+ * vm_core.h (rb_vm_t::trace_running): add a new field
+ `trace_running' to store vm global tracing status.
-Mon Jan 22 16:33:16 2001 WATANABE Hirofumi <eban@ruby-lang.org>
+ * vm_trace.c: fix SEGV bug. event_hook was free'd
+ even when the hook is still used in another thread.
+ [ruby-dev:46141] [Bug #7032]
- * mkconfig.rb: autoconf 2.49 support.
+Sun Oct 21 19:12:42 2012 Kazuki Tsujimoto <kazuki@callcc.net>
-Sat Jan 20 03:54:00 2001 Yukihiro Matsumoto <matz@ruby-lang.org>
+ * vm_core.h (rb_vm_t::trace_flag): remove `trace_flag'
+ which is no longer used.
- * parse.y (yylex): fixed serious syntax misbehavior. do's
- preceding was too high. a block in `foo bar do .. end' should
- be passed to `foo', not `bar'.
+Sun Oct 21 18:34:27 2012 Tadayoshi Funaba <tadf@dotrb.org>
- * parse.y (block_call): syntax restructure.
+ * ext/date/date_parse.c (date__parse): uses more tight parser if
+ defined TIGHT_PARSER. now inactivated; because it introduces
+ incompatibilities and it is a bit slow.
-Fri Jan 19 04:04:31 2001 Akinori MUSHA <knu@iDaemons.org>
+Sat Oct 20 15:35:06 2012 Narihiro Nakamura <authornari@gmail.com>
- * lib/irb/ruby-lex.rb: Merge from HEAD: rev.1.4
+ * include/ruby/ruby.h: add C APIs.
+ VALUE rb_newobj_of(VALUE klass, VALUE flags)
+ #define NEWOBJ_OF(obj,type,klass,flags)
+ These allow to change a allocation strategy depending on klass
+ or flags.
-Wed Jan 17 13:28:26 2001 WATANABE Hirofumi <eban@ruby-lang.org>
+ * gc.c: ditto
- * configure.in: remove DEFS definition.
+ * array.c: use new C API.
+ * bignum.c: ditto
+ * class.c: ditto
+ * complex.c: ditto
+ * ext/socket/ancdata.c: ditto
+ * ext/socket/option.c: ditto
+ * hash.c: ditto
+ * io.c: ditto
+ * marshal.c: ditto
+ * numeric.c: ditto
+ * object.c: ditto
+ * random.c: ditto
+ * range.c: ditto
+ * rational.c: ditto
+ * re.c: ditto
+ * string.c: ditto
+ * struct.c: ditto
+ [Feature #7177][Feature #7047]
- * mkconfig.rb: ditto.
+Sat Oct 20 12:50:00 2012 Zachary Scott <zachary@zacharyscott.net>
- * win32/config.status.in: ditto.
+ * ext/socket/socket.c: Documentation for Socket
+ Based on a patch by David Albert
+ [Bug #7105] [ruby-core:47828]
-Tue Jan 16 16:59:14 2001 Minero Aoki <aamine@dp.u-netsurf.ne.jp>
+Sat Oct 20 11:00:00 2012 Zachary Scott <zachary@zacharyscott.net>
- * lib/net/protocol.rb: ignore EOFError for read
+ * lib/open-uri.rb: Documentation for OpenURI
-Sun Jan 14 21:49:28 2001 Koji Arai <JCA02266@nifty.ne.jp>
+Sat Oct 20 06:18:34 2012 Aaron Patterson <aaron@tenderlovemaking.com>
- * sprintf.c (rb_f_sprintf): simple typo. binary base should be 2,
- not '2'.
+ * hash.c (initialize_copy): unset the default proc if there isn't one
+ for the target hash, call to_hash, check frozen status.
-Sun Jan 14 02:49:57 2001 Minero Aoki <aamine@dp.u-netsurf.ne.jp>
+Fri Oct 19 22:22:01 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * lib/net/protocol.rb (adding): too few "yield" in case of arg is
- not String/File.
+ * vm.c (rb_vm_jump_tag_but_local_jump): pass through thrown objects.
+ [ruby-dev:46234] [Bug #7185]
-Sat Jan 13 19:18:18 2001 WATANABE Hirofumi <eban@ruby-lang.org>
+ * vm_eval.c (rb_eval_cmd): if state is non-zero, val should be nil and
+ rb_vm_jump_tag_but_local_jump() just jump tag.
- * re.c (rb_reg_desc): separate RE_OPTION_MULTILINE
+Fri Oct 19 22:11:55 2012 Benoit Daloze <eregontp@gmail.com>
- * re.c (rb_reg_options): add RE_OPTION_{POSIXLINE,RE_OPTION_MULTILINE,
- RE_OPTION_EXTENDED}
+ * pack.c (pack_unpack): set encoding of the
+ 'H','h','B' and 'B' modifiers to US-ASCII.
-Thu Jan 11 06:45:55 2001 Yukihiro Matsumoto <matz@ruby-lang.org>
+ * test/ruby/test_pack.rb: tests for the above.
+ [ruby-core:47653][Bug #7050]
- * object.c (rb_mod_dup): should propagate FL_SINGLETON.
+ * test/test_securerandom.rb: tests for SecureRandom.hex
+ from tenderlove. [ruby-core:46792][Bug #6799]
- * object.c (inspect_obj): handles the case of no instance variable.
+Fri Oct 19 19:29:11 2012 Koichi Sasada <ko1@atdot.net>
-Wed Jan 10 01:50:45 2001 Yukihiro Matsumoto <matz@ruby-lang.org>
+ * method.h (rb_method_cfunc_t::invoker): add new field (func ptr)
+ `invoker'. `invoker' function invoke cfunc body
+ (rb_method_cfunc_t::func).
+ `invoker' is set at method definition timing.
+ With this change, the big `switch' (branch) in `call_cfunc()'
+ is no longer needed.
+ However, the performance benefit is only a bit.
- * string.c (rb_str_reverse_bang): forgot to call rb_str_modify().
+ * vm_core.h (rb_call_info_t::aux::func): add a new field to store
+ cfunc body function pointer.
-Tue Jan 9 17:41:40 2001 Yukihiro Matsumoto <matz@ruby-lang.org>
+ * vm_method.c (call_cfunc_invoker_func): add a new function which
+ returns a suitable invoke function.
- * object.c (rb_obj_taint): check frozen status before modifying
- taint status.
+ * vm_method.c (setup_method_cfunc_struct): added.
- * object.c (rb_obj_untaint): ditto.
+ * vm_method.c (rb_add_method): fix to set `invoker'.
-Mon Jan 8 21:35:10 2001 Guy Decoux <decoux@moulon.inra.fr>
+ * vm_eval.c (vm_call0_body): catch up above changes.
- * file.c (path_check_1): should restore modified path.
+ * vm_insnhelper.c (call_cfunc): removed.
-Mon Jan 8 21:24:37 2001 Yukihiro Matsumoto <matz@ruby-lang.org>
+ * vm_insnhelper.c (vm_call_cfunc): fix to call cfunc body
+ with `invoker' function.
- * bignum.c (bigdivrem): t2 might be too big for signed long; do
- not use rb_int2big(), but rb_uint2big().
+Fri Oct 19 16:55:58 2012 Koichi Sasada <ko1@atdot.net>
-Mon Jan 8 03:09:58 2001 Yukihiro Matsumoto <matz@ruby-lang.org>
+ * eval.c, vm_eval.c: use TH_PUSH_TAG() instead of PUSH_TAG().
- * error.c (rb_load_fail): new func to report LoadError.
+Fri Oct 19 11:13:55 2012 Koichi Sasada <ko1@atdot.net>
- * ruby.c (load_file): use rb_load_fail.
+ * benchmark/driver.rb: remove unexpected `output'.
+ (commit miss)
-Sat Jan 6 00:55:59 2001 Yukihiro Matsumoto <matz@ruby-lang.org>
+Fri Oct 19 10:24:03 2012 Koichi Sasada <ko1@atdot.net>
- * pack.c (pack_pack): template "m2" or "u2" caused inifinite loop.
+ * vm_insnhelper.c (vm_search_method): remove needless local variable.
-Fri Jan 5 01:02:17 2001 Yukihiro Matsumoto <matz@ruby-lang.org>
+Fri Oct 19 10:22:26 2012 Koichi Sasada <ko1@atdot.net>
- * eval.c (ruby_finalize): should enclosed by PUSH_TAG/POP_TAG.
+ * benchmark/bmx_temp.rb: removed.
+ This file should not be in repository.
-Sun Dec 31 01:39:16 2000 Guy Decoux <decoux@moulon.inra.fr>
+Fri Oct 19 10:20:10 2012 Koichi Sasada <ko1@atdot.net>
- * eval.c (rb_mod_define_method): wrong comparison for blocks.
+ * benchmark/driver.rb: add new option `--ruby-arg [ARG]'
+ which is passed as a launch parameter for each ruby's execution.
+ ($ ruby [ARG] [File])
-Sat Dec 30 19:28:50 2000 Yukihiro Matsumoto <matz@ruby-lang.org>
+Thu Oct 18 18:42:35 2012 Koichi Sasada <ko1@atdot.net>
- * gc.c (id2ref): should handle Symbol too.
+ * insns.def (opt_send_simple): move the location of
+ `opt_send_simple' to the place near `send' definition.
+ (to take care about icache locality).
- * gc.c (id2ref): should print original ptr value
+Thu Oct 18 18:29:25 2012 Koichi Sasada <ko1@atdot.net>
-Sat Dec 30 03:14:22 2000 Yukihiro Matsumoto <matz@ruby-lang.org>
+ * insns.def (send): remove unused condition.
+ This condition will be true after r37258.
- * eval.c (rb_iterate): NODE_CFUNC does not protect its data
- (nd_tval), so create new node NODE_IFUNC for iteration C
- function.
+ * vm_insnhelper.c (vm_caller_setup_args): remove `UNLIKELY' on
+ checking blockiseq (it seems `LIKELY').
- * eval.c (rb_yield_0): use NODE_IFUNC.
+Thu Oct 18 17:31:58 2012 Koichi Sasada <ko1@atdot.net>
- * gc.c (rb_gc_mark): support NODE_IFUNC.
+ * insns.def (opt_send_simple): introduce new instruction used
+ when no need to care about block and splat.
-Fri Dec 29 11:41:55 2000 Yukihiro Matsumoto <matz@ruby-lang.org>
+ * compile.c: use the `opt_send_simple' instruction.
- * gc.c (mem_error): prohibit recursive mem_error().
- (ruby-bugs-ja:PR#36)
+Thu Oct 18 16:44:07 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Fri Dec 29 11:05:41 2000 Yukihiro Matsumoto <matz@ruby-lang.org>
+ * vm_method.c (rb_add_method_cfunc, rb_add_method_cfunc_frameless):
+ check arity earlier at definition time.
- * eval.c (rb_thread_fd_writable): should not switch context if
- rb_thread_critical is set.
+Thu Oct 18 15:11:31 2012 Koichi Sasada <ko1@atdot.net>
- * eval.c (rb_thread_wait_fd): ditto.
+ * vm_insnhelper.c: add `inline' keyword to several functions.
+ Compilers (gcc) are conservative than I expected.
- * eval.c (rb_thread_wait_for): ditto.
+Thu Oct 18 15:01:15 2012 Koichi Sasada <ko1@atdot.net>
- * eval.c (rb_thread_select): ditto.
+ * include/ruby/ruby.h: add a decl. of
+ `rb_define_frameless_method()'.
- * eval.c (rb_thread_join): join during critical section causes
- deadlock.
+Thu Oct 18 14:31:17 2012 Koichi Sasada <ko1@atdot.net>
-Tue Dec 26 18:46:41 2000 NAKAMURA Hiroshi <nakahiro@sarion.co.jp>
+ * compile.c (new_callinfo): set a temporary index of callinfo
+ (used in `iseq_set_sequence()') to rb_call_info_t::aux::index.
+ rb_call_info_t::argc is initialized by same value of
+ rb_call_info_t::orig_argc.
- * lib/debug.rb: Avoid thread deadlock in debugging stopped thread.
+Thu Oct 18 14:11:08 2012 Koichi Sasada <ko1@atdot.net>
- * lib/debug.rb: Uncleared 'finish' state.
+ * class.c (rb_define_frameless_method): rename from
+ rb_define_method_fast(). Defined method with this C API
+ does not make a method frame. It is bit lightweight than
+ ordinal C functions. Now only 0 or 1 argc are permitted.
-Tue Dec 26 16:53:55 2000 Yukihiro Matsumoto <matz@ruby-lang.org>
+ * method.h (VM_METHOD_TYPE_CFUNC_FRAMELESS): rename macro name
+ from VM_METHOD_TYPE_CFUNC_FAST.
- * eval.c (rb_yield_0): remove dvar node by rb_gc_force_recycle()
- more eagerly.
+ * vm_insnhelper.c, vm_method.c: rename related functions.
- * eval.c (rb_f_binding): recycling should be stopped for outer
- scope too.
+ * proc.c (rb_method_entry_arity): catch up above changes.
- * eval.c (proc_new): ditto.
+Thu Oct 18 10:30:34 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Tue Dec 26 15:45:35 2000 Yukihiro Matsumoto <matz@ruby-lang.org>
+ * parse.y (assignable_gen): fail if yyerror occurred. fix a bug in
+ r36973.
- * string.c (rb_str_inspect): should treat multibyte chracters
- properly.
+Thu Oct 18 09:23:03 2012 Aaron Patterson <aaron@tenderlovemaking.com>
-Mon Dec 25 17:49:08 2000 K.Kosako <kosako@sofnec.co.jp>
+ * hash.c (initialize_copy): duping should rehash the hash.
- * string.c (rb_str_replace_m): unexpected string share happens if
- replace is done for associated (STR_NO_ORIG) string.
+ * test/ruby/test_hash.rb: added a test to ensure rehash.
-Tue Dec 26 15:01:53 2000 Yukihiro Matsumoto <matz@ruby-lang.org>
+Wed Oct 17 21:16:47 2012 Hiroshi Shirosaki <h.shirosaki@gmail.com>
- * io.c (rb_f_p): should not call rb_io_flush() if rb_defout is not
- a IO (T_FILE).
+ * common.mk (WPROGRAM): need same dependencies as PROGRAM.
-Mon Dec 25 15:52:39 2000 Yukihiro Matsumoto <matz@ruby-lang.org>
+ * cygwin/GNUmakefile.in (uncommon.mk): move include position
+ below WPROGRAM definition to be defined in uncommon.mk.
- * stable version 1.6.2 released.
+ * ext/extmk.rb (all, static): fix make rubyw.exe failure with make -jN.
+ If make of ruby.exe and rubyw.exe run in parallel, link dll and link
+ exe run in parallel, which causes link failure on mingw. To fix this,
+ we make ruby.exe and rubyw.exe in one make process.
+ [ruby-core:48007] [Bug #7165]
-Mon Dec 25 05:11:04 2000 Wakou Aoyama <wakou@fsinet.or.jp>
+Wed Oct 17 16:25:34 2012 Koichi Sasada <ko1@atdot.net>
- * lib/cgi.rb: version 2.1.2 (some bug fixes).
+ * benchmark/bm_vm2_method_missing.rb: add a benchmark to measure
+ performance of invoking `method_missing'.
- * lib/cgi.rb: Regexp::last_match[1] --> $1
+Wed Oct 17 16:23:17 2012 Koichi Sasada <ko1@atdot.net>
- * lib/net/telnet.rb: ditto.
+ * vm_insnhelper.c (vm_getivar): fix to use `aux.index' instead of
+ `aux.opt_pc'.
-Mon Dec 25 04:43:02 2000 Minero Aoki <aamine@dp.u-netsurf.ne.jp>
+Wed Oct 17 16:03:54 2012 Koichi Sasada <ko1@atdot.net>
- * lib/net/http.rb: does not send HEAD on closing socket.
+ * vm_insnhelper.c (vm_call_method_missing): make a refactoring
+ about method_missing process. Use `vm_call_method()' to invoke
+ `method_missing' method instead of `rb_funcall2()'.
+ In `vm_call_method()', set fastpath to `vm_call_method_missing()'
+ if it can be cached.
-Mon Dec 25 00:44:48 2000 Yukihiro Matsumoto <matz@ruby-lang.org>
+ * vm_core.h (rb_call_info_t): add new field
+ `rb_call_info_t::aux::missing_reason' to pass the reason to
+ `vm_call_method_missing()'.
- * hash.c (rb_any_cmp): should use rb_str_cmp() if TYPE == T_STRING
- and CLASS_OF == rb_cString.
+Wed Oct 17 15:33:12 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * string.c (rb_str_new4): should copy class of original too.
+ * configure.in (opt-dir): allow multiple directories separated by
+ $PATH_SEPARATOR as well as dir_config in mkmf.rb. [ruby-core:47868]
+ [Bug #7120]
-Mon Dec 25 00:04:54 2000 Nobuyoshi Nakada <nobu.nakada@nifty.ne.jp>
+Wed Oct 17 15:08:13 2012 Shugo Maeda <shugo@ruby-lang.org>
- * eval.c (rb_thread_schedule): initial value of `max' changed to -1.
+ * lib/net/imap.rb: fix Net::IMAP::ResponseParser to accept
+ message/delivery-status ([ruby-core:47920] [Bug #7146]),
+ message/rfc822 attachments ([ruby-core:47921] [Bug #7147]), and
+ (BODY ("MIXED")) ([ruby-core:47951] [Bug #7153]).
+ patched by Tony Arkles.
-Mon Dec 25 00:16:14 2000 Yukihiro Matsumoto <matz@ruby-lang.org>
+ * test/net/imap/test_imap_response_parser.rb: related test.
- * string.c (rb_str_replace_m): copy-on-write replace.
+Wed Oct 17 11:04:48 2012 NAKAMURA Usaku <usa@ruby-lang.org>
- * parse.y (yylex): should handle => after identifier as well as ==
- and =~.
+ * test/ruby/test_hash.rb (TestHash#test_dup_equality): added a new test
+ to show the problem of r37232.
-Sat Dec 23 23:55:57 2000 Yukihiro Matsumoto <matz@ruby-lang.org>
+Wed Oct 17 10:48:40 2012 Shugo Maeda <shugo@ruby-lang.org>
- * bignum.c (rb_cstr2inum): Integer("") should not return 0.
+ * vm_insnhelper.c (vm_search_method): fix a build error that occurs
+ when OPT_INLINE_METHOD_CACHE is 0.
-Sat Dec 23 11:55:57 2000 Yukihiro Matsumoto <matz@ruby-lang.org>
+Wed Oct 17 08:46:47 2012 Koichi Sasada <ko1@atdot.net>
- * array.c (rb_ary_and): Array#& should preverve original order.
+ * benchmark/bm_vm2_dstr.rb: add a benchmark to measure
+ performance of dynamic generated string ("foo#{bar}baz").
-Sat Dec 23 03:44:16 2000 Minero Aoki <aamine@dp.u-netsurf.ne.jp>
+Wed Oct 17 08:32:46 2012 Koichi Sasada <ko1@atdot.net>
- * lib/net/protocol.rb: set @closed false in Socket#reopen.
+ * compile.c (compile_dstr_fragments): use `putobject' instead of
+ `putstring' for all of strings used by NODE_DSTR because
+ ruby users can not grab this string.
+ For example, the string object of "baz" in "foo#{bar}baz"
+ is located by `putobject' (users can not touch "baz" object
+ directly). This change reduces GC pressure.
+ This improvement is suggested by Aaron Patterson.
- * lib/net/pop.rb: add POP3.foreach, delete_all.
+Wed Oct 17 08:02:57 2012 Koichi Sasada <ko1@atdot.net>
- * lib/net/pop.rb: add POP3#delete_all.
+ * thread.c (rb_threadptr_interrupt_mask): fix to check interrupt
+ after interrupt_mask changed.
- * lib/net/http.rb: add HTTP.version_1_1, version_1_2
+Wed Oct 17 06:42:47 2012 Koichi Sasada <ko1@atdot.net>
- * lib/net/http.rb: refactoring.
+ * vm_insnhelper.c (vm_call_method): fix to return value immediately.
+ Remove CHECK_INTS() after that method dispatch.
-Fri Dec 22 23:11:12 2000 Ueno Katsuhiro <unnie@blue.sky.or.jp>
+Wed Oct 17 06:25:56 2012 Aaron Patterson <aaron@tenderlovemaking.com>
- * eval.c (rb_feature_p): ext might be null.
+ * hash.c (initialize_copy): copy the underlying st_table on dup,
+ rather than copying the hash key by key. [ruby-core:48009]
-Fri Dec 22 17:04:12 2000 Nobuyoshi Nakada <nobu.nakada@nifty.ne.jp>
+ * test/ruby/test_hash.rb: relevant tests for initialize_copy
- * win32/win32.c (myselect): avoid busy loop by adjusting fd_count.
+Wed Oct 17 06:17:44 2012 Koichi Sasada <ko1@atdot.net>
-Fri Dec 22 15:07:55 2000 Yukihiro Matsumoto <matz@ruby-lang.org>
+ * vm_insnhelper.c (vm_call_iseq_setup_2): separate tailcall and normal
+ method frame setup functions.
+ Add checking interrupts at the tailcall setup function.
- * bignum.c (rb_cstr2inum): prefix like '0x' had removed too much.
+Wed Oct 17 05:35:37 2012 Koichi Sasada <ko1@atdot.net>
-Thu Dec 21 13:01:46 2000 Tanaka Akira <akr@m17n.org>
+ * benchmark/bm_vm1_yield.rb: add a benchmark to measure `yield'
+ (invoke empty block) performance.
- * lib/net/ftp.rb (makeport): don't use TCPsocket.getaddress.
+ * benchmark/bm_vm2_method_with_block.rb: add a benchmark to measure
+ method invocation with empty block.
-Wed Dec 20 12:00:15 2000 Yukihiro Matsumoto <matz@ruby-lang.org>
+Wed Oct 17 05:05:07 2012 Koichi Sasada <ko1@atdot.net>
- * bignum.c (rb_big_lshift): should cast up to BDIGIT_DBL.
+ * vm_insnhelper.c (vm_invoke_block): vm_caller_setup_args() can skip
+ when splat flag is not set.
- * parse.y (yylex): disallow trailing '_' for numeric litrals.
+Wed Oct 17 01:53:47 2012 Koichi Sasada <ko1@atdot.net>
- * bignum.c (rb_cstr2inum): allow `_' within converting string.
+ * vm_insnhelper.c (vm_getivar, vm_setivar): support index inline cache
+ with rb_call_info_t to speedup `attr' getter and setter.
+ Cached index is stored in rb_call_info_t::aux::index.
+ `index' == 0 means not cached. `index' > 0 means cached and cached
+ index is `index - 1'.
- * eval.c (specific_eval): should take no argument if block is
- supplied.
+ * insns.def ((get|set)instancevariable): use new wrapper functions
+ vm_(get|set)instancevariable() defined in vm_insnhelper.c.
-Tue Dec 19 13:44:50 2000 K.Kosako <kosako@sofnec.co.jp>
+ * vm_core.h (rb_call_info_t::aux): introduce new union data because
+ opt_pc can share with index.
- * io.c (rb_f_p): should flush rb_defout, not stdout.
+Tue Oct 16 22:24:44 2012 Koichi Sasada <ko1@atdot.net>
-Tue Dec 19 00:57:10 2000 Yukihiro Matsumoto <matz@ruby-lang.org>
+ * benchmark/driver.rb (show_results): Show speedup ratio
+ with first executables score at last of results
+ if two or more executables are given.
- * time.c (time_minus): usec might overflow. (ruby-bugs-ja:PR#35)
+Tue Oct 16 21:59:01 2012 Koichi Sasada <ko1@atdot.net>
- * eval.c (rb_obj_extend): Object#extend should take at least one
- argument.
+ * benchmark/driver.rb: some refactoring.
+ (1) Remove `average differential'.
+ In this benchmark driver, We should not care about `average'.
+ We use fastest score because this score should not include
+ any disturbances (affections of background process, etc).
+ If you care about timing affect, I recommend `median'
+ score with more than 5 examinations rather than simple
+ `average' score (`average' score was affected by error scores).
+ (2) Show log file name.
+ (3) Change default directory from './' to driver's directory.
- * parse.y (mrhs_basic): should check value_expr($3), not $1.
+Tue Oct 16 14:56:23 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Mon Dec 18 23:18:39 2000 WATANABE Hirofumi <eban@ruby-lang.org>
+ * file.c (rb_file_join): need to check again after any conversion run.
+ [ruby-core:48012] [Bug #7168]
- * util.c (mblen, __crt0_glob_function): add for multibyte
- on DJGPP 2.03.
+Tue Oct 16 12:52:14 2012 Kazuhiro NISHIYAMA <zn@mbf.nifty.com>
-Mon Dec 18 18:10:30 2000 Yukihiro Matsumoto <matz@ruby-lang.org>
+ * test/ruby/envutil.rb (Test::Unit::Assertions#assert_file):
+ rename from file_assertion.
- * time.c (time_plus): usec might underflow (ruby-bugs-ja:#PR33).
+Tue Oct 16 11:30:18 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Mon Dec 18 08:11:20 2000 Yukihiro Matsumoto <matz@ruby-lang.org>
+ * file.c (rb_file_join): hide the result under construction until
+ return.
- * hash.c (rb_hash_set_default): should call rb_hash_modify().
+ * file.c (rb_file_join): check nul-byte only for strings, since
+ FilePathStringValue() does it. [ruby-core:48012] [Bug #7168]
-Sat Dec 16 02:58:26 2000 Minero Aoki <aamine@dp.u-netsurf.ne.jp>
+ * file.c (rb_file_join): path names must be ASCII-compatible.
+ [ruby-core:48012] [Bug #7168]
- * eval.c (rb_eval): should clear ruby_errinfo on retry.
+ * file.c (check_path_encoding): new function to ensure path name
+ encoding to be ASCII-compatible.
- * eval.c (rb_rescue2): ditto.
+Tue Oct 16 09:40:04 2012 NAKAMURA Usaku <usa@ruby-lang.org>
-Thu Dec 14 13:06:18 2000 Nobuyoshi Nakada <nobu.nakada@nifty.ne.jp>
+ * test/ruby/test_regexp.rb
+ (TextRegexp#test_raw_hyphen_and_tk_char_type_after_range): use
+ Regexp.new instead of literal to ignore a parser warning.
- * class.c (rb_include_module): prohibit fronzen class/module.
+Tue Oct 16 09:30:30 2012 NAKAMURA Usaku <usa@ruby-lang.org>
- * eval.c (rb_frozen_class_p): make external.
+ * test/ruby/test_regexp.rb
+ (TextRegexp#test_raw_hyphen_and_tk_char_type_after_range): ignoring
+ warnings are already set in setup method.
- * intern.h (rb_frozen_class_p): prototyped.
+Tue Oct 16 06:44:06 2012 Koichi Sasada <ko1@atdot.net>
- * intern.h (rb_undef): prototyped not but rb_undef_method()
- which is also in ruby.h.
+ * vm_insnhelper.c (VM_CALLEE_SETUP_ARG): fix wrong condition.
-Thu Dec 14 09:20:26 2000 Wakou Aoyama <wakou@fsinet.or.jp>
+Tue Oct 16 06:29:18 2012 Koichi Sasada <ko1@atdot.net>
- * lib/cgi.rb: support -T1 on ruby 1.6.2
+ * vm_insnhelper.c (vm_call_method): disable CI_SET_FASTPATH() if
+ this method call needs splat argument because cached functions
+ (vm_call_attrset, vm_call_ivar, vm_call_cfunc_fast_(unary|binary))
+ do not check an arity.
- * lib/cgi.rb: $1 --> Regexp::last_match[1]
+ * bootstraptest/test_method.rb: add a test to check an above issue.
- * lib/net/telnet.rb: ditto.
+Tue Oct 16 06:15:44 2012 Koichi Sasada <ko1@atdot.net>
-Wed Dec 13 23:27:06 2000 Yukihiro Matsumoto <matz@ruby-lang.org>
+ * method.h: introduce new method type VM_METHOD_TYPE_CFUNC_FAST.
+ This method is similar to VM_METHOD_TYPE_CFUNC methods, but
+ called cfunc without building new frame (does not push new control
+ frame). If error is occurred in cfunc, the backtrace only shows
+ caller frame and upper.
+ This kind of methods can be added by rb_define_method_fast().
+ This feature is similar to specialized instructions (opt_plus, etc),
+ but more flexible (but a bit slower).
- * eval.c (rb_eval): handles case statement without expr, which
- looks for any TRUE (non nil, non false) when expression.
+ * class.c (rb_define_method_fast): added.
+ Maybe it will be renamed soon.
- * parse.y (primary): case expression should not be compstmt, but
- mere expr.
+ * vm_insnhelper.c (vm_call_method): support method type
+ VM_METHOD_TYPE_CFUNC_FAST.
- * parse.y (primary): case without following expression is now
- separated rule.
+ * proc.c (rb_method_entry_arity): catch up new method type.
-Wed Dec 13 12:41:27 2000 WATANABE Hirofumi <eban@ruby-lang.org>
+ * vm_method.c (rb_add_method_cfunc_fast): added.
- * ruby.c (proc_options): accept "--^M" for DOS line endings.
+Tue Oct 16 02:32:29 2012 Koichi Sasada <ko1@atdot.net>
-Tue Dec 12 15:45:42 2000 Yukihiro Matsumoto <matz@ruby-lang.org>
+ * vm_insnhelper.h (CI_SET_FASTPATH): add new parameter `enabled'.
+ If `enable' is 0 then CI_SET_FASTPATH() doesn't work.
+ And add new configuration option OPT_CALL_FASTPATH. If this macro
+ was defined by 0, then CI_SET_FASTPATH() doesn't work any more.
- * parse.y (newline_node): cancel newline unification.
+ * vm_insnhelper.c (vm_call_method): Pass `0' for `enabled' parameter
+ of CI_SET_FASTPATH if this method is protected.
-Mon Dec 11 23:01:57 2000 Yukihiro Matsumoto <matz@ruby-lang.org>
+Tue Oct 16 02:17:35 2012 Koichi Sasada <ko1@atdot.net>
- * parse.y (yylex): supports cases `?' precedes EOF and newline.
+ * vm_core.h (VM_CALL_*): rename VM_CALL_*_BIT
+ to VM_CALL_* (remove `_BIT' suffix).
+ Add comments on each macros.
+ Remove unused macro VM_CALL_TAILRECURSION_BIT.
-Mon Dec 11 12:11:25 2000 Yukihiro Matsumoto <matz@ruby-lang.org>
+ * compile.c, iseq.c, insns.def, vm_insnhelper.c: ditto.
- * eval.c (call_end_proc): some frame members were left
- uninitialized.
+Mon Oct 15 22:14:44 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Mon Dec 11 01:14:58 2000 Yukihiro Matsumoto <matz@ruby-lang.org>
+ * test/ruby/envutil.rb (Test::Unit::Assertions#file_assertion):
+ rewrite file assertions.
- * io.c (rb_io_fptr_finalize): do not fclose stdin, stdout and
- stderr at exit.
+Mon Oct 15 09:41:17 2012 Koichi Sasada <ko1@atdot.net>
-Sat Dec 9 17:34:48 2000 Tachino Nobuhiro <tachino@open.nm.fujitsu.co.jp>
+ * vm_insnhelper.c (VM_CALLEE_SETUP_ARG): skip CI_SET_FASTPATH() if
+ it was called from vm_yield_setup_args().
- * time.c (time_cmp): should check with kind_of?, not instance_of?
+Mon Oct 15 05:20:13 2012 Koichi Sasada <ko1@atdot.net>
- * time.c (time_eql): ditto.
+ * vm_insnhelper.h CI_SET_FASTPATH: introduce new macro
+ `CI_SET_FASTPATH(ci, func)'. This macro set `ci->call' as `func'.
+ `func' (ci->call) is called at the last of `send'
+ (and `invokesuper') instruction.
+ `CI_SET_FASTPATH' does not set `ci->call' when the method
+ (stored in `ci->me') is `protected'.
- * time.c (time_minus): ditto.
+ * vm_insnhelper.c (vm_call_method): use `CI_SET_FASTPATH'.
+ After several checking (visibility, argc checking), the result of
+ checking can be reused until re-definition of this method
+ with inline method cache.
-Fri Dec 8 17:23:25 2000 Tachino Nobuhiro <tachino@open.nm.fujitsu.co.jp>
+ Note that this optimization is now experimental.
+ If you find any problem about it, please tell us.
- * sprintf.c (rb_f_sprintf): proper string precision treat.
+Mon Oct 15 04:51:55 2012 Koichi Sasada <ko1@atdot.net>
-Fri Dec 8 10:44:05 2000 Yukihiro Matsumoto <matz@ruby-lang.org>
+ * vm_insnhelper.c: refactoring.
+ - move all `call' related functions to the last of file.
+ - make functions for respective method types in vm_call_method().
+ (all functions have same function parameters)
- * variable.c (rb_mod_remove_cvar): Module#remove_class_variable
- added.
+ * vm_core.h: add `opt_pc' field in `rb_call_info_t'
+ as temporal variable.
-Thu Dec 7 17:35:51 2000 Shugo Maeda <shugo@ruby-lang.org>
+ * vm_eval.c (vm_call0_body): catch up above changes.
- * eval.c (stack_length): don't use __builtin_frame_address() on alpha.
+Mon Oct 15 03:51:46 2012 Koichi Sasada <ko1@atdot.net>
-Wed Dec 6 18:07:13 2000 WATANABE Hirofumi <eban@ruby-lang.org>
+ * benchmark/bm_vm1_attr_ivar(_set).rb: added (for method dispatch speed).
- * djgpp/config.sed, win32/Makefile.sub: typo.
+ * benchmark/bm_vm1_float_simple.rb: added (for flonum/float).
- * eval.c (rb_mod_define_method): avoid VC4.0 warnings.
+Mon Oct 15 02:51:16 2012 Koichi Sasada <ko1@atdot.net>
-Wed Dec 6 13:38:08 2000 Yukihiro Matsumoto <matz@ruby-lang.org>
+ * vm_eval.c (vm_call0_body): add new function.
+ `vm_call0()' makes call_info struct and calls `vm_call0_body()'
+ with this struct. In near future, `vm_call0()' will be removed
+ because all of `vm_call0()' users setup call_info struct by itself.
- * array.c (rb_ary_and): tuning, make hash from shorter operand.
+Mon Oct 15 01:38:06 2012 Koichi Sasada <ko1@atdot.net>
-Wed Dec 6 01:28:50 2000 SHIROYAMA Takayuki <psi@fortune.nest.or.jp>
+ * insns.def (send, invokesuper, invokeblock, opt_*), vm_core.h:
+ use only a `ci' (rb_call_info_t) parameter instead of using
+ parameters such as `op_id', 'op_argc', `blockiseq' and flag.
+ These information are stored in rb_call_info_t at the compile
+ time.
+ This technique simplifies parameter passing at related
+ function calls (~10% speedups for simple method invocation at
+ my machine).
+ `rb_call_info_t' also has new function pointer variable `call'.
+ This `call' variable enables to customize method (block)
+ invocation process for each place. However, it always call
+ `vm_call_general()' at this changes.
+ `rb_call_info_t' also has temporary variables for method
+ (block) invocation.
- * gc.c (rb_gc): __builtin_frame_address() should not be used on
- MacOS X.
+ * vm_core.h, compile.c, insns.def: introduce VM_CALL_ARGS_SKIP_SETUP
+ VM_CALL macro. This flag indicates that this call can skip
+ caller_setup (block arg and splat arg).
- * gc.c (Init_stack): ditto.
+ * compile.c: catch up above changes.
-Mon Dec 4 13:44:01 2000 WATANABE Hirofumi <eban@ruby-lang.org>
+ * iseq.c: catch up above changes (especially for TS_CALLINFO).
- * lib/jcode.rb: consider multibyte. not /n.
+ * tool/instruction.rb: catch up above changes.
-Mon Dec 4 09:49:36 2000 Yukihiro Matsumoto <matz@ruby-lang.org>
+ * vm_insnhelper.c, vm_insnhelper.h: ditto. Macros and functions
+ parameters are changed.
- * string.c (rb_str_inspect): output whole string contents. no more `...'
+ * vm_eval.c (vm_call0): ditto (it will be rewritten soon).
- * string.c (rb_str_dump): should propagate taintness.
+Sun Oct 14 12:30:44 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * hash.c (env_inspect): hash like human readable output.
+ * ruby.c (rb_f_sub, rb_f_gsub): pass the given block.
+ [ruby-core:47967] [Bug #7157]
- * variable.c (rb_ivar_get): prohibiting instance variable access
- is too much restriction.
+Sat Oct 13 23:15:39 2012 NAKAMURA Usaku <usa@ruby-lang.org>
- * class.c (method_list): retrieving information should not be
- restricted where $SAFE=4.
+ * regparse.c (parse_char_class): should match with a hyphen after a
+ range in a character class.
- * class.c (rb_obj_singleton_methods): ditto.
+ * test/ruby/test_regexp.rb (TestRegexp#test_char_class): fixed wrong
+ test.
- * eval.c (rb_thread_priority): ditto.
+ * test/ruby/test_regexp.rb (TestRegexp#check): now can accept the
+ error message.
- * eval.c (rb_thread_local_aref): ditto.
+ * test/ruby/test_regexp.rb
+ (TextRegexp#test_raw_hyphen_and_tk_char_type_after_range): renamed
+ because the previous name was wrong.
- * variable.c (rb_obj_instance_variables): ditto.
+ * test/ruby/test_regexp.rb
+ (TextRegexp#test_raw_hyphen_and_tk_char_type_after_range): added
+ more test pattern.
- * variable.c (rb_mod_const_at): ditto.
+Sat Oct 13 03:01:53 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * variable.c (rb_mod_class_variables): ditto.
+ * file.c (realpath_rec): prevent link from GC while link_names refers
+ the content.
- * eval.c (rb_exec_end_proc): end_proc should be preserved.
+Sat Oct 13 01:37:48 2012 NAKAMURA Usaku <usa@ruby-lang.org>
-Sat Dec 2 22:32:43 2000 Yukihiro Matsumoto <matz@ruby-lang.org>
+ * test/ruby/test_regexp.rb
+ (TestRegexp#test_raw_hyphen_and_type_char_after_range): added new
+ test. ref [ruby-core:47115] [Backport #6853]
- * eval.c (rb_yield_0): || should accept exactly zero argument.
+Fri Oct 12 21:55:08 2012 Hiroshi Shirosaki <h.shirosaki@gmail.com>
- * parse.y (stmt): multiple right hand side for single assignment
- (e.g. a = 1,2) is allowed.
+ * include/ruby/win32.h (rb_w32_pow): set floating point precision
+ for mingw-w64 x86 pow(). This improves the precision of pow() on
+ Windows XP for TestFloat#test_round_with_precision failure.
+ [ruby-core:47911] [Bug #7142]
-Wed Nov 29 07:55:29 2000 Yukihiro Matsumoto <matz@ruby-lang.org>
+Fri Oct 12 21:37:25 2012 Hiroshi Shirosaki <h.shirosaki@gmail.com>
- * marshal.c (w_long): dumping long should be smaller than 32bit max.
+ * test/webrick/test_cgi.rb (TestWEBrickCGI#test_cgi): skip a test
+ depending on locale on Windows. ENV[] doesn't work properly if
+ console code page is not equal to file system encoding.
+ [ruby-core:47910] [Bug #7140]
- * marshal.c (w_long): shorter long format for small integers(-123..122).
+Fri Oct 12 20:40:29 2012 Tanaka Akira <akr@fsij.org>
- * marshal.c (r_long): ditto.
+ * process.c (posix_sh_cmds): the command name of colon is ":".
-Tue Nov 28 18:10:51 2000 Yukihiro Matsumoto <matz@ruby-lang.org>
+Fri Oct 12 18:18:03 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * eval.c (rb_mod_define_method): quick hack to implement
- on-the-fly method definition. experimental.
+ * file.c (rb_get_path_check): path name must not contain NUL bytes.
-Mon Nov 27 17:00:35 2000 Yukihiro Matsumoto <matz@ruby-lang.org>
+Fri Oct 12 16:06:20 2012 NAKAMURA Usaku <usa@ruby-lang.org>
- * eval.c (rb_eval): should not redefine builtin classes/modules
- from within wrapped load.
+ * tool/merger.rb: now can merge revision(s) without --ticket again.
-Mon Nov 27 08:57:33 2000 Yukihiro Matsumoto <matz@ruby-lang.org>
+Fri Oct 12 14:10:41 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * eval.c (call_end_proc): should be isolated from outer block.
+ * lib/mkmf.rb (dir_config, init_mkmf): use configured libdir value as
+ default library path. [ruby-core:43726] [Bug #6207]
-Mon Nov 27 00:10:08 2000 Yukihiro Matsumoto <matz@ruby-lang.org>
+Fri Oct 12 05:25:00 2012 Zachary Scott <zzak@ruby-lang.org>
- * io.c (rb_io_ctl): call ioctl/fcntl for fptr->f2 too.
+ * lib/timeout.rb (timeout):
+ Remove paragraph on wrong implementation detail.
+ [ruby-core:47739] [Bug #7088]
- * process.c (rb_f_fork): call rb_thread_atfork() after creating
- child process.
+Thu Oct 11 23:09:46 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * eval.c (rb_thread_atfork): kill all other threads immediately,
- then turn the current thread into the main thread.
+ * string.c (rb_str_sub{seq,pos,str}, rb_str_each_{line,codepoint}):
+ prevent String copies from GC. [ruby-core:47881] [Bug #7135]
-Sat Nov 25 23:12:22 2000 Yukihiro Matsumoto <matz@ruby-lang.org>
+Thu Oct 11 07:40:50 2012 NARUSE, Yui <naruse@ruby-lang.org>
- * eval.c (ruby_run): move calling point of rb_trap_exit after
- cleaning up threads.
+ * iseq.c (insn_operand_intern): cast op to rb_call_info_t* before
+ compare with iseq->callinfo_entries whose type is rb_call_info_t*.
- * eval.c (ruby_finalize): new function to call EXIT trap, END
- procs and GC finalizers.
+Thu Oct 11 03:37:08 2012 Koichi Sasada <ko1@atdot.net>
- * eval.c (rb_exec_end_proc): prevent recursion.
+ * bootstraptest/test_block.rb: add tests for block with super.
- * gc.c (rb_gc_call_finalizer_at_exit): ditto.
+Thu Oct 11 02:54:07 2012 Koichi Sasada <ko1@atdot.net>
- * signal.c (rb_trap_exit): ditto. made static.
+ * vm_dump.c: fix debug prints to catch up recent changes
+ such as VM data structures.
- * process.c (rb_f_fork): should swallow all exceptions from block
- execution.
+Thu Oct 11 02:50:34 2012 Koichi Sasada <ko1@atdot.net>
- * process.c (fork_rescue): should call ruby_finalize().
+ * iseq.c (insn_operand_intern): add support disasm TS_CALLINFO
+ operands.
- * parse.y (yycompile): rb_gc() removed. I don't remember why I put
- this here. test code?
+Wed Oct 10 15:12:48 2012 NAKAMURA Usaku <usa@ruby-lang.org>
-Fri Nov 24 22:03:48 2000 Yukihiro Matsumoto <matz@ruby-lang.org>
+ * test/ruby/test_process.rb (TestProcess#test_execopts_gid): skip on
+ windows because the platform does not have Process.group method.
+ patched by Jon Forums in [ruby-core:47878] [Bug #7133].
- * range.c (EXCL): exclusive infomation is now stored in an
- instance variable. this enables proper marshal dump.
+Tue Oct 9 23:18:03 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * process.c (proc_waitpid): should clear rb_last_status ($?) if
- no pid was given by waitpid(2).
+ * test/ruby/envutil.rb (assert_file, assert_file_not): more
+ descriptive assertions for File predicates.
-Thu Nov 23 01:35:38 2000 Yukihiro Matsumoto <matz@ruby-lang.org>
+Tue Oct 9 18:01:37 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * process.c (proc_waitpid2): returns nil if no pid found.
+ * array.c (rb_ary_sample): use rb_random_ulong_limited, since
+ precision of long may be larger than double.
-Wed Nov 22 23:45:15 2000 Yukihiro Matsumoto <matz@ruby-lang.org>
+ * random.c (rb_random_ulong_limited): new function to return a random
+ value from 0 upto limit as unsigned long, similarly to
+ rb_genrand_ulong_limited but with arbitrary RNG object.
- * range.c (range_eq): new method. Compares start and end of range
- respectively.
+Tue Oct 9 17:13:27 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Wed Nov 22 11:01:32 2000 Yukihiro Matsumoto <matz@ruby-lang.org>
+ * process.c (rb_execarg_addopt, rb_execarg_run_options): add :uid and
+ :gid options. [ruby-core:47414] [Feature #6975]
- * variable.c (rb_mod_class_variables): should honor singleton
- class variable rule defined yesterday.
+Tue Oct 9 14:36:11 2012 Koichi Sasada <ko1@atdot.net>
-Tue Nov 21 23:24:14 2000 Mitsuteru S Nakao <nakao@kuicr.kyoto-u.ac.jp>
+ * iseq.c (iseq_free): fix memory leak.
+ rb_iseq_t::callinfo_entries should be freed.
- * numeric.c (flodivmod): missing second operand (typo).
+Tue Oct 9 14:28:18 2012 Koichi Sasada <ko1@atdot.net>
-Tue Nov 21 03:39:41 2000 Yukihiro Matsumoto <matz@ruby-lang.org>
+ * vm_core.h (rb_call_info_t): add new type `rb_call_info_t'.
+ This data structure contains information including inline method
+ cache. After that, `struct iseq_inline_cache_entry' does not
+ need to contain inline cache for method invocation.
+ Other information will be added to this data structure.
- * marshal.c (marshal_load): marshal format compatibility check
- revised. greater minor revision is UPWARD compatibile;
- downward compatibility is not assured.
+ * vm_core.h (rb_iseq_t): add `callinfo_entries' and `callinfo_size'
+ members to `rb_iseq_t'.
- * eval.c (is_defined): clarify class variable behavior for
- singleton classes. class variables within singleton class
- should be treated like within singleton method.
+ * insns.def, compile.c: Use CALL_INFO instead of IC.
-Mon Nov 20 13:45:21 2000 Yukihiro Matsumoto <matz@ruby-lang.org>
+ * tool/instruction.rb: support CALL_INFO as operand type.
- * eval.c (rb_eval): set ruby_sourceline before evaluating
- exceptions.
+ * vm_insnhelper.c, vm_insnhelper.h: ditto.
- * gc.c (gc_sweep): defer finalization in GC during compilation or
- interrupt prohibit section.
+Sun Oct 7 23:54:33 2012 CHIKANAGA Tomoyuki <nagachika@ruby-lang.org>
- * gc.c (gc_sweep): mark all nodes before sweeping if GC happened
- during compilation.
+ * ext/zlib/zlib.c (zstream_run_func): don't call inflate() when
+ z->stream.avail_in == 0. it return Z_BUF_ERROR.
+ but deflate() could be called with z->stream->avail_in == 0 because
+ it has hidden buffer in z->stream->state (opaque structure).
+ fix for gem install error. [ruby-dev:46149] [Bug #7040]
- * eval.c (rb_eval): should treat class variables specially in a
- method defined in the singleton class.
+Mon Oct 8 23:55:41 2012 Shugo Maeda <shugo@ruby-lang.org>
-Mon Nov 20 10:20:21 2000 WATANABE Hirofumi <eban@ruby-lang.org>
+ * eval.c (rb_mod_refinements): new method Module#refinements.
- * dir.c, win32/win32.c, ruby.h: add rb_iglob().
+ * test/ruby/test_refinement.rb: add new tests for the above changes.
-Mon Nov 20 00:18:16 2000 Yukihiro Matsumoto <matz@ruby-lang.org>
+Mon Oct 8 23:02:19 2012 Shugo Maeda <shugo@ruby-lang.org>
- * array.c (rb_ary_subseq): should return nil for outbound start
- index.
+ * eval.c, gc.c, iseq.c, node.h, vm_insnhelper.c, vm_insnhelper.h,
+ vm_method.c: rename omod and overlaid modules to refinements.
- * marshal.c (marshal_load): show format versions explicitly when
- format version mismatch happens.
+ * eval.c (hidden_identity_hash_new): renamed from identity_hash_new.
-Sun Nov 19 06:13:24 2000 Kazuhiro NISHIYAMA <zn@mbf.nifty.com>
+Sun Oct 7 04:50:00 2012 Zachary Scott <zzak@ruby-lang.org>
- * marshal.c: use long for string/array length.
+ * lib/abbrev.rb: Documentation examples for Abbrev.
+ [ruby-core:47442] [Bug #6985]
- * pack.c (swaps): use bit-or(|) instead of plus(+).
+Sun Oct 7 04:50:00 2012 Zachary Scott <zzak@ruby-lang.org>
- * pack.c (swapl): ditto.
+ * thread.c (rb_thread_aref):
+ Grammar in Thread documentation.
+ Patch by Steve Klabnik [ruby-core:47799] [Bug #7099]
-Sat Nov 18 15:18:16 2000 Kazuhiro NISHIYAMA <zn@mbf.nifty.com>
+Sun Oct 7 04:37:00 2012 Zachary Scott <zzak@ruby-lang.org>
- * array.c (rb_ary_replace): array size should be in long.
+ * string.c (rb_str_match):
+ Clarify behavior for captured strings and local variable assignment
+ Patch by Marcus Stollsteimer [ruby-core:47668] [Bug #7062]
- * array.c (rb_ary_concat): ditto.
+Sat Oct 6 18:31:36 2012 Shugo Maeda <shugo@ruby-lang.org>
- * array.c (rb_ary_hash): ditto.
+ * vm_opts.h (OPT_GLOBAL_METHOD_CACHE): new build option to
+ enable/disable global method caching. [ruby-dev:46203] [Bug #7111]
-Sat Nov 18 14:07:20 2000 Minero Aoki <aamine@dp.u-netsurf.ne.jp>
+ * vm_method.c (rb_method_entry_get_with_omod): don't use global
+ method cache if OPT_GLOBAL_METHOD_CACHE is 0.
- * lib/net/http.rb: Socket#readline() reads until "\n", not "\r\n"
+Sat Oct 6 16:32:04 2012 Shugo Maeda <shugo@ruby-lang.org>
-Fri Nov 17 14:55:18 2000 WATANABE Hirofumi <eban@ruby-lang.org>
+ * vm_method.c (search_method): check omod only once for performance.
- * string.c (rb_str_succ): output should be NUL terminated.
+Sat Oct 6 09:42:04 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Fri Nov 17 02:54:15 2000 Yukihiro Matsumoto <matz@ruby-lang.org>
+ * enc/encdb.c, enc/utf_16_32.h (ENC_DUMMY_UNICODE): endian-less wide
+ UTF encodings are dummy but Unicode.
- * io.c (rb_io_close): need not to flush before closing.
+ * encoding.c (rb_encdb_set_unicode): set Unicode flag.
- * eval.c (rb_thread_join): should preserve last thread status when
- THREAD_TO_KILL.
+ * template/encdb.h.tmpl: allow ENC_DUMMY variants.
- * eval.c (rb_thread_stop): ditto.
+ * encoding.c (rb_enc_unicode_p): oniguruma provides Unicode flag.
- * io.c (io_fflush): wrap fflush by TRAP_BEG, TRAP_END.
+Fri Oct 5 17:18:42 JST 2012 TAKANO Mitsuhiro <tak@no32.tk>
- * eval.c (rb_eval): method defined within singleton class
- definition should behave like singleton method about class
- variables.
+ * template/Doxyfile.tmpl: remove SHOW_DIRECTORIES and
+ HTML_ALIGN_MEMBERS lines. They have been obsolete in
+ Doxygen version 1.8.2.
+
+Fri Oct 05 15:26:18 2012 Koichi Sasada <ko1@atdot.net>
+
+ * ext/objspace/objspace.c: add ObjectSpace#reachable_objects_from.
+ This method returns an array of objects referenced by given object.
+ If given object is special objects such as true/false/nil/Fixnum etc
+ then it returns nil. See rdoc for details.
+ [ruby-core:39772]
+
+ * test/objspace/test_objspace.rb: add a test for this method.
+
+ * gc.c: add rb_objspace_reachable_objects_from().
+ To make this function, add several member `mark_func_data'
+ to rb_objspace_t. If mark_func_data is not null, then
+ gc_mark() calls mark_func_data::mark_func.
+
+ * gc.h: export rb_objspace_reachable_objects_from().
+
+Thu Oct 4 23:40:04 2012 Narihiro Nakamura <authornari@gmail.com>
+
+ * gc.c (init_heap): call init_mark_stack before to allocate
+ altstack. This change avoid the stack overflow at the signal
+ handler on 32bit, but I don't understand reason... [Feature #7095]
+
+Thu Oct 4 22:39:27 2012 Koichi Sasada <ko1@atdot.net>
+
+ * insns.def (getlocal, setlocal): remove old getlocal/setlocal
+ instructions and rename getdaynmic/setdynamic instructions
+ to getlocal/setlocal.
+
+ * compile.c: ditto.
+
+ * iseq.c: remove TS_DINDEX.
+
+ * vm_exec.h (dindex_t): remove type definition of `dindex_t'.
+
+ * tool/instruction.rb: ditto.
+
+Thu Oct 4 21:44:17 2012 Koichi Sasada <ko1@atdot.net>
+
+ * vm.c (vm_analysis_insn|operand|register): use st_insert
+ instead of using rb_hash_aset() because rb_hash_aset()
+ check $SAFE.
+
+Thu Oct 4 21:15:26 2012 Koichi Sasada <ko1@atdot.net>
+
+ * vm.c (VM_COLLECT_USAGE_DETAILS): make new VM usage analysis
+ hooks (old macro name is COLLECT_USAGE_ANALYSIS).
+ This feature is only for VM developers. (I'm not sure I can use
+ `VM developers' (the plural form) in this sentence).
+ If VM_COLLECT_USAGE_DETAILS is not 0, VM enables the following
+ usage collection features:
+ (1) instruction: collect instruction usages.
+ (2) operand: collect operand usages.
+ (3) register: collect register usages.
+ The results are stored in
+ RubyVM::USAGE_ANALYSIS_INSN for (1, 2),
+ RubyVM::USAGE_ANALYSIS_INSN_BIGRAM for (1) and
+ RubyVM::USAGE_ANALYSIS_REGS for (3).
+ You can stop collecting usages with
+ RubyVM::USAGE_ANALYSIS_INSN_STOP(),
+ RubyVM::USAGE_ANALYSIS_OPERAND_STOP(),
+ RubyVM::USAGE_ANALYSIS_REGISTER_STOP()
+ for (1), (2), (3) respectively.
+ You can also change the hook functions by setting
+ C level global variables
+ `ruby_vm_collect_usage_func_(insn|operand|register)'
+ for (1), (2), (3) respectively.
+ See codes for more details.
+
+ * tool/instruction.rb: fix macro names.
+
+ * iseq.c (insn_operand_intern): make it export (used in vm.c).
+ fix to skip several processes if not needed (pointer is 0).
+
+ * vm_dump.c: move codes for collection features to vm.c.
+
+ * vm_exec.h: rename macro and function names.
+
+ * vm_insnhelper.h: ditto.
+
+Thu Oct 4 18:59:14 2012 Koichi Sasada <ko1@atdot.net>
+
+ * test/ruby/test_settracefunc.rb (test_tracepoint):
+ remove unused test case.
+ (this test case is redefined by newer tests)
+
+Thu Oct 4 17:24:51 2012 Narihiro Nakamura <authornari@gmail.com>
+
+ * gc.c (rb_objspace_call_finalizer): call gc_mark_stacked_objects
+ at suitable point.
+
+Thu Oct 4 16:31:29 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * gc.c (rb_objspace_call_finalizer): mark self-referencing finalizers
+ before run finalizers, to fix SEGV from btest on 32bit.
+
+ * gc.c (gc_mark_stacked_objects): extract from gc_marks().
+
+Thu Oct 4 11:43:28 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * thread_pthread.c (ruby_init_stack): round stack limit to page size
+ boundary to calculate stack size more precisely. [ruby-dev:46174]
+ [Bug #7084]
+
+Wed Oct 3 19:51:57 2012 Narihiro Nakamura <authornari@gmail.com>
+
+ * gc.c: Use the non-recursive marking instead of recursion. The
+ recursion marking of CRuby needs checking stack overflow and the
+ fail-safe system, but these systems not good at partial points,
+ for example, marking deep tree structures. [ruby-dev:46184]
+ [Feature #7095]
+
+ * configure.in (GC_MARK_STACKFRAME_WORD): removed. It's used by
+ checking stack overflow of marking.
+
+ * win32/Makefile.sub (GC_MARK_STACKFRAME_WORD): ditto.
+
+Wed Oct 3 15:33:02 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * thread_pthread.c (ruby_init_stack): use getrlimit() for the main
+ thread on Mac OS X, since pthread_get_stack{addr,size}_np()
+ return the default value always, but not the ulimit value.
+ [ruby-dev:46174] [Bug #7084]
+
+Wed Oct 3 11:43:15 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * io.c (rb_io_reopen): improvement to accept optional arguments.
+ a patch by Glass_saga (Masaki Matsushita) in [ruby-core:47806].
+ [Feature #7103]
+
+Wed Oct 3 04:36:11 2012 Eric Hodel <drbrain@segment7.net>
+
+ * ext/openssl/ossl_x509store.c (ossl_x509store_add_file): Added
+ documentation
+ * ext/openssl/ossl_x509store.c (ossl_x509store_set_default_paths):
+ ditto
+ * ext/openssl/ossl_x509store.c (ossl_x509store_add_cert): ditto
+
+Wed Oct 3 02:23:37 2012 Shugo Maeda <shugo@ruby-lang.org>
+
+ * error.c (exc_to_s, name_err_to_s, name_err_mesg_to_str): do not
+ taint messages.
+
+Tue Oct 2 16:47:06 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * eval.c (identity_hash_new): hide internal hashes for refinements.
+
+ * eval.c (rb_mod_refine): no default value.
+
+Mon Oct 1 22:54:02 2012 Shugo Maeda <shugo@ruby-lang.org>
+
+ * eval.c (identity_hash_new): new function to create a new identity
+ hash.
+
+ * eval.c (rb_overlay_module, rb_mod_using, rb_mod_refine): use
+ identity_hash_new().
+
+Mon Oct 1 02:34:53 2012 Akinori MUSHA <knu@iDaemons.org>
+
+ * configure.in (--with-opt-dir): Make this also work on DLDFLAGS
+ so LIBRUBY_SO links fine with libexecinfo installed in a
+ non-system directory.
+
+Sun Sep 30 23:32:00 2012 Kenta Murata <mrkn@mrkn.jp>
+
+ * vm_dump.c (rb_vm_bugreport): add /Library/Logs/DiagnosticReports
+ in the list of locations of crash reports.
+
+Sun Sep 30 21:18:03 2012 NARUSE, Yui <naruse@ruby-lang.org>
+
+ * string.c (rb_str_concat): use memcpy to copy a string which contains
+ NUL characters. [ruby-core:47751] [Bug #7090]
+
+Sat Sep 29 19:41:53 2012 Hiroshi Shirosaki <h.shirosaki@gmail.com>
+
+ * test/ruby/envutil.rb (EnvUtil#invoke_ruby): kill child process
+ before Timeout::Error is raised. rmdir of mktmpdir fails with
+ EACCES if child process is alive on Windows.
+
+ * test/thread/test_queue.rb (TestQueue): increase timeout.
+ This test takes long time on Windows XP.
+
+Sat Sep 29 19:41:33 2012 Hiroshi Shirosaki <h.shirosaki@gmail.com>
+
+ * test/net/http/test_http.rb (TestNetHTTP#test_proxy_address):
+ clear environment variables. If http_proxy environment variable was
+ set, the test failed.
+
+ * test/net/http/test_http.rb (TestNetHTTP#test_proxy_port): ditto.
+
+Sat Sep 29 19:41:11 2012 Hiroshi Shirosaki <h.shirosaki@gmail.com>
+
+ * test/drb/drbtest.rb (DRbCore#teardown):
+ Use Process.kill :KILL on Windows because Process.kill :INT silently
+ fails on Windows 7 and raises EINVAL on Windows XP for spawned
+ process with new_pgroup: false.
+
+ * test/drb/drbtest.rb (DRbAry#teardown): ditto.
+
+Sat Sep 29 19:40:32 2012 Hiroshi Shirosaki <h.shirosaki@gmail.com>
+
+ * test/ruby/test_unicode_escape.rb (TestUnicodeEscape#test_basic):
+ set script encoding to work with LANG=C. It would work on both
+ Windows and Unix. Refix of r37051.
+
+Sat Sep 29 11:21:06 2012 Shugo Maeda <shugo@ruby-lang.org>
+
+ * vm_insnhelper.c (rb_vm_using_modules): use using_modules before
+ klass to fix method lookup order, and use klass even if klass is
+ not a module to make refinements in class_eval invoked on classes
+ work.
+
+ * eval.c (rb_using_module): accept a class as the second argument.
+
+ * eval.c (rb_mod_using, f_using): raise a TypeError if the argument
+ is not a module.
+
+ * test/ruby/test_refinement.rb: add new tests for the above changes.
+
+Sat Sep 29 02:18:57 2012 Hiroshi Shirosaki <h.shirosaki@gmail.com>
+
+ * test/ruby/test_unicode_escape.rb (TestUnicodeEscape#test_basic):
+ Use ruby only on Windows since the test fails on Unix with LANG=C.
+ [ruby-core:47709] [Bug #7076]
+
+Fri Sep 28 22:19:31 2012 Hiroshi Shirosaki <h.shirosaki@gmail.com>
+
+ * test/ruby/test_unicode_escape.rb (TestUnicodeEscape#test_basic):
+ echo command doesn't work properly against non-ascii character on
+ Windows with chcp 437. Instead we use ruby.
+ [ruby-core:47709] [Bug #7076]
+
+Fri Sep 28 17:54:31 2012 Koichi Sasada <ko1@atdot.net>
+
+ * vm_insnhelper.c (vm_setup_method): refactoring.
+ Remove src_argc and use iseq->arg_size directly.
+
+Fri Sep 28 17:26:27 2012 NARUSE, Yui <naruse@ruby-lang.org>
+
+ * lib/rubygems/installer.rb (check_that_user_bin_dir_is_in_path):
+ test_generate_bin_bindir_with_user_install_warning(TestGemInstaller)
+ fails on Windows with msys bash. It makes comparing paths
+ case-insensitive.
+ pick from upstream to fix a failure of test-all [ruby-core:47711]
+ https://github.com/rubygems/rubygems/commit/c474edb2f3704206f04da1c8c6cf9fb079d84abe
+
+Fri Sep 28 15:44:45 2012 Shugo Maeda <shugo@ruby-lang.org>
+
+ * vm_method.c (search_method): copy refinement iclasses to search
+ superclasses correctly.
+
+ * test/ruby/test_refinement.rb: related test.
+
+Fri Sep 28 15:15:41 2012 Koichi Sasada <ko1@atdot.net>
+
+ * insns.def (opt_checkenv): remove unused instruction `opt_checkenv'.
+
+ * compile.c (iseq_compile_each): ditto.
+
+ * node.h: remove unused node `NODE_OPTBLOCK'.
+
+ * ext/objspace/objspace.c, gc.c (gc_mark_children): ditto.
+
+Fri Sep 28 13:14:34 2012 Koichi Sasada <ko1@atdot.net>
+
+ * vm_core.h: now VM_DEBUG_BP_CHECK should be 1.
+
+Fri Sep 28 12:51:54 2012 Koichi Sasada <ko1@atdot.net>
+
+ * vm_core.h: remove rb_control_frame_t::bp (bp: base pointer).
+ `bp' can be calculate by `sp' (stack pointer) of previous frame.
+ Now, `bp_check' field is remained for debug. You can eliminate
+ this field by setting VM_DEBUG_BP_CHECK as 0.
+
+ * vm_insnhelper.c (vm_base_ptr): add `vm_base_ptr(cfp).
+ This function calculates base pointer from cfp.
+
+ * vm_insnhelper.c (vm_setup_method): push `recv' value on top of
+ value stack (before method parameters).
+ This change is for keeping consistency with normal method dispatch.
+
+ * insns.def: fix to use vm_base_ptr().
+
+ * vm.c (vm_exec): ditto.
+
+ * vm_dump.c: remove `bp' related dumps.
+
+ * cont.c (fiber_init): fix to check VM_DEBUG_BP_CHECK.
+
+Fri Sep 28 10:40:51 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * io.c (rb_io_reopen): accept File::Constants as well as mode string.
+ based on the patch by Glass_saga (Masaki Matsushita) in
+ [ruby-core:47694]. [Feature #7067]
+
+Thu Sep 27 18:36:51 2012 Shugo Maeda <shugo@ruby-lang.org>
+
+ * eval.c (rb_overlay_module, rb_mod_refine): accept a module as the
+ argument of Module#refine.
+
+ * vm_method.c (search_method): if klass is an iclass, lookup the
+ original module of the iclass in omod in order to allow
+ refinements of modules.
+
+ * test/ruby/test_refinement.rb: add tests for the above changes.
+
+Thu Sep 27 18:12:20 2012 Aaron Patterson <aaron@tenderlovemaking.com>
+
+ * ext/syslog/lib/syslog/logger.rb: add a formatter to the
+ Syslog::Logger object. [Bug #7065]
+ * test/syslog/test_syslog_logger.rb: ditto.
+
+Wed Sep 26 16:39:57 2012 Koichi Sasada <ko1@atdot.net>
+
+ * insns.def: add new instruction `opt_empty_p' for optimize `empty?'
+ method. Apply a patch proposed at [ruby-dev:46120]
+ [ruby-trunk - Feature #6972] by Glass_saga (Masaki Matsushita).
+
+ * compile.c (iseq_specialized_instruction), vm.c, vm_insnhelper.h:
+ ditto.
+
+ * id.c, template/id.h.tmpl: ditto.
+
+ * test/ruby/test_optimization.rb: test for this changes.
+
+Tue Sep 25 09:59:26 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * insns.def (invokesuper): klass in cfp is not valid in at_exit and
+ END blocks. [ruby-core:47680] [Bug #7064]
+
+Tue Sep 25 08:11:11 2012 NARUSE, Yui <naruse@ruby-lang.org>
+
+ * iseq.c (rb_iseq_defined_string): the index of defined_strings must
+ be the value of type - 1.
+
+Mon Sep 24 17:36:51 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * compile.c (defined_expr), insns.def (defined): share single frozen
+ strings. [EXPERIMENTAL] [ruby-core:47558][Feature #7035]
+
+ * iseq.c (rb_iseq_defined_string): make expression strings.
+
+Mon Sep 24 11:22:36 2012 NARUSE, Yui <naruse@ruby-lang.org>
+
+ * tool/merger.rb: add --ticket option to add ticket number.
+
+Sun Sep 23 21:51:59 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * lib/mkmf.rb (String#unspace): unescape with backslashes. normal
+ makes need to escape spaces with backslashes. nmake is not the
+ case. [Bug #7036]
+
+ * lib/mkmf.rb (create_makefile): use timestamp file dependencies for
+ directories.
+
+ * lib/mkmf.rb: unexpand macros.
+
+ * lib/mkmf.rb (LIBPATHFLAG): no needs to escape library path here.
+
+ * lib/mkmf.rb (MakeMakefile#configuration): make prefix paths
+ internal to deal with in Makefile.
+
+ * lib/mkmf.rb (MakeMakefile#mkintpath): not a global function now.
+
+Sun Sep 23 02:33:37 2012 Benoit Daloze <eregontp@gmail.com>
+
+ * complex.c: Fix examples of r36993.
+ Keep the simple definition, mathematics define the result.
+ Based on patch by Robin Dupret. Fixes #188 on github.
+
+Sat Sep 22 07:15:00 2012 Zachary Scott <zzak@ruby-lang.org>
+
+ * ext/ripper/lib/ripper.rb:
+ Match sample output to Ripper.sexp from current trunk version.
+ [Bug #6929]
+
+Thu Sep 20 23:05:11 2012 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
+
+ * thread_pthread.c (native_cond_initialize): destroy condattr
+ after using it. Patch by Stanislav Sedov. Thank you.
+ [Bug #7041] [ruby-core:47619]
+
+Thu Sep 20 22:53:02 2012 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
+
+ * thread_pthread.c (native_cond_initialize): clean up #ifdef condition.
+
+Thu Sep 20 16:42:44 2012 NARUSE, Yui <naruse@ruby-lang.org>
+
+ * lib/drb/ssl.rb (DRb::DRbSSLSocket::SSLConfig::DEFAULT): add
+ SSLTmpDhCallback for configuration option.
+
+ * lib/drb/ssl.rb (setup_ssl_context): copy the value of tmp_dh_callback.
+
+ * test/drb/ut_array_drbssl.rb: set tmp_dh_callback to suppress warning.
+
+ * test/drb/ut_drb_drbssl.rb: ditto.
+
+Thu Sep 20 10:56:08 2012 NAKAMURA Usaku <usa@ruby-lang.org>
+
+ * test/drb/ut_drb.rb: revert a part of r36987, and get rid of a warning
+ with another method. if the substitution is removed, the ExtSrv
+ object will be GC'ed and some tests will be blocked.
+
+Thu Sep 20 07:20:00 2012 Zachary Scott <zzak@ruby-lang.org>
+
+ * complex.c: Examples for Complex Documentation.
+ Patch by Robin Dupret.
+ Fixes #184 on github.
+
+Thu Sep 20 07:15:00 2012 Zachary Scott <zzak@ruby-lang.org>
+
+ * ext/ripper/lib/ripper.rb: Documentation for Ripper.
+ +:void_stmt+ is meaningless
+ [Bug #6929] [ruby-core:47507]
+
+Thu Sep 20 07:05:00 2012 Zachary Scott <zzak@ruby-lang.org>
+
+ * lib/csv.rb (Object#CSV, Array#to_csv, String#parse_csv):
+ Examples and documentation for CSV.
+ [Bug #6880] [ruby-core:47218]
+
+Thu Sep 20 00:42:20 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * array.c (take_items), enum.c (enum_zip): raise TypeError at
+ non-enumerable objects, not NoMethodError. [ruby-dev:46145]
+ [Bug #7038]
+
+ * vm_eval.c (rb_check_block_call): check_funcall variant with block
+ function.
+
+Tue Sep 18 17:51:29 2012 NARUSE, Yui <naruse@ruby-lang.org>
+
+ * ext/openssl/ossl_ssl.c (ossl_sslctx_attrs): add npn_select_db to
+ suppress warning: instance variable @npn_select_cb not initialized
+
+Sun Sep 16 17:47:00 2012 Eric Hodel <drbrain@segment7.net>
+
+ * tool/change_maker.rb: Update svn detection for subversion 1.7's
+ single .svn directory.
+
+Sun Sep 16 11:39:12 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * io.c (io_set_read_length): if the read length equals to the buffer
+ string size then nothing to do. or ensure the string modifiable
+ before setting the length only when the former is shorter. based on
+ the patch in [ruby-core:47541] by Hiroshi Shirosaki.
+ [ruby-core:46586] [Bug #6764]
+
+Sun Sep 16 08:57:52 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * configure.in (strict_warnflags): separate strict flags from
+ warnflags only for core. [ruby-dev:46105]
+
+Sun Sep 16 08:16:05 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * .editorconfig: add. [ruby-core:47548] [Feature #7030]
+
+Sat Sep 15 01:56:40 2012 NARUSE, Yui <naruse@ruby-lang.org>
+
+ * ext/nkf/nkf-utf8/nkf.c: Merge upstream: 50a383c84.
+ [ruby-dev:46128] [Bug #7005]
+
+Sat Sep 15 00:20:04 2012 NARUSE, Yui <naruse@ruby-lang.org>
+
+ * ext/nkf/nkf.c (rb_nkf_convert): suppress warning.
+
+Fri Sep 14 04:05:00 2012 Zachary Scott <zzak@ruby-lang.org>
+
+ * array.c (rb_ary_diff, rb_ary_uniq):
+ Enhance documentation for array uniqueness
+ Based on a patch by Robin Dupret
+ [Bug #6872] [ruby-core:47209]
+
+Fri Sep 14 03:30:00 2012 Zachary Scott <zzak@ruby-lang.org>
+
+ * array.c (rb_ary_select):
+ Update documentation for Array#select
+ * enum.c (enum_find_all, enum_reject):
+ Update documentation for Enumerable#find_all and Enumerable#reject
+ Based on a patch by Jeff Saracco
+ [Bug #6908] [ruby-core:47285] [Fixes #166 on github]
+
+Fri Sep 14 00:20:00 2012 Zachary Scott <zzak@ruby-lang.org>
+
+ * signal.c (rb_f_kill):
+ Update documentation for Process.kill to reflect kill(2)
+ Patch by Richo Healey
+
+Thu Sep 13 21:40:49 2012 Hiroshi Shirosaki <h.shirosaki@gmail.com>
+
+ * lib/securerandom.rb (SecureRandom.random_bytes):
+ Use 64bit value as pointer for Windows x64 to fix SystemCallError.
+
+ * lib/securerandom.rb (SecureRandom.lastWin32ErrorMessage):
+ Set proper encoding to avoid invalid byte sequence error.
+ [ruby-core:47451] [Bug #6990]
+
+Thu Sep 13 11:20:00 2012 Zachary Scott <zzak@ruby-lang.org>
+
+ * lib/optparse.rb: Remove unreachable email address from documentation
+ [Bug #6996] [ruby-core:47459]
+
+Thu Sep 13 11:20:00 2012 Zachary Scott <zzak@ruby-lang.org>
+
+ * lib/xmlrpc.rb: Documentation for XMLRPC
+ * lib/xmlrpc/datetime.rb: ditto.
+ * lib/xmlrpc/parser.rb: ditto.
+ * lib/xmlrpc/client.rb: ditto.
+ * lib/xmlrpc/utils.rb: ditto.
+ * lib/xmlrpc/README.rdoc: ditto.
+ * lib/xmlrpc/create.rb: ditto.
+ * lib/xmlrpc/base64.rb: ditto.
+ * lib/xmlrpc/config.rb: ditto.
+ * lib/xmlrpc/httpserver.rb: ditto.
+ * lib/xmlrpc/server.rb: ditto.
+ * lib/xmlrpc/marshal.rb: ditto.
+ * lib/xmlrpc/README.txt: ditto.
+ [Bug #6909] [ruby-core:47286]
+
+Thu Sep 13 10:22:11 2012 Takashi Toyoshima <toyoshim@gmail.com>
+
+ * configure.in: Don't use PIE on Haiku because loader support is not
+ enough.
+
+Thu Sep 13 08:20:00 2012 Zachary Scott <zzak@ruby-lang.org>
+
+ * lib/shellwords.rb: Documentation for Shellwords.
+
+Thu Sep 13 08:00:00 2012 Zachary Scott <zzak@ruby-lang.org>
+
+ * ext/ripper/lib/ripper.rb: Documentation for Ripper.
+ * ext/ripper/lib/ripper/lexer.rb: ditto.
+ * ext/ripper/lib/ripper/sexp.rb: ditto.
+ * ext/ripper/lib/ripper/filter.rb: ditto.
+ * ext/ripper/lib/ripper/core.rb: ditto.
+ [Bug #6929] [ruby-core:47309]
+
+Wed Sep 12 22:59:07 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * vm_insnhelper.c (vm_method_missing, vm_call_method): reuse arguments
+ on the VM stack and get rid of ALLOCA.
+
+Wed Sep 12 22:45::00 2012 Zachary Scott <zzak@ruby-lang.org>
+
+ * ext/pathname/lib/pathname.rb: Documentation for Pathname.
+ * ext/pathname/pathname.c: ditto.
+ [Bug #6947] [ruby-core:47354]
+
+Mon Sep 10 10:19:34 2012 NAKAMURA Usaku <usa@ruby-lang.org>
+
+ * enc/depend: fixed wrong change in a part of r34802.
+
+Sun Sep 9 22:02:50 2012 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
+
+ * ext/socket/basicsocket.c (rsock_bsock_send):
+ avoid unnecessary select() calls before doing I/O
+ Patch by Eric Wong. [Feature #4538] [ruby-core:35586]
+ * ext/socket/init.c (rsock_s_recvfrom): ditto.
+ * ext/socket/init.c (rsock_s_accept): ditto.
+ * ext/socket/udpsocket.c (udp_send): ditto.
+ * io.c (io_fflush): ditto.
+ * io.c (io_binwrite): ditto.
+ * io.c (rb_io_syswrite): ditto.
+
+Mon Sep 10 01:38:51 2012 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
+
+ * io.c (nogvl_close, maygvl_close, nogvl_fclose, maygvl_fclose):
+ suppress integer <-> pointer cast warnings.
+ [Feature #4570] [ruby-core:35711]
+
+Mon Sep 10 01:36:00 2012 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
+
+ * io.c (rb_io_close): notify fd close before releasing gvl.
+ * io.c (fptr_finalize): modify fptr->mode before releasing gvl.
+ remove unnecessary rb_thread_fd_close().
+ [Feature #4570] [ruby-core:35711]
+
+Mon Sep 10 00:16:34 2012 NARUSE, Yui <naruse@ruby-lang.org>
+
+ * process.c: exec() requires to be single threaded also on Haiku.
+ by Takashi Toyoshima <toyoshim@gmail.com>
+ https://github.com/ruby/ruby/pull/178
+
+Sun Sep 9 21:21:15 2012 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
+
+ * lib/thread.rb (Queue#pop): Fixed double registration issue when
+ mutex.sleep is interrupted. [Bug #5258] [ruby-dev:44448]
+ * lib/thread.rb (SizedQueue#push): ditto.
+
+ * test/thread/test_queue.rb (test_sized_queue_and_wakeup,
+ test_queue_pop_interrupt, test_sized_queue_pop_interrupt,
+ test_sized_queue_push_interrupt): new tests.
+
+Sun Sep 9 20:20:31 2012 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
+
+ * lib/sync.rb (Sync_m#sync_lock): Fixed wakeup/raise unsafe code.
+ Patched by Masaki Matsushita. [Bug #5355] [ruby-dev:44521]
+
+ * test/thread/test_sync.rb (test_sync_lock_and_wakeup,
+ test_sync_upgrade_and_wakeup, test_sync_lock_and_raise):
+ new test.
+
+Sun Sep 9 18:39:46 2012 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
+
+ * include/ruby/intern.h (rb_thread_blocking_region): Added
+ a comment of recommended alternative way.
+
+Sun Sep 9 18:37:05 2012 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
+
+ * lib/sync.rb (Sync_m): Removed RCS_ID.
+
+Sun Sep 9 18:21:03 2012 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
+
+ * test/ruby/test_io.rb (test_advise_pipe): new test to check
+ io.advise() against anonymous io object don't make crash.
+ made by Eric Wong. [Bug #6081] [ruby-core:42880]
+
+Sun Sep 9 16:47:12 2012 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
+
+ * io.c (nogvl_close, maygvl_close, nogvl_fclose, maygvl_fclose):
+ new functions.
+ * io.c (fptr_finalize): release GVL if possible.
+ Patched by Eric Wong. [Feature #4570] [ruby-core:35711]
+
+Sun Sep 9 16:08:48 2012 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
+
+ * io.c (io_bufread): removed unnecessary rb_thread_wait_fd().
+ Patch by Eric Wong. [Bug #6629] [ruby-core:45789]
+ * io.c (rb_io_sysread): ditto.
+ * io.c (copy_stream_fallback_body): ditto.
+
+Sun Sep 9 15:21:52 2012 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
+
+ * thread.c (rb_mutex_lock): stop multiple threads use
+ pthread_cond_timedwait() concurrently. [Bug #6278] [ruby-core:44275]
+
+Sat Sep 8 18:52:22 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * internal.h (struct rb_classext_struct): move allocator function into
+ rb_classext_t from ordinary method table. [ruby-dev:46121]
+ [Feature #6993]
+
+ * object.c (rb_obj_alloc): call allocator function directly.
+
+ * vm_method.c (rb_define_alloc_func, rb_undef_alloc_func)
+ (rb_get_alloc_func): use allocator function in rb_classext_t.
+
+Fri Sep 7 01:21:51 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * ext/extmk.rb (extmake), lib/mkmf.rb (have_framework): fix splitting
+ options with an argument, not using NUL as special character.
+ [ruby-core:47447] [Bug #6987]
+
+Thu Sep 6 14:49:49 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * .gdbinit (rp): FLONUM support.
+
+ * include/ruby/ruby.h (ruby_special_consts): define FLONUM constants
+ always, so that they are available from gdb.
+
+ * include/ruby/ruby.h (RB_FLOAT_TYPE_P): merge FLONUM and non-FLONUM
+ versions. inline TYPE() comparison and FLONUM_P() should be
+ optimized away on non-FLONUM.
+
+Thu Sep 6 08:20:55 2012 Ryan Davis <ryand-ruby@zenspider.com>
+
+ * lib/minitest/*: Imported minitest 3.4.0 (r7762)
+ * test/minitest/*: ditto
+
+Wed Sep 5 19:20:53 2012 NAKAMURA Usaku <usa@ruby-lang.org>
+
+ * parse.y (rb_warn4S): renamed from rb_warn4(), because the case in
+ r36911 takes a string.
+
+ * parse.y (rb_warn4S): use ripper_warnS() for ripper.
+
+ * parse.y (ripper_warnS): now it is used.
+
+Wed Sep 5 15:51:52 2012 URABE Shyouhei <shyouhei@ruby-lang.org>
+
+ * .travis.yml (notifications): [experimental] update notification
+ template.
+
+Wed Sep 5 15:21:12 2012 NARUSE, Yui <naruse@ruby-lang.org>
+
+ * parse.y (rb_warn4): added as a rb_warn variant to warn with explicit
+ source file name and line in parse.y.
+
+ * parse.y (warn_unused_var): use rb_warn4 to suppress warning on ripper.
+
+Wed Sep 5 13:30:04 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * dir.c (glob_make_pattern): names under recursive need to be single
+ basenames to match for each name. [ruby-core:47418] [Bug #6977]
+
+Tue Sep 4 20:55:17 2012 Hiroshi Shirosaki <h.shirosaki@gmail.com>
+
+ * test/ruby/envutil.rb (EnvUtil#invoke_ruby): show Timeout::Error
+ instead of IOError if the timeout has expired.
+
+ * test/test_pstore.rb
+ (PStoreTest#test_pstore_files_are_accessed_as_binary_files):
+ increase timeout because this test is slow on Windows.
+ [ruby-core:47402] [Bug #6965]
+
+Tue Sep 4 11:28:57 2012 URABE Shyouhei <shyouhei@ruby-lang.org>
+
+ * vm_eval.c (ruby_eval_string_from_file_protect): initializer
+ element is not computable at load time.
+
+Tue Sep 4 07:48:35 2012 Martin Bosslet <Martin.Bosslet@googlemail.com>
+
+ * test/openssl/test_asn1_rb:
+ test/openssl/test_ssl_session.rb:
+ test/openssl/test_x509name.rb:
+ test/openssl/test_buffering.rb:
+ test/openssl/test_x509cert.rb:
+ test/openssl/test_ssl.rb: Refactor code that leads to warnings on
+ Ruby CI.
+
+Tue Sep 4 07:02:56 2012 Martin Bosslet <Martin.Bosslet@googlemail.com>
+
+ * test/openssl/utils.rb: Use DSS1 as DSA signature digest for all
+ OpenSSL versions < 1.0.0.
+ [Feature #6946] [ruby-core:47405]
+
+Mon Sep 3 21:22:37 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * include/ruby/ruby.h (rb_float_value): suppress warnings.
+ [ruby-core:47406][Bug #6971]
+
+Mon Sep 3 14:49:03 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * lib/matrix.rb (Vector#magnitude): accumulate squares of absolute
+ values to fix for complex vector. [ruby-dev:46100] [Bug #6966]
+
+Mon Sep 3 10:09:36 2012 Martin Bosslet <Martin.Bosslet@googlemail.com>
+
+ * ext/openssl/extconf.rb: Detect OpenSSL_FIPS macro
+ ext/openssl/ossl.c: Expose OpenSSL::OPENSSL_FIPS constant to
+ indicate whether OpenSSL runs in FIPS mode.
+ test/openssl/test_pkey_dh.rb: Generate 256 bit keys for
+ non-FIPS installations to improve test performance (e.g. for
+ rubyci).
+ test/openssl/utils.rb: Replace DSS1 as certificate signature
+ digest with SHA1 for FIPS installations when using DSA by
+ introducing TestUtils::DSA_SIGNATURE_DIGEST.
+ test/openssl/test_x509cert.rb:
+ test/openssl/test_x509crl.rb:
+ test/openssl/test_x509req.rb: Use DSA_SIGNATURE_DIGEST
+ NEWS: Introduce OpenSSL::OPENSSL_FIPS
+
+ These changes allow running the OpenSSL tests in FIPS mode
+ while keeping a high performance for non-FIPS installations.
+ Introduction of OpenSSL::OPENSSL_FIPS allows for applications
+ to react to special requirements when using OpenSSL in FIPS mode.
+ [Feature #6946] [ruby-core:47345]
+
+Sun Sep 2 21:46:28 2012 Martin Bosslet <Martin.Bosslet@googlemail.com>
+
+ * test/openssl/utils.rb: Use a cached DH key instead of generating a
+ new one each time.
+
+Sun Sep 2 05:41:28 2012 NARUSE, Yui <naruse@ruby-lang.org>
+
+ * lib/webrick/ssl.rb (WEBrick::Config::SSL): add new key
+ SSLTmpDhCallback to set SSLContext#tmp_dh_callback.
+
+ * lib/webrick/ssl.rb (WEBrick::GenericServer#setup_ssl_context):
+ follow above.
+
+Sat Sep 1 18:50:50 2012 Akinori MUSHA <knu@iDaemons.org>
+
+ * lib/set.rb (#initialize_copy, #eql): Use instance_variable_get
+ instead of instance_eval.
+
+Fri Aug 31 21:47:56 2012 Kouhei Sutou <kou@cozmixng.org>
+
+ * lib/test/unit/test-unit.gemspec: Make test/unit default gem.
+ [Feature #6875] [ruby-dev:46051]
+
+Fri Aug 31 18:35:02 2012 Martin Bosslet <Martin.Bosslet@googlemail.com>
+
+ * ext/openssl/extconf.rb: Check existence of OPENSSL_NPN_NEGOTIATED.
+ ext/ossl_ssl.c: Support Next Protocol Negotiation. Protocols to be
+ advertised by the server can be set in the SSLContext by using
+ SSLContext#npn_protocols=, protocol selection on the client is
+ supported by providing a selection callback with
+ SSLContext#npn_select_cb. The protocol that was finally negotiated
+ is available through SSL#npn_protocol.
+ test/openssl/test_ssl.rb: Add tests for Next Protocol Negotiation.
+ NEWS: add news about NPN support.
+ [Feature #6503] [ruby-core:45272]
+
+Fri Aug 31 17:38:43 2012 Akinori MUSHA <knu@iDaemons.org>
+
+ * lib/set.rb (Set#{each,reject!,select!}, SortedSet#each): Pass
+ the original block through instead of creating one that only
+ yields the passed argument.
+
+Fri Aug 31 16:23:20 2012 Akinori MUSHA <knu@iDaemons.org>
+
+ * lib/ipaddr.rb: Introduce several new error classes where only
+ ArgumentError and StandardError were used. IPAddr::Error is
+ their common ancestor class that inherits from ArgumentError for
+ backward compatibility. Submitted by Jon Daniel. Fixes #173 on
+ GitHub.
+
+Fri Aug 31 14:51:27 2012 NAKAMURA Usaku <usa@ruby-lang.org>
+
+ * test/bigdecimal/test_bigdecimal.rb (TestBigDecimal#test_to_f): added
+ for previous commit.
+
+Fri Aug 31 14:32:05 2012 NAKAMURA Usaku <usa@ruby-lang.org>
+
+ * ext/bigdecimal/bigdecimal.c (BigDecimal_to_f): use self's sign to
+ determine 0.0 and Inf's sign instead of internal double value's.
+ Reported by phasis68 (Heesob Park) at [ruby-core:47381] [Bug #6955]
+
+Fri Aug 31 14:31:17 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * template/id.h.tmpl, tool/id2token.rb: make id.h independent from
+ parse.h, and make parse.c dependent on it instead.
+
+Fri Aug 31 14:27:39 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * lib/mkmf.rb (create_makefile): fix race conditions at install-ext.
+ target files need to depend on destination directory timestamp
+ files, not phony targets.
+
+Fri Aug 31 14:03:45 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * vm_trace.c (clean_hooks): do not access freed memory.
+
+ * vm_trace.c (rb_threadptr_exec_event_hooks): fix uninitialized state
+ when no events is executed.
+
+Thu Aug 30 18:21:51 2012 Tanaka Akira <akr@fsij.org>
+
+ * io.c (rb_io_close): call rb_last_status_clear.
+
+Thu Aug 30 16:17:52 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * ext/bigdecimal/bigdecimal.c (BigDecimal_to_f): check underflow since
+ strtod() sets errno to ERANGE at underflow too. [ruby-core:47342]
+ [Bug #6944]
+
+Thu Aug 30 12:44:43 2012 Akinori MUSHA <knu@iDaemons.org>
+
+ * lib/set.rb (Set#{<,>,<=,>=}): Define comparison operators as
+ shorthand for the {proper_}{subset?,superset?} methods (finally).
+ Given a push by Alexander E. Fischer.
+
+Thu Aug 30 09:21:01 2012 NARUSE, Yui <naruse@ruby-lang.org>
+
+ * lib/uri/ftp.rb (URI::FTP#initialize): raise InvalidURIError if "//"
+ is not present [ruby-core:47344] [Bug #6945]
+
+Thu Aug 30 07:45:12 2012 Luis Lavena <luislavena@gmail.com>
+
+ * test/ruby/test_file_exhaustive.rb: fix test introduced in r36811 for
+ posix environments where HOME is not defined. [ruby-core:47322]
+
+Wed Aug 29 23:42:59 2012 Tanaka Akira <akr@fsij.org>
+
+ * internal.h (rb_last_status_clear): declared.
+
+ * process.c (rb_last_status_clear): exported.
+ (rb_f_system): call rb_last_status_clear.
+
+ * io.c (rb_f_backquote): call rb_last_status_clear.
+
+Wed Aug 29 22:01:15 2012 Tanaka Akira <akr@fsij.org>
+
+ * process.c (rb_f_system): check failures of waitpid.
+ [ruby-talk:398687]
+
+Wed Aug 29 15:03:04 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * configure.in (LIBDIR_BASENAME): use configured libdir value to fix
+ --enable-load-relative on systems where libdir is not default value,
+ overridden in config.site files. [ruby-core:47267] [Bug #6903]
+
+ * ruby.c (ruby_init_loadpath_safe): ditto.
+
+Wed Aug 29 14:34:41 2012 NARUSE, Yui <naruse@ruby-lang.org>
+
+ * addr2line.c: SIZE_MAX is defined in stdint.h, so r36755 breaks
+ 32bit FreeBSD. [ruby-core:47360] [Bug #6948]
+
+Wed Aug 29 04:50:04 2012 Martin Bosslet <Martin.Bosslet@googlemail.com>
+
+ * test/openssl/utils.rb
+ test/openssl/test_pair.rb
+ test/openssl/test_pkey_dh.rb: Use 1024 bit DH parameters to satisfy
+ OpenSSL FIPS requirements. Patch by Vit Ondruch.
+ [Bug #6938] [ruby-core:47326]
+
+Tue Aug 28 22:31:49 2012 CHIKANAGA Tomoyuki <nagachika@ruby-lang.org>
+
+ * insns.def (checkmatch): suppress warnings. [ruby-core:47339]
+ [Bug #6930]
+
+Tue Aug 28 20:03:54 2012 NARUSE, Yui <naruse@ruby-lang.org>
+
+ * configure.in: Fixing Haiku R1/alpha3 build with gcc-4.4.4.
+ - omit ANSI standard flags to compile socket extension where
+ anonymous union is required.
+ - remove redundant -be flags.
+ by Takashi Toyoshima <toyoshim@gmail.com>
+ https://github.com/ruby/ruby/pull/168
+
+Tue Aug 28 11:32:37 2012 Yuki Yugui Sonoda <yugui@google.com>
+
+ * nacl/GNUmakefile.in (.rbconfig.time): r36828 was incomplete.
+ It did not run correctly on clean build.
+
+Tue Aug 28 09:25:20 2012 NAKAMURA Usaku <usa@ruby-lang.org>
+
+ * win32/Makefile.sub (Makefile): make to depend on common.mk, to
+ stop and force to re-run make process when common.mk is changed.
+
+Mon Aug 27 20:19:49 2012 Hiroshi Shirosaki <h.shirosaki@gmail.com>
+
+ * test/etc/test_etc.rb (TestEtc#test_getgrgid): fix for non unique GID.
+ No unixen systems guarantee that GID is unique. Etc.getgrgid would
+ not return the first entry in the order of Etc.group for shared GID.
+ [ruby-core:47312] [Bug #6935]
+
+Mon Aug 27 18:19:36 2012 Koichi Sasada <ko1@atdot.net>
+
+ * include/ruby/ruby.h (rb_float_value): optimize it.
+ This technique was pointed by shinichiro.hamaji
+ <http://shinh.skr.jp/m/?date=20120825#p02>.
+
+Mon Aug 27 15:08:25 2012 Yuki Yugui Sonoda <yugui@google.com>
+
+ * common.mk (vm_trace.o): Added a missing dependency.
+
+Sun Aug 26 09:29:32 2012 Yuki Sonoda (Yugui) <yugui@yugui.jp>
+
+ * nacl/GNUmakefile.in (package): make package should install
+ example.html for nacl build
+
+ Patch by Takashi Toyoshima <toyoshim AT gmail.com>.
+
+Sun Aug 26 09:22:33 2012 Yuki Sonoda (Yugui) <yugui@yugui.jp>
+
+ * nacl/GNUmakefile.in (CC, LD, NM, AR, AS, RANLIB, OBJDUMP, OBJCOPY)
+ Rewrites these variables instead of PATH.
+ NaCl port uses a toolchain which is specified by NACL_SDK_ROOT
+ environment variable. Originally, NaCl build added the toolchain
+ under the NACL_SDK_ROOT to the PATH. But updating PATH doesn't work
+ on Mac.
+ (RBCONFIG): Replaces configs with the variable updates above.
+
+ * configure.in: Thus it is no longer necessary to check $PATH.
+
+ Based on a patch by Takashi Toyoshima <toyoshim AT gmail.com>.
+
+Sun Aug 26 16:53:00 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * insns.def (checkmatch): suppress warnings. [ruby-core:47310]
+ [Bug #6930]
+
+ * vm_core.h (VM_FRAME_TYPE_FINISH_P): ditto.
+
+Fri Aug 24 15:42:28 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * lib/mkmf.rb (create_makefile): use timestamp for destination
+ directories to make them before making or copying files there.
+ [ruby-dev:46067] [Bug #6904]
+
+Fri Aug 24 12:40:15 2012 Luis Lavena <luislavena@gmail.com>
+
+ * configure.in (mingw): add shlwapi to the list of dependency
+ libs for Windows.
+ * win32/Makefile.sub (EXTSOLIBS): ditto.
+
+ * internal.h: declare internal functions rb_w32_init_file,
+ rb_file_expand_path_internal and rb_file_expand_path_fast.
+
+ * file.c (Init_File): invoke Windows initialization rb_w32_init_file
+
+ * win32/file.c (rb_file_load_path_internal): new function.
+ Windows-specific implementation that replaces file_expand_path.
+ [Bug #6836][ruby-core:46996]
+
+ * win32/file.c (rb_w32_init_file): new function. Initialize codepage
+ cache for faster conversion encodings lookup.
+
+ * file.c (file_expand_path): rename to rb_file_expand_path_internal.
+ Conditionally exclude from Windows.
+
+ * file.c (rb_file_expand_path_fast): new function. delegates to
+ rb_file_expand_path_internal without performing a hit to the
+ filesystem.
+
+ * file.c (file_expand_path_1): use rb_file_expand_path_internal without
+ path expansion (used by require).
+ * file.c (rb_find_file_ext_safe): ditto.
+ * file.c (rb_find_file_safe): ditto.
+
+ * load.c (rb_get_expanded_load_path): use rb_file_expand_path_fast.
+ * load.c (rb_feature_provided): ditto.
+
+ * file.c (rb_file_expand_path): use rb_file_expand_path_internal with
+ path expansion.
+ * file.c (rb_file_absolute_path): ditto.
+
+ * test/ruby/test_file_exhaustive.rb: new tests to exercise
+ rb_file_expand_path_internal implementation and compliance with
+ existing behaviors.
+
+Fri Aug 24 07:35:24 2012 Eric Hodel <drbrain@segment7.net>
+
+ * lib/net/http/backward.rb (class Net): Restored Net::HTTPSession to
+ fix backwards-compatibility with ancient Net::HTTP. [Bug #6889]
+
+Thu Aug 23 20:58:55 2012 Kazuhiro NISHIYAMA <zn@mbf.nifty.com>
+
+ * common.mk: support `make id.h` without `rm .id.h.time` after
+ `rm id.h`.
+
+Thu Aug 23 20:48:45 2012 NAKAMURA Usaku <usa@ruby-lang.org>
+
+ * test/ruby/test_fixnum.rb (TestFixnum#test_singleton_method): new test.
+
+ * test/ruby/test_bignum.rb (TestBignum#test_singleton_method): ditto.
+
+ * test/ruby/test_float.rb (TestFloat#test_singleton_method): ditto.
+
+ * test/ruby/test_symbol.rb (TestSymbol#test_singleton_method): ditto.
+
+Thu Aug 23 20:34:32 2012 NAKAMURA Usaku <usa@ruby-lang.org>
+
+ * class.c (singleton_class_of): flonum can't have singleton class.
+
+ * vm.c (vm_define_method): flonum can't have singleton method.
+
+Thu Aug 23 19:18:33 2012 NAKAMURA Usaku <usa@ruby-lang.org>
+
+ * common.mk (win32/*): macro RUBY_H_INCLUDES is not defined there,
+ so need to move dependency rules under the definition of it.
+
+Thu Aug 23 19:16:20 2012 NAKAMURA Usaku <usa@ruby-lang.org>
+
+ * win32/Makefile.sub: refactoring. remove unused rules, and update
+ some rules which are not used usually to fit current macros.
+
+Thu Aug 23 16:46:10 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * file.c (rb_find_file_ext_safe, rb_find_file_safe): default to
+ US-ASCII for encdb and transdb.
+
+ * load.c (search_required): keep encoding of feature name. set
+ loading path to filesystem encoding. [Bug #6377][ruby-core:44750]
+
+ * ruby.c (add_modules, require_libraries): assume default external
+ encoding as well as ARGV.
+
+Thu Aug 23 16:20:04 2012 Koichi Sasada <ko1@atdot.net>
+
+ * include/ruby/ruby.h: introduce flonum technique for
+ 64bit CPU environment (sizeof(double) == sizeof(VALUE)).
+ flonum technique enables to avoid double object creation
+ if the double value d is in range about between
+ 1.72723e-77 < |d| <= 1.15792e+77 or 0.0.
+ flonum Float value is immediate and their lowest two bits
+ are b10.
+ If flonum is activated, then USE_FLONUM macro is 1.
+ I'll write detailed in this technique on
+ https://bugs.ruby-lang.org/projects/ruby-trunk/wiki/Flonum_tech
+
+ * benchmark/bmx_temp.rb: add an benchmark for simple
+ Float calculation.
+
+ * gc.c (id2ref, rb_obj_id): add flonum Float support.
+
+ * include/ruby/intern.h: move decl of rb_float_new(double)
+ to include/ruby/ruby.h.
+
+ * insns.def, vm.c, vm_insnhelper.c: add flonum optimization
+ and simplify source code.
+
+ * vm_insnhelper.h (FLONUM_2_P): added.
+
+ * marshal.c: support flonum output.
+
+ * numeric.c (rb_float_new_in_heap): added.
+
+ * parse.y: support flonum.
+
+ * random.c: ditto.
+
+Thu Aug 23 16:12:40 2012 NAKAMURA Usaku <usa@ruby-lang.org>
+
+ * lib/mkmf.rb (create_makefile): add dependency to header files when
+ depend files don't exist. now we can remove simple (and often
+ wrong) depend files in most cases.
+
+Thu Aug 23 16:02:20 2012 Koichi Sasada <ko1@atdot.net>
+
+ * ext/date/depend: add dependency to $(ruby_headers).
+
+Thu Aug 23 12:51:39 2012 Shugo Maeda <shugo@ruby-lang.org>
+
+ * insns.def (invokesuper): reverted r36640 partially to make super
+ in a thread work correctly. [ruby-core:47284] [Bug #6907]
+
+ * test/ruby/test_super.rb: related test.
+
+Thu Aug 23 12:30:20 2012 NAKAMURA Usaku <usa@ruby-lang.org>
+
+ * win32/configure.bat: support --with(out)?-ext(ensions) options.
+
+Thu Aug 23 11:52:04 2012 NARUSE, Yui <naruse@ruby-lang.org>
+
+ * configure.in: Fixing Haiku build.
+ - -lbe is not required for linking
+ - stack protector doesn't work for now because of the default gcc's
+ bug
+ by Takashi Toyoshima <toyoshim@gmail.com>
+ https://github.com/ruby/ruby/pull/167
+
+ * signal.c (ruby_signal): haiku doesn't have SIGBUS.
+
+Thu Aug 23 11:32:44 2012 NAKAMURA Usaku <usa@ruby-lang.org>
+
+ * test/open-uri/test_open-uri.rb (TestOpenURI#test_read_timeout): this
+ test expects that the server thread will be killed in sleep, but 0.01
+ sec is too short to reach there.
+
+Thu Aug 23 10:49:28 2012 NARUSE, Yui <naruse@ruby-lang.org>
+
+ * configure.in: use the value of --with-opt-dir on building ruby
+ itself. [ruby-dev:46064] [Bug #6900]
+
+Thu Aug 23 10:36:35 2012 NAKAMURA Usaku <usa@ruby-lang.org>
+
+ * common.mk (ID_H_TARGET): revert a part of r36724 and r36751. they
+ break mswin build from clean source.
+
+Thu Aug 23 02:37:35 2012 Aaron Patterson <aaron@tenderlovemaking.com>
+
+ * ext/syck: removed. Fixes [ruby-core:43360]
+
+ * test/syck: removed.
+
+ * lib/yaml.rb: only require psych, show a warning if people try to set
+ the engine to syck.
+
+Thu Aug 23 01:46:53 2012 Aaron Patterson <aaron@tenderlovemaking.com>
- * eval.c (is_defined): ditto.
+ * insns.def: search up the cf stack for an object that is an instance
+ of the recipient class. Fixes [ruby-core:47186]
-Thu Nov 16 23:06:07 2000 Minero Aoki <aamine@dp.u-netsurf.ne.jp>
+ * test/ruby/test_super.rb: related test.
- * lib/net/http.rb: can call {old,new}_implementation any times.
+Wed Aug 22 19:46:24 2012 Tadayoshi Funaba <tadf@dotrb.org>
- * lib/net/http.rb: HTTP#connecting, receive ->
- common_oper, connecting.
+ * ext/date/date_core.c: [ruby-core:47266].
- * lib/net/http.rb: output warning if u_header includes
- duplicated header.
+Wed Aug 22 19:41:19 2012 Tadayoshi Funaba <tadf@dotrb.org>
- * lib/net/http.rb: not check Connection:/Proxy-Connection;
- always read until eof.
+ * ext/date/date_core.c: [ruby-core:47226].
- * lib/net/protocol.rb: detects and catches "break" from block.
+Wed Aug 22 16:57:04 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Thu Nov 16 16:32:45 2000 Masahiro Tanaka <masa@stars.gsfc.nasa.gov>
+ * lib/mkmf.rb (configuration): extract least ruby headers list as
+ ruby_headers, so depend files can use default dependency
+ explicitly.
+
+Wed Aug 22 15:27:50 2012 Koichi Sasada <ko1@atdot.net>
+
+ * vm_insnhelper.c (vm_setup_method): fix last commit of
+ vm_insnhelper.c (r36771). [ruby-dev:46065] [Bug #6901]
+ Should not disable tail call opt on FINISH_FRAME.
+ This flag should be propagated correctly.
+
+Wed Aug 22 14:05:23 2012 Koichi Sasada <ko1@atdot.net>
+
+ * vm_trace.c: support TracePoint. [ruby-trunk - Feature #6895]
+
+ * test/ruby/test_settracefunc.rb: add tests for above.
+
+ * proc.c (rb_binding_new_with_cfp): add an internal function.
+
+ * vm.c (rb_vm_control_frame_id_and_class): add an internal function.
+
+ * vm_trace.c: add rb_add_event_hook2() and rb_thread_add_event_hook2().
+ Give us the good name for them!
+
+Wed Aug 22 11:38:16 2012 URABE Shyouhei <shyouhei@ruby-lang.org>
+
+ * .travis.yml (before_script): Turned out that make -j is broken.
+
+Wed Aug 22 11:23:35 2012 Shugo Maeda <shugo@ruby-lang.org>
+
+ * vm_insnhelper.c (vm_setup_method): should not enable tail call
+ optimization for frames with VM_FRAME_FLAG_FINISH.
+ [ruby-dev:46065] [Bug #6901]
+
+Wed Aug 22 11:20:47 2012 NARUSE, Yui <naruse@ruby-lang.org>
+
+ * lib/rubygems/test_case.rb: run test with psych if exist.
+
+Thu Aug 16 12:09:51 2012 Yuki Yugui Sonoda <yugui@google.com>
+
+ * nacl/pepper_main.c (init_loadpath): Pushes the correct load path on
+ other architectures than x86_64. Fixes #6873.
+
+Wed Aug 15 19:37:33 2012 Yuki Yugui Sonoda <yugui@google.com>
+
+ * configure.in (ac_cv_func_shutdown): shutdown(2) has a dummy
+ implementation but has no declaration and does not work in
+ NativeClient SDK pepper_20.
+
+Wed Aug 15 19:29:29 2012 Yuki Yugui Sonoda <yugui@google.com>
+
+ * common.mk (vm_backtrace.o): Added missing dependencies.
+
+ * ext/nkf/depend (nkf.o): ditto.
+
+ * ext/ripper/depend (ripper.o) ditto.
+
+Wed Aug 22 07:27:00 2012 NARUSE, Yui <naruse@ruby-lang.org>
+
+ * lib/cgi/util.rb (CGI.escapeHTML): use &#39;
+ [ruby-core:47221] [Bug #6861]
+
+Tue Aug 21 21:59:22 2012 Ayumu AIZAWA <ayumu.aizawa@gmail.com>
+
+ * lib/observer.rb: fix typo. https://github.com/ruby/ruby/pull/162 by
+ unsymbol (Philip Cunningham).
+
+Tue Aug 21 20:30:06 2012 Benoit Daloze <eregontp@gmail.com>
+
+ * test/fileutils/test_fileutils.rb (TestFileUtils#teardown):
+ do not assume cwd is TMPROOT and never remove current directory.
+ [ruby-core:47224][Bug #6884]
+
+Tue Aug 21 17:29:56 2012 NAKAMURA Usaku <usa@ruby-lang.org>
+
+ * addr2line.c (fill_lines): need check and cast of the file size of
+ target binary because there are some platforms which off_t > size_t.
+
+Tue Aug 21 17:07:58 2012 URABE Shyouhei <shyouhei@ruby-lang.org>
+
+ * .travis.yml (compiler): [experimental] clang support.
+
+Tue Aug 21 15:44:27 2012 NAKAMURA Usaku <usa@ruby-lang.org>
+
+ * ext/dl/lib/dl/func.rb (DL::Function#bind): fixes an error in
+ test/dl/test_import.rb (DL::TestImport#test_carried_function)
+ introduced by r36718.
+ the instance of the anonymous class which wraps the block should have
+ same methods and instance variables of self.
+
+Tue Aug 21 14:29:22 2012 NAKAMURA Usaku <usa@ruby-lang.org>
+
+ * win32/Makefile.sub (scriptbin.mk): no need to include twice.
+
+Tue Aug 21 10:52:08 2012 NAKAMURA Usaku <usa@ruby-lang.org>
+
+ * test/unit/test.rb (Test::Unit::ProxyError): new exception class to
+ wrap exceptions raised in workers in parallel test mode.
+
+ * test/unit/parallel.rb (Test::Unit::Worker#puke): use above wrapper
+ exception.
+ [Bug #6882] [ruby-dev:46054]
+
+Tue Aug 21 10:40:06 2012 Koichi Sasada <ko1@atdot.net>
+
+ * test_continuation.rb (tracing_with_thread_set_trace_func):
+ fix to use Thread#set_trace_func(nil), not set_trace_func(nil).
+
+Tue Aug 21 09:32:41 2012 Ryan Davis <ryand-ruby@zenspider.com>
+
+ * lib/minitest/*: Imported minitest 3.3.0 (r7676)
+ * test/minitest/*: ditto
+
+Tue Aug 21 09:05:32 2012 NAKAMURA Usaku <usa@ruby-lang.org>
+
+ * test/testunit/tests_for_parallel/ptest_forth.rb: added a test case
+ which causes an error.
+
+ * test/testunit/test_parallel.rb: follow above change.
+ see [Bug #6882]
+
+Tue Aug 21 05:43:00 2012 James Edward Gray II <james@graysoftinc.com>
+
+ * lib/csv.rb: Fixes #161 on github
+ * lib/csv.rb: You can now specify a pattern for :skip_lines.
+ Matching lines will not be passed to the CSV parser.
+ * lib/csv.rb: Patch by Christian Schwartz.
+
+Tue Aug 21 05:25:41 2012 Eric Hodel <drbrain@segment7.net>
+
+ * re.c (rb_reg_initialize_m): Forgot to update output for or'd-options
+ example.
+
+Tue Aug 21 05:18:03 2012 Eric Hodel <drbrain@segment7.net>
+
+ * re.c (rb_reg_initialize_m): Update example to show that regexp
+ options use | an not || to avoid confusion.
+
+Mon Aug 20 23:02:27 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * parse.y: more descriptive token names in syntax error messages.
+
+Mon Aug 20 20:36:30 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * vm_insnhelper.c (vm_call_method): follow iclasses as klass in cfp
+ but not included modules. [ruby-core:47241] [Bug #6891]
+
+ * vm_insnhelper.c (vm_call_bmethod): pass defined_class to follow
+ proper ancestors. [ruby-core:47241] [Bug #6891]
+
+Mon Aug 20 11:40:27 2012 Kazuhiro NISHIYAMA <zn@mbf.nifty.com>
+
+ * common.mk: fix failed to make with -j2.
+ https://gist.github.com/3397935
+
+Mon Aug 20 10:51:01 2012 Shota Fukumori <sorah@tubusu.net>
+
+ * lib/test/unit.rb, lib/test/unit/parallel.rb:
+ generate error message (String) in parallel.rb instead of
+ marshalling Exception. Fixes [Bug #6882] [ruby-dev:46054]
+
+Sun Aug 19 01:24:32 2012 Ayumu AIZAWA <ayumu.aizawa@gmail.com>
+
+ * enum.c: fix docs. https://github.com/ruby/ruby/pull/129 by
+ richardkmichael (Richard Michael).
+
+Sun Aug 19 00:47:26 2012 Ayumu AIZAWA <ayumu.aizawa@gmail.com>
+
+ * lib/fileutils.rb: fix typo.
+ https://github.com/ruby/ruby/pull/155 by simonc (Simon COURTOIS).
+
+Sat Aug 18 09:57:46 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * enc/depend: fix inplace-build condition. enc.mk is generated with
+ setting $srcdir to enc, but pwd is still top build directory.
+ [ruby-core:47236] [Bug #6888]
+
+Fri Aug 17 23:28:54 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * object.c (rb_any_to_s, rb_obj_inspect): preserve encodings of class
+ name and instance variable names.
+
+Fri Aug 17 12:39:33 2012 NAKAMURA Usaku <usa@ruby-lang.org>
+
+ * ext/dl/lib/dl/func.rb (DL::Function#bind): allow to return/break from
+ the callback method. (Fiddle already allows it.)
+ [Bug #6389] [ruby-dev:45604]
+
+Thu Aug 16 19:54:24 2012 Koichi Sasada <ko1@atdot.net>
+
+ * vm_trace.c, vm_core.h: simplify tracing mechanism.
+
+ (1) add rb_hook_list_t data structure which includes
+ hooks, events (flag) and `need_clean' flag.
+ If the last flag is true, then clean the hooks list.
+ In other words, deleted hooks are contained by `hooks'.
+ Cleanup process should run before traversing the list.
+ (2) Change check mechanism
+ See EXEC_EVENT_HOOK() in vm_core.h.
+ (3) Add `raw' hooks APIs
+ Normal hooks are guarded from exception by rb_protect().
+ However, this protection is overhead for too simple
+ functions which never cause exceptions. `raw' hooks
+ are executed without protection and faster.
+ Now, we only provide registration APIs. All `raw'
+ hooks are kicked under protection (same as normal hooks).
+
+ * include/ruby/ruby.h: remove internal data definition and
+ macros.
+
+ * internal.h (ruby_suppress_tracing), vm_trace.c: rename
+ ruby_suppress_tracing() to rb_suppress_tracing()
+ and remove unused function parameter.
+
+ * parse.y: fix to use renamed rb_suppress_tracing().
+
+ * thread.c (thread_create_core): no need to set RUBY_VM_VM.
+
+ * vm.c (mark_event_hooks): move definition to vm_trace.c.
+
+ * vm.c (ruby_vm_event_flags): add a global variable.
+ This global variable represents all of Threads and VM's
+ event masks (T1#events | T2#events | ... | VM#events).
+ You can check the possibility kick trace func or not
+ with ruby_vm_event_flags.
+ ruby_vm_event_flags is maintained by vm_trace.c.
+
+ * cont.c (fiber_switch, rb_cont_call): restore tracing status.
+ [Feature #4347]
+
+ * test/ruby/test_continuation.rb: ditto.
+
+Thu Aug 16 19:15:23 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * object.c (rb_class_initialize): forbid inheriting uninitialized
+ class. another class tree not based on BasicObject cannot exist.
+ [ruby-core:47148][Bug #6863]
+
+Thu Aug 16 11:52:06 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * test/-ext-/test_printf.rb (Test_SPrintf#test_{taint,untrust}): use
+ plain object so that the results of to_s and inspect are infected.
+ [ruby-dev:46053] [Bug #6881]
+
+Thu Aug 16 09:46:07 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * strftime.c: remove unnecessary macros to check traditional C.
+ https://github.com/ruby/ruby/pull/46 by lateau (Daehyub Kim).
+
+ * vsnprintf.c: remove K&R.
+
+Wed Aug 15 20:47:49 2012 Benoit Daloze <eregontp@gmail.com>
+
+ * object.c (rb_obj_inspect): Kernel#inspect: do not call #to_s. A class
+ can now benefit from the nice default #inspect even if it defines #to_s.
+ Also, there is no more unexpected change in #inspect result.
+
+ * NEWS: Add note about the change.
+
+ * bignum.c, io.c, numeric.c, object.c, proc.c, vm.c (Init_*):
+ Adapt internal structures (by aliasing #inspect to #to_s) so they
+ don't rely on the removed behavior (#inspect calling overridden #to_s).
+
+ * test/ruby/test_object.rb (test_inspect): add tests for Kernel#inspect.
+
+ * lib/pp.rb (class PP): do not call #to_s anymore, as #inspect
+ no more does (mame).
+
+ * test/test_pp.rb (class PPInspectTest): remove related assertion (mame).
+ [ruby-core:43238][Feature #6130]
+
+ * test/drb/drbtest.rb (DRbCore#teardown, DRbAry#teardown):
+ adapt DRb tests with the new change (shirosaki).
+ [ruby-core:47182][Bug #6866]
+
+Wed Aug 15 18:05:37 2012 NAKAMURA Usaku <usa@ruby-lang.org>
- * bignum.c (bigdivrem): should have incremented ny first.
+ * lib/test/unit.rb (Test::Unit::Runner#failed): need to delete the
+ status line if the status is skipped and -q is specified.
-Thu Nov 16 14:58:00 2000 Nobuyoshi Nakada <nobu.nakada@nifty.ne.jp>
+Wed Aug 15 16:26:52 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * ext/socket/socket.c (sock_new): duplicates file descriptor
- with myfddup() on mswin32/mingw32.
+ * sprintf.c (ruby__sfvextra): the result should be infected by the
+ given strings.
- * win32/win32.h: uses system original fdopen().
+ * sprintf.c (ruby__sfvwrite): set buffer length and exclude
+ uninitialized garbage to get correct coderange.
- * win32/win32.c (myfddup): newly added instead of myfdopen().
+Wed Aug 15 16:20:09 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * win32/win32.c (mybind, myconnect, mygetsockname, mygetsockopt,
- mylisten, mysetsockopt): now accept file descriptor only, not
- SOCKET.
+ * common.mk (ID_H_TARGET): make timestamp file of id.h so that the
+ header will not be remade repetitively.
- * win32/win32.c (myaccept, mysocket): return file descriptor,
- instead of SOCKET.
+Wed Aug 15 11:39:53 2012 Koichi Sasada <ko1@atdot.net>
-Thu Nov 16 10:23:24 2000 Yukihiro Matsumoto <matz@ruby-lang.org>
+ * vm_trace.c: separate trace_func related functions from
+ thread.c.
- * eval.c (massign): too strict check for nameless rest argument.
+ * thread.c: ditto.
- * eval.c (method_arity): mere * should return -1.
+ * common.mk: add vm_trace.o.
- * eval.c (intersect_fds): should check all FDs in the fd_set.
+ * inits.c: call Init_vm_trace().
-Wed Nov 15 19:33:20 2000 Nobuyoshi Nakada <nobu.nakada@nifty.ne.jp>
+Tue Aug 14 16:25:46 2012 Shugo Maeda <shugo@ruby-lang.org>
- * eval.c (rb_attr): should clear method cache before calling hook.
+ * test/erb/test_erb.rb (test_html_escape): add assertions for the
+ cases where the argument is not a String.
- * eval.c (rb_eval): ditto.
+Tue Aug 14 16:03:31 2012 NAKAMURA Usaku <usa@ruby-lang.org>
- * eval.c (rb_mod_modfunc): ditto.
+ * win32/win32.c (check_valid_dir): reject "..." as directory name.
+ [Bug #6851]
-Mon Nov 13 22:44:52 2000 Yukihiro Matsumoto <matz@ruby-lang.org>
+Tue Aug 14 16:02:51 2012 NAKAMURA Usaku <usa@ruby-lang.org>
- * error.c (rb_bug): print version to stderr.
+ * test/ruby/test_file_exhaustive.rb
+ (TestFileExhaustive#test_stat_dotted_prefix): added.
-Mon Nov 13 19:02:08 2000 WATANABE Hirofumi <eban@ruby-lang.org>
+Tue Aug 14 15:39:09 2012 NAKAMURA Usaku <usa@ruby-lang.org>
- * win32/win32.c, io.c, process.c: the exit status of program must be
- multiplied 256 on mswin32 and msdosdjgpp(system(), ``).
+ * test/ruby/test_file_exhaustive.rb
+ (TestFileExhaustive#test_stat_drive_root): added.
-Sat Nov 11 22:57:38 2000 Yukihiro Matsumoto <matz@ruby-lang.org>
+Tue Aug 14 10:38:17 2012 NARUSE, Yui <naruse@ruby-lang.org>
- * parse.y (arg): uniformed treatment of -a**b, where a is a
- number literal; hacky but behavior appears more consistent.
+ * lib/erb.rb (ERB::Util.html_escape): fix r36687: call to_s before
+ passing it to CGI.escapeHTML.
- * parse.y (newline_node): reduce newline node (one per line).
+Mon Aug 13 13:13:19 2012 Shugo Maeda <shugo@ruby-lang.org>
- * random.c (rb_f_srand): should be prohibited in safe level
- greater than 4.
+ * lib/erb.rb (ERB::Util.html_escape): use CGI.escapeHTML to escape
+ single quotes. [ruby-core:47138] [Bug #6861]
-Sat Nov 11 22:37:36 2000 Nobuyoshi Nakada <nobu.nakada@nifty.ne.jp>
+Sun Aug 12 11:57:20 2012 Kazuki Tsujimoto <kazuki@callcc.net>
- * rubysig.h: do not use rb_trap_immediate on win32.
+ * vm.c (invoke_block_from_c): fix unintentional block passing.
+ [ruby-dev:45071] [Bug #5832]
- * rubysig.h: new macros, ATOMIC_TEST, ATOMIC_SET, ATOMIC_INC,
- ATOMIC_DEC, RUBY_CRITICAL and new definition of TRAP_BEG,
- TRAP_END.
+Fri Aug 10 08:41:28 2012 Eric Hodel <drbrain@segment7.net>
- * gc.c (ruby_xmalloc): should wrap malloc() by RUBY_CRITICAL.
+ * gc.c (gc_malloc_allocated_size): RDoc does not process macros, so
+ mention this method is only available when ruby is built with
+ CALC_EXACT_MALLOC_SIZE
+ * gc.c (gc_malloc_allocations): ditto
- * signal.c (sighandle): better win32 sig handling.
+Thu Aug 9 23:46:51 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * win32/win32.c (flock): better implementation.
+ * tool/mkrunnable.rb: see build_os instead of target arch for
+ cross-compiling.
- * win32/win32.c (myselect): ditto.
+ * configure.in (MINIRUBY): use real path for include path.
- * win32/win32.c (myaccept): ditto.
+ * template/fake.rb.in (builddir): remove duplications
- * win32/win32.c (waitpid): ditto.
+Thu Aug 9 20:03:11 2012 Hiroshi Shirosaki <h.shirosaki@gmail.com>
- * win32/win32.c (myrename): ditto.
+ * test/ruby/test_file_exhaustive.rb
+ (TestFileExhaustive#test_stat_special_file): add a test.
+ GetFileAttributesExW fails to get attributes of special files
+ such as pagefile.sys.
- * win32/win32.c (wait_events): support function for win32 signal
- handling.
+ * win32/win32.c (check_valid_dir): for performance, check the path
+ by FindFirstFileW only if the path contains "..."
-Sat Nov 11 08:34:18 2000 Minero Aoki <aamine@dp.u-netsurf.ne.jp>
+ * win32/win32.c (winnt_stat): use GetFileAttributesExW instead of
+ FindFirstFileW since GetFileAttributesExW is faster.
+ Based on the patch by Dusan D. Majkic.
+ [ruby-core:47083] [Feature #6845]
- * lib/net/protocol.rb, smtp.rb, pop.rb, http.rb: 1.1.31.
+Thu Aug 9 18:33:46 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * lib/net/http.rb: initializes header in HTTP, not HTTPCommand.
+ * ruby.c (proc_options): show version only once even if -v and
+ --version are given together.
+ http://twitter.com/d6rkaiz/status/233491797085671424
- * lib/net/protocol.rb, http.rb: rewrites proxy code.
+Thu Aug 9 12:37:22 2012 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
-Fri Nov 10 16:15:53 2000 Yukihiro Matsumoto <matz@ruby-lang.org>
+ * test/openssl/test_config.rb (OpenSSL#test_constants): skip this
+ test if platform is Mac OS X or Windows. [Bug #6830]
- * numeric.c (rb_num2long): use to_int, not to_i.
+Wed Aug 8 22:51:30 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * error.c: T_SYMBOL was misplaced by T_UNDEF.
+ * vm_eval.c (eval_under): singletons other than special constants
+ don't need cref-scope hack.
- * parse.y (yylex): eval("^") caused infinite loop.
+Wed Aug 8 22:45:38 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Thu Nov 9 14:22:13 2000 Yukihiro Matsumoto <matz@ruby-lang.org>
+ * common.mk (.y.h): split from .y.c rule to manage dependency on
+ parse.h. [ruby-core:46741] [Bug #6789]
- * io.c (rb_io_taint_check): should check IO taintness; no
- operation for untainted IO should be allowed in the sandbox.
+ * common.mk (id.h): keep old file unless changed.
- * rubyio.h (GetOpenFile): check IO taintness inside using
- rb_io_taint_check().
+Wed Aug 8 17:11:20 2012 Koichi Sasada <ko1@atdot.net>
-Wed Nov 8 03:08:53 2000 Yukihiro Matsumoto <matz@ruby-lang.org>
+ * compile.c (ADD_INSNL): make ADD_INSNL as alias of ADD_INSN1.
- * io.c (io_fflush): ensure fflush(3) would not block by calling
- rb_thread_fd_writable().
+Wed Aug 8 17:08:14 2012 Koichi Sasada <ko1@atdot.net>
-Tue Nov 7 20:29:56 2000 Minero Aoki <aamine@dp.u-netsurf.ne.jp>
+ * bootstrap/test_exception.rb: fix a last committed test.
- * lib/net/protocol.rb, smtp.rb, pop.rb, http.rb: 1.1.30.
+Wed Aug 8 16:27:58 2012 Koichi Sasada <ko1@atdot.net>
- * lib/net/protocol.rb, smtp.rb: Command#critical_ok -> error_ok
+ * compile.c, insns.def (checkmatch):
+ remove checkincludearray instruction and
+ add new instruction checkmatch.
+ This change is to solve
+ [Bug #4438] "rescue args type check omitted".
- * lib/net/http.rb: reads header when also "100 Continue".
+ * iseq.c: increment ISEQ_MAJOR_VERSION because removal of
+ checkincludearray instruction.
-Tue Nov 7 04:32:19 2000 Yukihiro Matsumoto <matz@ruby-lang.org>
+ * vm_core.h: add several definitions for
+ the checkmatch instruction.
- * bignum.c (bigdivrem): use bit shift to make y's MSB set.
+ * vm_insnhelper.c (check_match): added.
-Mon Nov 6 1:22:49 2000 Yukihiro Matsumoto <matz@ruby-lang.org>
+ * bootstraptest/test_exception.rb: add a test.
- * error.c (warn_print): do not use err_append(), to ensure output
- to stderr.
+ * test/ruby/test_exception.rb: ditto.
- * error.c (rb_warn): use warn_print() instead of err_print().
+Wed Aug 8 05:51:20 2012 Eric Hodel <drbrain@segment7.net>
- * error.c (rb_warning): ditto.
+ * proc.c (method_clone): Added documentation. Patch by Robin Dupret.
+ Fixes #152 on github.
- * error.c (rb_bug): ditto.
+Tue Aug 7 20:19:29 2012 NARUSE, Yui <naruse@ruby-lang.org>
- * eval.c (rb_load): re-raise exceptions during load.
+ * ext/readline/readline.c (Init_readline): rl_catch_signals=0 returns
+ back. Without this, on FreeBSD9 and readline 6.2 irb can't catch ^C.
+ [Bug #5423]
- * time.c (make_time_t): remove useless adjust
+Tue Aug 07 20:12:39 2012 Koichi Sasada <ko1@atdot.net>
-Thu Nov 2 18:01:16 2000 Yukihiro Matsumoto <matz@ruby-lang.org>
+ * vm_exec.c, insns.def (leave): solve problems on
+ OPT_CALL_THREADED_CODE.
+ Catch up finish frame structure on OPT_CALL_THREADED_CODE.
- * random.c (rb_f_rand): half-baked float support fixed. This fix
- was originally proposed by K.Kosako <kosako@sofnec.co.jp>.
+ * vm_core.h: add rb_thread_t#retval for temporary space on
+ OPT_CALL_THREADED_CODE.
-Tue Oct 31 17:27:17 2000 Yukihiro Matsumoto <matz@ruby-lang.org>
+ * vm.c (th_init): clear rb_thread_t#retval as Qundef.
- * bignum.c: change digit size to `long|int' if long long is
+ * vm_dump.c (rb_vmdebug_debug_print_pre): fix debug print format.
+
+Tue Aug 7 11:58:27 2012 NAKAMURA Usaku <usa@ruby-lang.org>
+
+ * test/ruby/test_require.rb (TestRequire#test_require_twice): added.
+
+Tue Aug 7 11:35:37 2012 Shugo Maeda <shugo@ruby-lang.org>
+
+ * vm_method.c (rb_redefine_opt_method): use RCLASS_ORIGIN to avoid
+ SEGV when a module-prepended class is refined.
+
+Tue Aug 7 10:46:37 2012 NAKAMURA Usaku <usa@ruby-lang.org>
+
+ * test/ruby/test_file_exhaustive.rb
+ (TestFileExhaustive#test_expand_path*): refactoring. split the method
+ into some chunks of the same kind of tests.
+
+Tue Aug 7 00:31:09 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * class.c (rb_special_singleton_class_of): utility function.
+
+ * vm_eval.c (eval_under): special deal for class variable scope with
+ instance_eval.
+
+ * vm_eval.c (rb_obj_instance_eval, rb_obj_instance_exec): allow method
+ definition in instance_eval of special constants. [ruby-core:28324]
+ [Bug #2788]
+
+Tue Aug 7 00:23:58 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * variable.c (CVAR_LOOKUP): split into helper functions.
+
+Mon Aug 6 19:15:11 2012 Masaki Suketa <masaki.suketa@nifty.ne.jp>
+
+ * test/win32ole/test_win32ole_variant.rb: setting WIN32OLE.locale
+ to pass some assertion. Thanks to Hiroshi Shirosaki.
+ [ruby-core:46873][Bug #6814]
+
+Mon Aug 6 15:54:50 2012 Shugo Maeda <shugo@ruby-lang.org>
+
+ * internal.h, class.c, eval.c, insns.def: find the appropriate
+ receiver for super called in instance_eval. If such a receiver is
+ not found, raise NoMethodError. [ruby-dev:39772] [Bug #2402]
+
+Mon Aug 6 14:54:38 2012 Shugo Maeda <shugo@ruby-lang.org>
+
+ * include/ruby/ruby.h, eval.c, vm_insnhelper.c: fix typo.
+
+Mon Aug 6 13:13:58 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * vm_eval.c (vm_call_super): since cfp->klass is always class or
+ iclass, no search from method entry.
+
+ * insns.def (defined): now should use klass in the current control
+ frame to search superclass, not me->klass. reported by naruse.
+
+Mon Aug 6 11:19:19 2012 NAKAMURA Usaku <usa@ruby-lang.org>
+
+ * test/etc/test_etc.rb (TestEtc#test_getpwuid): `s' is never set to nil.
+
+Mon Aug 6 11:08:48 2012 NAKAMURA Usaku <usa@ruby-lang.org>
+
+ * test/syslog/test_syslog_logger.rb: skip unless Syslog module is
available.
- * marshal.c (w_object): support `long|int' digits.
+Mon Aug 6 00:40:54 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * marshal.c (r_object): ditto.
+ * ext/bigdecimal/bigdecimal.c (BigMath_s_log): fix format specifier.
-Sat Oct 28 23:54:22 2000 Yukihiro Matsumoto <matz@ruby-lang.org>
+Mon Aug 6 00:39:24 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * parse.y (yylex): allow =end at the end of file (without a
- newline at the end).
+ * include/ruby/ruby.h (NUM2ULONG): optimize by inline as well as
+ NUM2LONG, and cast to unsigned long explicitly for the platforms
+ where SIZEOF_VALUE is larger than SIZEOF_LONG.
-Fri Oct 27 10:00:27 2000 Yukihiro Matsumoto <matz@ruby-lang.org>
+ * include/ruby/ruby.h (NUM2SSIZET): fix type to cast.
- * bignum.c (rb_cstr2inum): should ignore trailing white spaces.
+Sun Aug 5 21:10:36 2012 Narihiro Nakamura <authornari@gmail.com>
- * bignum.c (rb_str2inum): string may not have sentinel NUL.
+ * gc.c : if ENABLE_VM_OBJSPACE is 1, rest_sweep is not defined.
+ remove unused declarations. [ruby-core:47004] [Bug #6837]
-Fri Oct 27 02:37:22 2000 Yukihiro Matsumoto <matz@ruby-lang.org>
+Sun Aug 5 19:31:57 2012 Narihiro Nakamura <authornari@gmail.com>
- * bignum.c (rb_cstr2inum): wrongly assigned base to c before
- badcheck check.
+ * gc.c: just move functions and so on. I don't touch any internal
+ implementation.
-Thu Oct 26 02:42:50 2000 Minero Aoki <aamine@dp.u-netsurf.ne.jp>
+Sun Aug 5 13:22:29 2012 NARUSE, Yui <naruse@ruby-lang.org>
- * lib/net/protocol.rb: Command#critical_ok
+ * configure.in: use gcc-4.2 prior to clang, gcc, and cc if exist for
+ the use of Snow Leopard's old clang. see also r36594, r36610, r36611.
- * lib/net/smtp.rb: clear critical flag before go to SMTP
+Sun Aug 5 06:55:10 2012 Tadayoshi Funaba <tadf@dotrb.org>
-Wed Oct 25 12:30:19 2000 Yukihiro Matsumoto <matz@ruby-lang.org>
+ * ext/date/date_{core,strftime}.c: [ruby-core:46990].
- * array.c (rb_ary_concat): replacing array might be the receiver
- itself. do not call rb_ary_push_m.
+Sat Aug 4 22:56:20 2012 Narihiro Nakamura <authornari@gmail.com>
- * array.c (rb_ary_replace): replacing array might be the receiver
- itself. use memmove.
+ * gc.c: use inline functions instead of macros, and close up
+ related codes for the profiler.
-Fri Oct 20 07:56:23 2000 Yukihiro Matsumoto <matz@ruby-lang.org>
+Sat Aug 4 20:37:56 2012 Narihiro Nakamura <authornari@gmail.com>
- * eval.c (rb_eval): ARGSPUSH should not modify args array.
+ * gc.c (gc_mark_children): use gc_mark_ptr instead of marking
+ a object directly.
-Thu Oct 19 14:58:17 2000 WATANABE Tetsuya <tetsu@jpn.hp.com>
+Sat Aug 4 10:02:03 2012 Shugo Maeda <shugo@ruby-lang.org>
- * pack.c (NUM2U32): should use NUM2ULONG().
+ * test/ruby/test_alias.rb (test_super_in_aliased_module_method):
+ add a test case for [ruby-dev:46028], which fails in 1.8.
-Tue Oct 17 17:30:34 2000 WATANABE Hirofumi <eban@ruby-lang.org>
+Sat Aug 4 01:56:06 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * eval.c (error_print): ruby_sourcefile may be NULL.
+ * vm_insnhelper.c (vm_search_normal_superclass): no longer needs
+ receiver, klass is always unique in the ancestors now.
-Tue Oct 17 16:36:28 2000 Wes Nakamura <wknaka@pobox.com>
+Sat Aug 4 01:27:40 2012 Shugo Maeda <shugo@ruby-lang.org>
- * pack.c (NATINT_U32): wrong use of sizeof.
+ * insns.def (invokesuper): reverted r36612 so that super in an
+ aliased method will not call the same method.
-Tue Oct 17 12:48:20 2000 Katsuyuki Komatsu <komatsu@sarion.co.jp>
+Fri Aug 3 19:26:10 2012 Shugo Maeda <shugo@ruby-lang.org>
- * eval.c (rb_abort): nil check against ruby_errinfo.
+ * insns.def (invokesuper): don't skip the same class. instead, use
+ rb_method_entry_get_with_omod() to avoid infinite loop when
+ super is used with refinements. [ruby-core:30450] [Bug #3351]
- * eval.c (rb_thread_schedule): use FOREACH_THREAD_FROM instead of
- FOREACH_THREAD, since curr_thread may be removed from thread ring.
+Fri Aug 3 19:21:19 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * eval.c (THREAD_ALLOC): errinfo should be Qnil.
+ * configure.in: use clang prior to gcc only when self-compiling on
+ darwin. search default compilers on other platforms. [Bug #6816]
- * eval.c (rb_callcc): th->prev,th->next are now already
- initialized in THREAD_ALLOC.
+Fri Aug 3 17:25:49 2012 NARUSE, Yui <naruse@ruby-lang.org>
-Mon Oct 16 15:37:33 2000 Kazuhiro NISHIYAMA <zn@mbf.nifty.com>
+ * configure.in: move RUBY_MINGW32 after AC_PROG_CC.
+ RUBY_MINGW32 uses AC_TRY_CPP and it sets CC and CPP. [Bug #6816]
- * eval.c (rb_thread_inspect): tag size was shorter than required.
+ * configure.in: don't use AC_PROG_CC in AS_CASE.
- * object.c (rb_obj_inspect): ditto.
+Fri Aug 3 17:21:52 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Mon Oct 16 14:25:18 2000 Shugo Maeda <shugo@ruby-lang.org>
+ * test/runner.rb: get rid of loading previously installed gems.
+ [ruby-dev:46025]
- * object.c (sym_inspect): used `name' before initialization.
+Fri Aug 3 16:40:01 2012 URABE Shyouhei <shyouhei@ruby-lang.org>
-Mon Oct 16 14:06:00 2000 Yukihiro Matsumoto <matz@ruby-lang.org>
+ * .travis.yml (notifications): [experimental] IRC notifications.
- * pack.c (pack_pack): use NATINT_U32 for 'l', 'L', and 'N'.
+Thu Aug 2 20:32:29 2012 Shugo Maeda <shugo@ruby-lang.org>
- * pack.c (I32,U32): 32 bit sized integer.
+ * eval.c (rb_mod_using): new method Module#using. [experimental]
- * pack.c (OFF16,OFF32B): big endian offset for network byteorder.
+ * eval.c (rb_mod_refine): new method Module#refine. [experimental]
-Mon Oct 16 06:39:32 2000 Minero Aoki <aamine@dp.u-netsurf.ne.jp>
+ * eval.c (f_using): new method Kernel#using. [experimental]
- * lib/net/http.rb: hex-alpha is not [a-h] but [a-f].
+Thu Aug 2 20:08:02 2012 Shugo Maeda <shugo@ruby-lang.org>
-Mon Oct 16 01:02:02 2000 Yukihiro Matsumoto <matz@ruby-lang.org>
+ * class.c, insns.def, method.h, proc.c, vm.c, vm_core.h, vm_eval.c,
+ vm_insnhelper.c, vm_insnhelper.h, vm_method.c: add klass to
+ rb_control_frame_t to implement super correctly.
- * eval.c (rb_thread_start_0): should not abort on exception if
- $SAFE >= 4.
+Thu Aug 2 13:23:08 2012 NARUSE, Yui <naruse@ruby-lang.org>
- * parse.y (sym): symbols for class variable names.
+ * configure.in (AC_PROG_CC): AC_PROG_CC tries clang at first on
+ darwin. [Bug #6816]
-Sun Oct 15 01:49:18 2000 Yukihiro Matsumoto <matz@ruby-lang.org>
+Thu Aug 2 11:39:25 2012 Narihiro Nakamura <authornari@gmail.com>
- * file.c (rb_file_flock): should accept interrupt.
+ * gc.c: return true or false. Patch by Dirkjan Bussink. [Bug #6821]
- * process.c (rb_waitpid): ditto.
+ * test/ruby/test_gc.rb: add test-case for this bug.
+
+Thu Aug 2 10:51:12 2012 Martin Bosslet <Martin.Bosslet@gmail.com>
+
+ * ext/openssl/lib/openssl/digest.rb
+ test/openssl/test_digest.rb: Add Digest module function to OpenSSL
+ module and test it. Patch provided by Eric Hodel.
+ [ruby-core:46908][Feature #6819]
+
+Wed Aug 1 22:29:12 2012 Benoit Daloze <eregontp@gmail.com>
+
+ * ext/digest/digest.c (hexencode_str_new): return an ASCII string
+
+ * test/digest: tests for all kind of digests encodings
+ [ruby-core:46792][Bug #6799]
+
+Wed Aug 1 05:50:53 2012 Hiroshi Shirosaki <h.shirosaki@gmail.com>
+
+ * test/ruby/test_rubyoptions.rb (TestRubyOptions#test_encoding):
+ Fix test_encoding failure on Windows.
+ With chcp 65001, 1252 and 437, test_encoding failed. Test result
+ depends on locale because LANG environment variable doesn't affect
+ locale on Windows.
+ [ruby-core:46872] [Bug #6813]
+
+Wed Aug 1 00:33:19 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * class.c (include_class_new): fix duplication of prepended module.
+ since m_tbl of prepended module is always zero, copy from its
+ copy iclass of original.
+
+Tue Jul 31 18:22:34 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * variable.c (classname): tell if found name is permanent. search
+ tmp_classpath only if class id is set. [ruby-core:42865][Bug #6078]
+
+ * variable.c (rb_class_path): duplicate found temporary path.
+
+ * variable.c (rb_set_class_path_string, rb_set_class_path): set class
+ id to find classpath.
+
+Tue Jul 31 10:36:12 2012 Aaron Patterson <aaron@tenderlovemaking.com>
+
+ * ext/psych/lib/psych.rb: updated to released version.
+
+ * ext/psych/psych.gemspec: ditto
+
+Tue Jul 31 06:18:06 2012 Eric Hodel <drbrain@segment7.net>
+
+ * time.c (time_sec): Remove extra wording about leap seconds and refer
+ directly to Wikipedia's leap second page for further information.
+ [Bug #6749]
+
+Mon Jul 30 23:01:47 2012 NARUSE, Yui <naruse@ruby-lang.org>
+
+ * lib/rubygems/platform.rb (Gem::Platform#initialize): Support pattern
+ like x86_64-netbsd6.99.7.
+
+Mon Jul 30 21:00:53 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * variable.c (find_class_path): no retry when preferred is given.
+
+ * variable.c (classname): if classid is set try it to find full
+ qualified class path, and then try arbitrary class path. try
+ tmp_classpath at last even if enclosing namespace is anonymous.
+ fix r36574. [ruby-core:42865][Bug #6078]
+
+ * variable.c (rb_set_class_path_string, rb_set_class_path): set
+ tmp_classpath instead of classpath if the name is not permanent.
+
+Mon Jul 30 14:24:20 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * variable.c: store anonymous class path in tmp_classpath but not in
+ classpath. [ruby-core:42865][Bug #6078]
+
+Mon Jul 30 13:11:54 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * configure.in (DLDFLAGS): on Darwin, deprecate -flat_namespace to get
+ rid of huge imported symbols table.
+
+ * configure.in (LIBRUBY_RELATIVE): libruby_so is not made when
+ disable-shared, so no absolute path is used for it and executable
+ file is runnable anywhere.
+
+Mon Jul 30 01:30:10 2012 CHIKANAGA Tomoyuki <nagachika@ruby-lang.org>
+
+ * common.mk: add a dependency. [ruby-core:46741] [Bug #6789]
+
+Sun Jul 29 15:44:47 2012 CHIKANAGA Tomoyuki <nagachika@ruby-lang.org>
+
+ * thread.c (thread_create_core): hide th->async_errinfo_mask_stack from
+ ObjectSpace.each_object. refix of r36539.
+
+Sun Jul 29 23:57:27 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * ext/socket/option.c (inet_ntop): use rb_w32_inet_ntop, instead of
+ inet_ntop directly, which is unavailable on older version Windows.
+
+ * win32/win32.c (rb_w32_inet_ntop): type should be const.
+
+Sun Jul 29 14:20:34 2012 Kazuki Tsujimoto <kazuki@callcc.net>
+
+ * thread.c (Init_Thread): does not need to set klass
+ explicitly.
+
+Sun Jul 29 06:21:04 2012 Hiroshi Shirosaki <h.shirosaki@gmail.com>
+
+ * win32/win32.c: suppress warning redeclared on mingw64.
+ *_s functions are declared if MINGW_HAS_SECURE_API is defined.
+ Follow up r36556.
+
+Sun Jul 29 00:28:46 2012 Narihiro Nakamura <authornari@gmail.com>
+
+ * gc.c: remove unused initialization.
+
+Sat Jul 28 16:26:09 2012 Hiroshi Shirosaki <h.shirosaki@gmail.com>
+
+ * win32/win32.c (gmtime_r): use _gmtime64_s() with x86_64-w64-mingw32.
+
+ * win32/win32.c (localtime_r): use _localtime64_s() with
+ x86_64-w64-mingw32. Since FileTimeToSystemTime() seems not work with
+ large value under x64. Mingw-w64 doesn't have these declaration.
+ [ruby-core:46780] [Bug #6794]
+
+Fri Jul 27 18:25:51 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * io.c (rb_io_check_io): make public.
+
+ * process.c (check_exec_redirect): try conversion to IO on redirect
+ parameters. [ruby-core:44181] [Bug #6269]
+
+Fri Jul 27 17:58:12 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * configure.in (RUBY_CPPOUTFILE): get rid of variable conflict so
+ CPPFLAGS is not duplicated. [ruby-core:43097] [Bug #6119]
+
+Fri Jul 27 12:12:36 2012 NAKAMURA Usaku <usa@ruby-lang.org>
+
+ * win32/mkexports.rb: should not export DllMain().
+ reported by luis at [ruby-core:46743] [Bug #6790], solved by
+ Heesob Park, and confirmed by nobu.
+
+Thu Jul 26 14:51:29 2012 URABE Shyouhei <shyouhei@ruby-lang.org>
+
+ * test/net/http/test_https.rb (TestNetHTTPS#test_session_reuse):
+ localhost is not (always) 127.0.0.1. Don't expect that.
+
+Thu Jul 26 07:18:38 2012 <kanemoto@ruby-lang.org>
+
+ * ext/json/fbuffer/fbuffer.h: avoid compilation error on AIX by
+ -ansi -std=iso9899:199409 (r36038). [ruby-core:46744] [Bug #6791].
+
+Thu Jul 26 00:42:23 2012 CHIKANAGA Tomoyuki <nagachika@ruby-lang.org>
+
+ * thread.c (thread_create_core, Init_Thread): hide
+ th->async_errinfo_queue and th->async_errinfo_mask_stack from
+ ObjectSpace.each_object.
+
+Wed Jul 25 17:41:05 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * complex.c, rational.c: compatible marshal loader for compatibilities
+ with 1.8. [ruby-core:45775] [Bug #6625]
+
+Wed Jul 25 17:17:05 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * atomic.h: prefer GCC atomic builtins than Windows APIs, if possible,
+ since they are generic.
+
+Wed Jul 25 11:16:57 2012 Eric Hodel <drbrain@segment7.net>
+
+ * lib/net/.document: Removed. All files in net/ should be included in
+ RDoc.
+
+Wed Jul 25 10:00:23 2012 NAKAMURA Usaku <usa@ruby-lang.org>
+
+ * test/testunit/test_redefinition.rb: broken class/method names.
+
+Wed Jul 25 09:26:32 2012 NARUSE, Yui <naruse@ruby-lang.org>
+
+ * lib/cgi/html.rb: Use << instead of +=.
+ `a += b` is syntax sugar of `a = a + b`; it creates a new string
+ object. `a << b` is concatenation and doesn't create new object.
+
+Wed Jul 25 09:16:26 2012 NARUSE, Yui <naruse@ruby-lang.org>
+
+ * lib/cgi/html.rb (element_init): suppress redefine warning.
+ Don't define methods if they are already defined.
+
+Wed Jul 25 09:05:38 2012 Eric Hodel <drbrain@segment7.net>
+
+ * lib/net/http.rb: Added SSL session reuse across connections for a
+ single instance to speed up connection. [Feature #5341]
+ * NEWS: ditto
+ * test/net/http/test_https.rb: Tests for #5341
+
+Wed Jul 25 06:54:24 2012 Eric Hodel <drbrain@segment7.net>
+
+ * doc/re.rdoc: Fix spelling
+
+Wed Jul 25 06:49:12 2012 Eric Hodel <drbrain@segment7.net>
+
+ * re.c (rb_reg_s_last_match): Update $~ to reference Regexp
+ documentation about "special global variables". [Bug #6723]
+
+Wed Jul 25 06:28:56 2012 Eric Hodel <drbrain@segment7.net>
+
+ * iseq.c: Added documentation. Patch by David Albert. [Bug #6785]
+
+Wed Jul 25 03:05:06 2012 Aaron Patterson <aaron@tenderlovemaking.com>
+
+ * parse.y: added symbols and qsymbols productions for %i and %I
+ support. %i{ .. } returns a list of symbols without interpolation,
+ %I{ .. } returns a list of symbols with interpolation. Thanks to
+ Josh Susser for inspiration of this feature. [Feature #4985]
+
+ * ext/ripper/eventids2.c: added ripper events for %i and %I.
+
+ * test/ripper/test_parser_events.rb: ripper tests
+
+ * test/ripper/test_scanner_events.rb: ditto
+
+ * test/ruby/test_array.rb: test for %i and %I behavior
+
+Tue Jul 24 23:34:43 2012 Hiroshi Shirosaki <h.shirosaki@gmail.com>
+
+ * include/ruby/win32.h (rb_w32_pow): add new function.
+ We use powl() instead of broken pow() for x64-mingw32. This workaround
+ fixes test failures related to floating point numeric.
+ [ruby-core:46686] [Bug #6784]
+
+Tue Jul 24 15:01:24 2012 NAKAMURA Usaku <usa@ruby-lang.org>
+
+ * win32/win32.c (rb_w32_socket, rb_w32_socketpair): remember the family
+ in the high word of socklist value.
+
+ * win32/win32.c (overlapped_socket_io, recvmsg, sendmsg, setfl): follow
+ above changes.
+
+ * win32/win32.c (rb_w32_getsockname): set remembered family to the
+ argument when OS's function fails.
+
+Tue Jul 24 12:35:13 2012 NAKAMURA Usaku <usa@ruby-lang.org>
+
+ * test/ruby/test_dir_m17n.rb: remove a garbage.
+
+ * test/ruby/test_dir_m17n.rb: convert from ascii-8bit to other encoding
+ with 8bit bytes always fails.
+
+Tue Jul 24 12:32:18 2012 NAKAMURA Usaku <usa@ruby-lang.org>
+
+ * test/ruby/test_dir_m17n.rb: sorry, typo.
+
+Tue Jul 24 12:13:26 2012 NAKAMURA Usaku <usa@ruby-lang.org>
+
+ * test/ruby/test_dir_m17n.rb: refactoring. RE should be in the left side
+ of the =~ operator, and compare the result with nil is meaningless.
+
+Tue Jul 24 11:35:20 2012 NAKAMURA Usaku <usa@ruby-lang.org>
+
+ * test/ruby/test_pack.rb (test_pack_unpack_M): was redefined
+ accidentally.
+
+Tue Jul 24 09:31:18 2012 Eric Hodel <drbrain@segment7.net>
+
+ * lib/rubygems: Updated to RubyGems 1.8.24, a bugfix release.
+
+Tue Jul 24 08:30:15 2012 Luis Lavena <luislavena@gmail.com>
+
+ * test/ruby/test_dir_m17n.rb (create_and_check_raw_file_name): add new
+ helper method to ease encoding testing. Patch by Oleg Sukhodolsky.
+ [ruby-core:46589][Bug #6765]
+
+ * test/ruby/test_dir_m17n.rb (test_filename_extutf8): use filesystem
+ encoding when reading entries and comparing.
+
+ * test/ruby/test_dir_m17n.rb (test_filename_utf8_raw_name): removed.
+
+ * test/ruby/test_dir_m17n.rb (test_filename_utf8_raw_jp_name): split test.
+
+Tue Jul 24 08:09:30 2012 Luis Lavena <luislavena@gmail.com>
+
+ * test/win32ole/test_win32ole_method.rb (is_ruby64?): Correct platform
+ used to identify mingw-w64 (x64-mingw32). Patch by Hiroshi Shirosaki.
+ [ruby-core:46651][Bug #6782]
+
+Tue Jul 24 07:22:58 2012 Eric Hodel <drbrain@segment7.net>
+
+ * time.c (time_sec): Updated description of leap seconds for accuracy.
+ Based on patch by Marcus Stollsteimer. [Bug #6749]
+
+Tue Jul 24 07:03:11 2012 Eric Hodel <drbrain@segment7.net>
+
+ * string.c (rb_str_sub): Fixed wording of documentation to match the
+ replacement operation. Minor cleanup of markup. [Bug #6719]
+ * string.c (rb_str_sub_bang): Minor wording change for clarity, minor
+ cleanup of markup.
+
+Mon Jul 23 23:58:40 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * enc/Makefile.in (TARGET_NAME, TARGET_ENTRY): needed for EXTDLDFLAGS
+ on some platforms. [ruby-core:46600] [Bug #6768]
+
+ * enc/depend: no longer needs tweaking DLDFLAGS for TARGET names.
+
+Mon Jul 23 22:48:19 2012 Tanaka Akira <akr@fsij.org>
+
+ * lib/open-uri.rb: use respond_to? to test Tempfile.
+ [ruby-dev:45995] [Bug #6781] reported by hsbt (Hiroshi SHIBATA).
+
+Mon Jul 23 14:43:34 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * configure.in (LIBPATHENV): LIBPATH is used on AIX, but not
+ SHLIB_PATH which was carelessly copied from HP/UX. suggested by
+ Perry Smith at [ruby-core:46397]. [Bug #6728]
+
+Mon Jul 23 01:55:08 2012 Kazuhiro NISHIYAMA <zn@mbf.nifty.com>
+
+ * test/uri/test_generic.rb (URI#test_find_proxy): add tests with
+ empty *_proxy env variables.
+
+Mon Jul 23 01:47:26 2012 Kazuhiro NISHIYAMA <zn@mbf.nifty.com>
+
+ * test/uri/test_generic.rb (URI#with_env): unset proxy related env
+ variables. [Bug #6774]
+
+ * test/uri/test_generic.rb (URI#test_find_proxy): fix failures
+ when proxy related env variables already set. [Bug #6774]
+
+Sun Jul 22 23:58:48 2012 NARUSE, Yui <naruse@ruby-lang.org>
+
+ * thread.c (rb_threadptr_execute_interrupts_common): increase
+ running_time_us on THREAD_TO_KILL like on THREAD_RUNNABLE.
+ This cause not to switch from a thread which is to be killed
+ on FreeBSD and Mac OS X. see also the test.
+ This issue maybe exist for long time but happens after r36430.
+
+Sat Jul 21 06:21:45 2012 NARUSE, Yui <naruse@ruby-lang.org>
+
+ * lib/net/http.rb: fixes for r36476. [Feature #6546]
+ http://u64.rubyci.org/~chkbuild/ruby-trunk/log/20120720T030101Z.diff.html.gz
+
+ * lib/net/http.rb (Net::HTTP.newobj): return back for compatibility.
+
+ * lib/net/http.rb (Net::HTTP.new): set default_port if proxy port is
+ not given.
+
+ * lib/net/http.rb (Net::HTTP#initialize): ditto.
+
+ * lib/net/http.rb (Net::HTTP#proxy?): return true or false.
+
+ * lib/net/http.rb (Net::HTTP#proxy_address): check proxy_uri is not nil.
+
+ * lib/net/http.rb (Net::HTTP#proxy_port): ditto.
+
+Sat Jul 21 23:12:53 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * thread_pthread.c (ruby_init_stack): STACK_GROW_DIR_DETECTION is
+ necessary on platforms with unknown stack direction. [Bug #6761]
+
+Sat Jul 21 15:13:42 2012 Shota Fukumori <sorah@tubusu.net>
+
+ * lib/test/unit/testcase.rb (method_added): refactoring.
+
+Sat Jul 21 14:06:41 2012 Shota Fukumori <sorah@tubusu.net>
+
+ * lib/test/unit/testcase.rb: warn when test_* method is redefined.
+ Patch by mame (Yusuke Endoh). [Feature #2643] [ruby-core:27790]
+
+ * test/testunit/test_redefinition.rb: Test for above.
+
+ * test/testunit/test4test_redefinition.rb: Ditto.
+
+Sat Jul 21 08:41:14 2012 Eric Hodel <drbrain@segment7.net>
+
+ * lib/logger.rb: Updated example in Logger comment to match other
+ examples and fixed a bug. Patch by Marcus Stollsteimer.
+ [Bug #6759]
+
+Fri Jul 20 17:20:54 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * random.c (rb_random_real): refine error message.
+
+Fri Jul 20 11:03:17 2012 Eric Hodel <drbrain@segment7.net>
+
+ * NEWS: Updated net/http for automatic proxy detection (#6546) and
+ automatic gzip and deflate compression (#6492, #6494).
+
+Fri Jul 20 10:55:38 2012 Eric Hodel <drbrain@segment7.net>
+
+ * lib/net/http.rb: Net::HTTP now automatically detects and uses
+ proxies from the environment. A proxy may also be specified as
+ before.
+
+ Net::HTTP::Proxy still creates anonymous classes, but these classes
+ are only used to store configuration information. When an HTTP
+ instance is created the configuration is now copied.
+
+ Additionally, Net::HTTP::ProxyDelta is no longer used by Net::HTTP
+
+ [Feature #6546]
+ * lib/open-uri.rb: Moved URI::Generic#find_proxy to uri/generic.
+ * lib/uri/generic.rb: Imported find_proxy from open-uri.
+ * test/open-uri/test_open-uri.rb: Moved proxy-discovery tests to URI.
+ * test/uri/test_generic.rb: Imported proxy-discovery tests from
+ open-uri.
+ * test/net/http/test_http.rb: Added tests for proxy behavior.
+
+Fri Jul 20 09:34:11 2012 Eric Hodel <drbrain@segment7.net>
+
+ * test/socket/test_socket.rb: Ignore IPv6 unique local addresses on OS
+ X (iCloud Back to my Mac addresses) for test_udp_socket since they do
+ not act as loopback addresses. [Bug #6692]
+
+Fri Jul 20 09:32:14 2012 Eric Hodel <drbrain@segment7.net>
+
+ * ext/socket/raddrinfo.c (addrinfo_ipv6_unique_local_p): Added
+ Addrinfo#ipv6_unique_local? to detect RFC 4193 unique local
+ addresses. Part of #6692
+ * ext/socket/rubysocket.h: Add IN6_IS_ADDR_UNIQUE_LOCAL macro if
+ missing.
+ * test/socket/test_addrinfo.rb: Test for ipv6_unique_local?
+
+Fri Jul 20 07:40:32 2012 Eric Hodel <drbrain@segment7.net>
+
+ * lib/net/http/response.rb: Automatically inflate gzip and
+ deflate-encoded response bodies. [Feature #6942]
+ * lib/net/http/generic_request.rb: Automatically accept gzip and
+ deflate content-encoding for requests. [Feature #6494]
+ * lib/net/http/request.rb: Updated documentation for #6494.
+ * lib/net/http.rb: Updated documentation for #6492 and #6494, removed
+ Content-Encoding handling now present in Net::HTTPResponse.
+ * test/net/http/test_httpresponse.rb: Tests for #6492
+ * test/net/http/test_http_request.rb: Tests for #6494
+ * test/open-uri/test_open-uri.rb (test_content_encoding): Updated test
+ for automatic content-encoding handling.
+
+Fri Jul 20 03:42:54 2012 NARUSE, Yui <naruse@ruby-lang.org>
+
+ * thread_pthread.c: use #ifdef, not #if.
+
+Thu Jul 19 15:08:40 2012 Koichi Sasada <ko1@atdot.net>
+
+ * thread.c (rb_thread_s_control_interrupt,
+ rb_thread_s_check_interrupt): added for
+ Thread.control_interrupt and Thread.check_interrupt.
+ See details on rdoc.
+ I'll make an ticket for this feature.
+
+ * test/ruby/test_thread.rb: add a test for Thread.control_interrupt.
+
+ * thread.c (rb_threadptr_raise): make a new exception object
+ even if argc is 0.
+
+ * thread.c (rb_thread_kill): kill thread immediately if target thread
+ is current thread.
+
+ * vm_core.h (RUBY_VM_CHECK_INTS_BLOCKING): added.
+ CHECK_INTS while/after blocking operation.
+
+ * vm_core.h (RUBY_VM_CHECK_INTS): require rb_thread_t ptr.
+
+ * cont.c (fiber_switch): use replaced RUBY_VM_CHECK_INTS().
+
+ * eval.c (ruby_cleanup): ditto.
+
+ * insns.def: ditto.
* process.c (rb_waitpid): ditto.
- * process.c (proc_wait): ditto.
+ * vm_eval.c (vm_call0): ditto.
- * process.c (proc_waitpid2): wrong recursion.
+ * vm_insnhelper.c (vm_call_method): ditto.
-Sat Oct 14 03:32:13 2000 Yukihiro Matsumoto <matz@ruby-lang.org>
+Thu Jul 19 22:46:48 2012 Tanaka Akira <akr@fsij.org>
- * eval.c (rb_thread_alloc): should not link a new thread in the
- live thread ring before initialization.
+ * test/ruby/test_io.rb: remove temporally files early.
-Fri Oct 13 17:08:09 2000 Shugo Maeda <shugo@ruby-lang.org>
+Thu Jul 19 15:38:35 2012 Shugo Maeda <shugo@ruby-lang.org>
- * lib/net/imap.rb: new file.
+ * variable.c (rb_mod_class_variables): return inherited variables
+ except when the optional argument is set to false.
+ [ruby-dev:44034] [Bug #4971]
-Thu Oct 12 18:56:28 2000 Minero Aoki <aamine@dp.u-netsurf.ne.jp>
+ * variable.c (rb_mod_constants): fix typo in documentation.
- * lib/net/pop.rb: POP3#reset
+Thu Jul 19 14:30:43 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * lib/net/http.rb: a code for "Switch Protocol" was wrongly 100.
+ * internal.h: move mark function declarations that should be private.
-Thu Oct 12 01:23:38 2000 Wakou Aoyama <wakou@fsinet.or.jp>
+Thu Jul 19 14:18:22 2012 NAKAMURA Usaku <usa@ruby-lang.org>
- * lib/cgi.rb: bug fix: CGI::html(): PRETTY option didn't work.
+ * ext/socket/init.c (rsock_init_sock): need to update max fd on all
+ platforms.
-Thu Oct 12 00:03:02 2000 Yukihiro Matsumoto <matz@ruby-lang.org>
+Thu Jul 19 14:15:48 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * object.c (sym_inspect): should adjust string length.
+ * thread.c (rb_gc_mark_threads): remove deprecated function.
- * struct.c (rb_struct_to_s): ditto.
+Thu Jul 19 13:28:03 2012 NAKAMURA Usaku <usa@ruby-lang.org>
- * struct.c (rb_struct_inspect): ditto.
+ * test/net/http/test_http.rb (TestNetHTTPLocalBind#test_bind_to_local*):
+ re-enable the tests because now it's OK on windows.
-Wed Oct 11 22:15:47 2000 Katsuyuki Komatsu <komatsu@sarion.co.jp>
+Thu Jul 19 13:26:25 2012 NAKAMURA Usaku <usa@ruby-lang.org>
- * eval.c (rb_thread_inspect): should adjust string length.
+ * ext/socket/extconf.rb: now enable IPv6 by default on mswin.
- * object.c (rb_any_to_s): ditto.
+Thu Jul 19 09:33:46 2012 Aaron Patterson <aaron@tenderlovemaking.com>
- * object.c (rb_obj_inspect): ditto.
+ * ext/psych/emitter.c (initialize): allow a configuration object to be
+ passed to the constructor so that mutation isn't required after
+ instantiation.
-Wed Oct 11 18:13:50 2000 Yukihiro Matsumoto <matz@ruby-lang.org>
+ * ext/psych/lib/psych/handler.rb: add configuration object
- * eval.c (rb_thread_start_0): should check insecure exit.
+ * ext/psych/lib/psych/visitors/emitter.rb: use configuration object if
+ extra configuration is present.
-Wed Oct 11 14:29:51 2000 Minero Aoki <aamine@dp.u-netsurf.ne.jp>
+Thu Jul 19 08:20:25 2012 Tanaka Akira <akr@fsij.org>
- * lib/net/protocol.rb: 2nd arg for ProtocolError#initialize is
- optional.
+ * test/ruby/test_file.rb: remove temporally files early.
- * lib/net/http.rb: code refining.
+Thu Jul 19 07:37:41 2012 Masatoshi SEKI <m_seki@mva.biglobe.ne.jp>
-Wed Oct 11 11:13:03 2000 Yukihiro Matsumoto <matz@ruby-lang.org>
+ * test/drb/drbtest.rb: fixed: can't delete unix domain sockets problem.
- * parse.y (primary): setter method (e.g. foo=) should always be
- public.
+Thu Jul 19 03:41:20 2012 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
- * eval.c (rb_thread_raise): should not raise SecurityError if
- exception raised by the interpreter.
+ * bignum.c: Added #include <strings.h> for ffs(). Patch by Perry
+ Smith. Thank you. [Bug #6748]
- * eval.c (rb_thread_cleanup): skip all THREAD_KILLED threads
- before FOREACH_THREAD.
+Thu Jul 19 01:56:02 2012 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
-Tue Oct 10 16:11:54 2000 WATANABE Hirofumi <eban@ruby-lang.org>
+ * include/ruby/intern.h (rb_num_zerodiv): Added NORETURN.
+ Patched by Xi Wang. [Bug #6736]
- * dln.c (dln_load): remove unused code for cygwin.
+Wed Jul 18 23:57:38 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Tue Oct 10 09:49:23 2000 Yukihiro Matsumoto <matz@ruby-lang.org>
+ * pack.c (pack_pack): round down too long uuencode width. folding
+ width in uuencode format cannot be longer than 63 bytes.
- * file.c (Init_File): FileTest.size should return 0 (not nil) for
- empty files.
+Wed Jul 18 23:04:18 2012 NARUSE, Yui <naruse@ruby-lang.org>
-Sun Oct 8 13:20:26 2000 Guy Decoux <decoux@moulon.inra.fr>
+ * ext/dbm/dbm.c (fdbm_empty_p): fix wrong condition introduced in r36438.
- * eval.c (POP_SCOPE): not just set SCOPE_DONT_RECYCLE, but do
- scope_dup().
+ * ext/sdbm/init.c (fsdbm_empty_p): ditto.
-Sat Oct 7 15:10:50 2000 Yukihiro Matsumoto <matz@ruby-lang.org>
+Wed Jul 18 23:08:57 2012 Tanaka Akira <akr@fsij.org>
- * string.c (rb_str_reverse_bang): unnecessary ALLOCA_N() was
- removed.
+ * test/ruby/test_beginendblock.rb: remove temporally files early.
-Fri Oct 6 14:50:24 2000 WATANABE Hirofumi <eban@ruby-lang.org>
+Wed Jul 18 22:43:02 2012 Tanaka Akira <akr@fsij.org>
- * ext/extmk.rb.in, lib/mkmf.rb: remove "DESTDIR =".
+ * test/ruby/test_autoload.rb: remove temporally files early.
- * Makefile.in, win32/Makefile.sub, ruby.1: renamed -X to -C.
+Wed Jul 18 21:59:46 2012 Tanaka Akira <akr@fsij.org>
-Fri Oct 6 12:50:52 2000 Yukihiro Matsumoto <matz@ruby-lang.org>
+ * test/ruby/test_argf.rb: use temporally directory.
- * array.c (rb_ary_plus): use to_ary(), not Check_Type().
+Wed Jul 18 19:41:19 2012 Tanaka Akira <akr@fsij.org>
- * array.c (rb_ary_concat): ditto.
+ * test/openssl/test_config.rb: remove temporally files early.
- * gc.c (rb_gc): use __builtin_frame_address() for gcc.
+Wed Jul 18 17:45:26 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * eval.c (stack_length): ditto.
+ * error.c (rb_builtin_type_name): map by index.
- * parse.y (assign_in_cond): stop warning till some better warning
- condition will be found.
+Wed Jul 18 16:17:40 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Thu Oct 5 18:02:39 2000 Yukihiro Matsumoto <matz@ruby-lang.org>
+ * lib/mkmf.rb (have_framework): get rid of separating -framework
+ option and its argument and dealing with the argument as a library
+ or an object name. if $LDFLAGS were an array...
- * object.c (rb_obj_dup): should have propagated taint flag.
- (ruby-bugs:#PR64,65)
+Wed Jul 18 16:09:10 2012 Shugo Maeda <shugo@ruby-lang.org>
-Wed Oct 4 00:26:11 2000 Yukihiro Matsumoto <matz@ruby-lang.org>
+ * ext/curses/extconf.rb: support PDCurses. patched by Luis Lavena.
+ [ruby-core:46485] [Feature #6735]
- * eval.c (proc_arity): proc{|a|}'s arity should be -1.
+Wed Jul 18 15:50:25 2012 Shugo Maeda <shugo@ruby-lang.org>
-Mon Oct 2 05:28:58 2000 akira yamada <akira@ruby-lang.org>
+ * parse.y (primary): allow an empty grouped expression as the
+ operand of the not operator (e.g., not ()).
+ [ruby-core:45976] [Bug #6674]
- * string.c (trnext): minus at the end of pattern.
+ * parse.y (parser_yylex): show no warning for a grouped expression
+ as the operand of the not operator (e.g., not (a)) or as an
+ argument of a method call without parentheses (e.g., foo (a)).
+ [ruby-core:39050] [Bug #5214]
-Sun Oct 1 00:43:34 2000 WATANABE Hirofumi <eban@ruby-lang.org>
+Wed Jul 18 15:33:21 2012 Koichi Sasada <ko1@atdot.net>
- * configure.in: exp-name was wrong on cygwin and mingw32.
+ * thread.c (rb_thread_call_without_gvl2): added.
+ it can skip last CHECK_INTS. See document for more details.
+ Document about it was updated a bit.
-Thu Sep 28 14:57:09 2000 Yukihiro Matsumoto <matz@ruby-lang.org>
+ * include/ruby/thread.h (decl. of rb_thread_call_without_gvl2): added.
- * regex.c (re_compile_pattern): should try must_string calculation
- every time.
+ * thread.c (rb_thread_call_with_gvl): remove "EXPERIMENTAL!"
+ warning from a document.
-Tue Sep 19 23:47:44 2000 SHIROYAMA Takayuki <psi@fortune.nest.or.jp>
+Wed Jul 18 14:53:21 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * configure.in, config.guess, config.sub: MacOS X support.
+ * configure.in (EXTDLDFLAGS): split options for each extension
+ libraries, and unused in ruby.pc. [Bug #6734]
-Wed Sep 27 18:40:05 2000 Yukihiro Matsumoto <matz@ruby-lang.org>
+ * lib/mkmf.rb (MakeMakefile#configuration): add EXTDLDFLAGS.
- * stable version 1.6.1 released.
+Wed Jul 18 14:47:23 2012 Koichi Sasada <ko1@atdot.net>
-Wed Sep 27 16:13:05 2000 WATANABE Hirofumi <eban@ruby-lang.org>
+ * thread.c: fix last commit miss.
- * mkconfig.rb: variables should be expanded only if /\$\{?\w+\}?/.
+Wed Jul 18 14:16:51 2012 Koichi Sasada <ko1@atdot.net>
-Tue Sep 26 18:09:51 2000 WATANABE Hirofumi <eban@ruby-lang.org>
+ * thread.c (rb_threadptr_async_errinfo_*): manage async errors queue.
+ Async events such as an exception throwed by Thread#raise,
+ Thread#kill and thread termination (after main thread termination)
+ will be queued to th->async_errinfo_queue.
+ - clear: clear the queue.
+ - enque: enque err object into queue.
+ - deque: deque err object from queue.
+ - active_p: return 1 if the queue should be checked.
+ rb_thread_t#thrown_errinfo was removed.
- * string.c: include <math.h>
+ * vm_core.h: add declarations of rb_threadptr_async_errinfo_*.
+ remove rb_thread_t#thrown_errinfo field and
+ add rb_thread_t#async_errinfo_queue (queue body: Array),
+ rb_thread_t#async_errinfo_queue_checked (flag),
+ rb_thread_t#async_errinfo_mask_stack(Array, not used yet).
-Tue Sep 26 15:59:50 2000 Yukihiro Matsumoto <matz@ruby-lang.org>
+ * vm.c (rb_thread_mark): fix a mark function.
- * object.c (rb_mod_dup): metaclasses of class/module should not be
- cleared by rb_obj_dup.
+ * cont.c (rb_fiber_start): enque an error.
-Tue Sep 26 02:44:54 2000 Yukihiro Matsumoto <matz@ruby-lang.org>
+ * process.c (after_fork): clear async errinfo queue.
- * gc.c (GC_MALLOC_LIMIT): size extended.
+Wed Jul 18 14:25:55 2012 URABE Shyouhei <shyouhei@ruby-lang.org>
- * regex.c (DOUBLE_STACK): use machine's stack region for regex
- stack if its size is small enough.
+ * pack.c: (ditto) bitwise operations are not char. Apply explicit
+ casts on them.
-Mon Sep 25 18:13:07 2000 Yukihiro Matsumoto <matz@ruby-lang.org>
+Wed Jul 18 12:59:50 2012 URABE Shyouhei <shyouhei@ruby-lang.org>
- * regex.c: include <defines.h>.
+ * encoding.c (load_encoding): explicit cast to suppress warning.
+ Though the cast truncates some bits, from heuristic analysis I
+ believe it is OK to do so here.
- * eval.c (rb_add_method): cache mismatch by method
- definition. need to clear_cache_by_id every time.
+ * bignum.c (rb_cstr_to_inum): ditto.
-Mon Sep 25 13:31:45 2000 WATANABE Hirofumi <eban@os.rim.or.jp>
+Wed Jul 18 12:55:54 2012 NARUSE, Yui <naruse@ruby-lang.org>
- * win32/win32.c (NtCmdGlob): substitute '\\' with '/'.
+ * lib/benchmark.rb: Fix Benchmark.benchmark output with an empty
+ caption. patched by Benoit Daloze. [ruby-core:45719] [Bug #6610]
-Mon Sep 25 00:35:01 2000 WATANABE Hirofumi <eban@os.rim.or.jp>
+Wed Jul 18 10:00:54 2012 Eric Hodel <drbrain@segment7.net>
- * defines.h: #undef HAVE_SETITIMER on cygwin.
+ * lib/debug.rb: Added toplevel documentation. Based on patch by Oscar
+ Del Ben. [Bug #6743], fixes #146 on github.
-Sun Sep 24 03:01:53 2000 Minero Aoki <aamine@dp.u-netsurf.ne.jp>
+Wed Jul 18 09:33:59 2012 NAKAMURA Usaku <usa@ruby-lang.org>
- * lib/net/protocol.rb, http.rb: typo.
+ * test/win32ole/test_win32ole_event.rb (TestWIN32OLE_EVENT): use
+ standard skip method to skip tests.
-Sat Sep 23 07:33:20 2000 Aleksi Niemela <aleksi.niemela@cinnober.com>
+Wed Jul 18 09:26:45 2012 Eric Hodel <drbrain@segment7.net>
- * regex.c (re_compile_pattern): nicer regexp error messages for
- invalid patterns.
+ * lib/logger.rb: Updated typos and output to match modern Logger
+ output. Patch by Marcus Stollsteimer. [Bug #6738]
-Sat Sep 23 03:06:25 2000 Yukihiro Matsumoto <matz@ruby-lang.org>
+Wed Jul 18 07:59:29 2012 Takeyuki FUJIOKA <xibbar@ruby-lang.org>
- * variable.c (rb_autoload_load): should not require already
- provided features.
+ * lib/cgi/util.rb (CGI.escapeHTML,unescapeHTML): Add &apos; for HTML5
+ escaping.
+ [Feature #6620]
-Fri Sep 22 15:46:21 2000 Minero Aoki <aamine@dp.u-netsurf.ne.jp>
+Tue Jul 17 22:17:13 2012 Tanaka Akira <akr@fsij.org>
- * lib/net/http.rb: too early parameter expansion in string.
+ * lib/open-uri.rb: call io.close! for Tempfile.
-Fri Sep 22 13:58:51 2000 WATANABE Hirofumi <eban@os.rim.or.jp>
+Tue Jul 17 16:41:32 2012 NARUSE, Yui <naruse@ruby-lang.org>
- * ext/extmk.rb.in: don't use default $:
+ * proc.c (rb_proc_arity): return normal value (not -n-1) if it is not
+ a labmda, or it is a labmda and no arg_opts. [Bug #5694]
-Fri Sep 22 13:42:50 2000 Katsuyuki Komatsu <komatsu@sarion.co.jp>
+Tue Jul 17 03:56:34 2012 Aaron Patterson <aaron@tenderlovemaking.com>
- * regex.c (PUSH_FAILURE_COUNT): avoid casting warning on alpha.
+ * ext/psych/lib/psych/visitors/to_ruby.rb: strings with YAML anchors
+ are properly referenced. Patched by Joe Rafaniello via Github:
+ https://github.com/tenderlove/psych/pull/69
+ * ext/psych/lib/psych/visitors/yaml_tree.rb: ditto
+ * test/psych/test_alias_and_anchor.rb: test for change
- * regex.c (PUSH_FAILURE_POINT): ditto.
+Mon Jul 16 23:20:24 2012 Tanaka Akira <akr@fsij.org>
-Fri Sep 22 10:16:21 2000 WATANABE Hirofumi <eban@os.rim.or.jp>
+ * bignum.c (rb_integer_float_cmp): use FIXNUM_MIN and FIXNUM_MAX,
+ instead of LONG_MIN and LONG_MAX.
- * win32/config.h.in: add HAVE_TELLDIR, HAVE_SEEKDIR
+Mon Jul 16 22:50:41 2012 Tanaka Akira <akr@fsij.org>
-Thu Sep 21 19:04:34 2000 WATANABE Hirofumi <eban@os.rim.or.jp>
+ * numeric.c (flo_to_s): use the exponential form if the integer part
+ is longer than or equal DBL_DIG.
+ [ruby-dev:45960] [ruby-trunk - Bug #6741]
- * ext/extmk.rb, lib/mkmf.rb (install_rb): check whether libdir is
- directory or not.
+Mon Jul 16 22:01:00 2012 Ayumu AIZAWA <ayumu.aizawa@gmail.com>
-Thu Sep 21 17:23:05 2000 Yukihiro Matsumoto <matz@ruby-lang.org>
+ * ext/readline/readline.c: fixed docs. [Bug #6740][ruby-core:46501]
+ patched by Nobuhiro IMAI.
- * file.c (rb_file_s_symlink): use HAVE_SYMLINK.
+Mon Jul 16 19:24:01 2012 Tanaka Akira <akr@fsij.org>
- * file.c (rb_file_s_readlink): use HAVE_READLINK.
+ * bignum.c (rb_integer_float_eq): new function.
+ (rb_big_eq): use rb_integer_float_eq.
- * dir.c (dir_tell): use HAVE_TELLDIR.
+ * internal.h (rb_integer_float_eq): declared.
- * dir.c (dir_seek): use HAVE_SEEKDIR.
+ * numeric.c (flo_eq): use rb_integer_float_eq.
+ (fix_equal): ditto.
- * configure.in (AC_CHECK_FUNCS): lstat, symlink, readlink,
- telldir, seekdir checks added.
+Mon Jul 16 19:02:31 2012 Tanaka Akira <akr@fsij.org>
- * file.c (lstat): should use stat(2) if lstat(2) is not
- available.
+ * bignum.c (rb_integer_float_cmp): rename a local variable.
-Thu Sep 21 15:59:23 2000 Minero Aoki <aamine@dp.u-netsurf.ne.jp>
+Mon Jul 16 18:40:26 2012 Tanaka Akira <akr@fsij.org>
- * lib/net/protocol.rb, smtp.rb, pop.rb, http.rb: 1.1.29.
+ * bignum.c (rb_integer_float_cmp): renamed from rb_big_float_cmp.
- * lib/net/http.rb: HTTPReadAdapter -> HTTPResponseReceiver
+ * internal.h: follow the above change.
- * lib/net/http.rb (connecting): response is got in receive()
+ * numeric.c: ditto.
-Thu Sep 21 15:49:07 2000 Wayne Scott <wscott@ichips.intel.com>
+Mon Jul 16 17:57:54 2012 Tanaka Akira <akr@fsij.org>
- * lib/find.rb (find): should not follow symbolic links;
- tuned performance too.
+ * bignum.c (rb_big_float_cmp): compare an integer and float precisely.
+ [ruby-core:31376] [Bug #3589] reported by Tomasz Wegrzanowski.
-Wed Sep 20 23:21:38 2000 Yukihiro Matsumoto <matz@ruby-lang.org>
+Mon Jul 16 17:29:45 2012 Tanaka Akira <akr@fsij.org>
- * ruby.c (load_file): two Ctrl-D was required to stop ruby at the
- beginning of stdin script read.
+ * bignum.c (rb_big_float_cmp): support fixnum for argument x.
-Wed Sep 20 14:01:45 2000 Yukihiro Matsumoto <matz@ruby-lang.org>
+ * numeric.c (fix_equal): use rb_big_float_cmp.
+ (fix_cmp): ditto.
+ (fix_gt): ditto.
+ (fix_ge): ditto.
+ (fix_lt): ditto.
+ (fix_le): ditto.
+ (flo_eq): ditto.
+ (flo_cmp): use rb_big_float_cmp for fixnum argument.
+ (flo_gt): ditto.
+ (flo_ge): ditto.
+ (flo_lt): ditto.
+ (flo_le): ditto.
- * eval.c (rb_provided): detect infinite load loop.
+Mon Jul 16 17:05:53 2012 Ayumu AIZAWA <ayumu.aizawa@gmail.com>
- * eval.c (rb_provided): too weak filename comparison.
+ * test/fileutils/test_fileutils.rb: add test for FileUtils#uptodate?
- * eval.c (rb_thread_alloc): avoid recycling still referenced
- dvar structures.
+Mon Jul 16 16:56:12 2012 Ayumu AIZAWA <ayumu.aizawa@gmail.com>
- * eval.c (rb_callcc): ditto.
+ * lib/fileutils.rb (FileUtils.uptodate?): remove useless parameter.
+ patched by Oscar Del Ben.[Bug #6708][ruby-core:46256]
- * eval.c (THREAD_ALLOC): fiil dyna_vars field by ruby_dyna_vars.
+Mon Jul 16 15:37:56 2012 Tanaka Akira <akr@fsij.org>
-Tue Sep 19 17:47:03 2000 Yukihiro Matsumoto <matz@ruby-lang.org>
+ * bignum.c (rb_big_eq): use rb_big_float_cmp.
- * stable version 1.6.0 released.
+Mon Jul 16 15:00:45 2012 Tanaka Akira <akr@fsij.org>
-Tue Sep 19 16:24:52 2000 Yukihiro Matsumoto <matz@ruby-lang.org>
+ * internal.h (rb_big_float_cmp): declared.
- * marshal.c (Init_marshal): provide marshal.so no more.
+ * bignum.c (rb_big_float_cmp): extracted from rb_big_cmp and big_op.
+ (rb_big_cmp): use rb_big_float_cmp.
+ (big_op): ditto.
-Tue Sep 19 14:01:01 2000 WATANABE Hirofumi <eban@os.rim.or.jp>
+ * numeric.c (flo_cmp): use rb_big_float_cmp.
+ (flo_gt): ditto.
+ (flo_ge): ditto.
+ (flo_lt): ditto.
+ (flo_le): ditto.
- * configure.in, win32/setup.mak: include version number
- in RUBY_SO_NAME.
+Mon Jul 16 14:14:21 2012 Tanaka Akira <akr@fsij.org>
-Tue Sep 19 13:07:47 2000 Yukihiro Matsumoto <matz@ruby-lang.org>
+ * bignum.c (enum big_op_t): new type.
+ (big_op): use enum big_op_t.
+ (big_gt): ditto.
+ (big_ge): ditto.
+ (big_lt): ditto.
+ (big_le): ditto.
- * parse.y (yylex): was confusing $~ and $_.
+Sat Jul 14 18:18:48 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Tue Sep 19 13:06:53 2000 GOTOU YUUZOU <gotoyuzo@notwork.org>
+ * array.c (rb_get_values_at): fill with nil out of range.
+ [ruby-core:43678] [Bug #6203]
- * signal.c (rb_f_kill): signum may be a negative number, should be
- treated by signed number.
+Sat Jul 14 17:17:55 2012 Ayumu AIZAWA <ayumu.aizawa@gmail.com>
-Tue Sep 19 01:14:56 2000 Yukihiro Matsumoto <matz@ruby-lang.org>
+ * cont.c (cont_restore_0): improve docs. [Bug #6706][ruby-core:46243]
+ patched by Oscar Del Ben via https://github.com/ruby/ruby/pull/140
- * eval.c (rb_provide): better feature handling.
+Sat Jul 14 17:08:13 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * eval.c (rb_f_require): loading ruby library may be partial
- state. checks in rb_thread_loading is integrated.
+ * hash.c (rb_hash_s_create): raise an exception, when input elements
+ are not one or two elements arrays. [ruby-core:39945] [Bug #5406]
- * eval.c (rb_provided): better thread awareness.
+Sat Jul 14 16:16:48 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * lib/irb/frame.rb: 6 (not 5) parameters for trace_func proc.
+ * lib/test/unit.rb (Test::Unit::Runner#_run_parallel): use
+ Array#uniq!.
- * eval.c (error_print): should print error position even if
- get_backtrace() failed.
+ * lib/test/unit.rb (Test::Unit::Runner#deal): deal tasks to workers.
-Sat Sep 16 03:29:59 2000 Yukihiro Matsumoto <matz@ruby-lang.org>
+ * lib/test/unit.rb (Test::Unit::Runner#quit_workers): close and kill
+ all workers.
- * eval.c (rb_f_require): rb_provided() was called too early; does
- not work well with threads.
+ * lib/test/unit.rb (Test::Unit::Runner#delete_worker): delete dead
+ worker from working set.
- * parse.y (ensure): should distinguish empty ensure and non
- existing ensure.
+ * lib/test/unit.rb (Test::Unit::Runner#launch_worker): add new worker
+ to working set.
- * file.c (Init_File): extending File by class of FileTest was
- serious mistake.
+ * lib/test/unit.rb (Test::Unit::Runner#launch_worker): extract.
-Thu Sep 14 02:46:54 2000 Yukihiro Matsumoto <matz@ruby-lang.org>
+ * lib/test/unit.rb (Test::Unit::Runner#start_watchdog): extract.
- * eval.c (rb_thread_yield): array strip should be done in this
- function.
+ * lib/test/unit.rb (Test::Unit::Runner#_run_parallel): move
+ initializations with nothing to release outside begin/ensure.
-Wed Sep 13 17:01:03 2000 Yukihiro Matsumoto <matz@ruby-lang.org>
+Sat Jul 14 16:04:24 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * bignum.c (rb_big_eq): incomplete value comparison of bignums.
+ * array.c (rb_ary_join): should not infected by separator if it is not
+ used. [ruby-core:42161][Bug #5902]
-Wed Sep 13 06:39:54 2000 Yukihiro Matsumoto <matz@ruby-lang.org>
+Sat Jul 14 02:31:55 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * variable.c (rb_mod_class_variables): Module#class_variables added.
+ * include/ruby/intern.h (rb_thread_blocking_region): fix declarations
+ prototypes without arguments in C++ have different meanings than C.
-Wed Sep 13 06:09:26 2000 Wakou Aoyama <wakou@fsinet.or.jp>
+Thu Jul 12 12:32:26 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * lib/cgi.rb: bug fix: CGI::header(): output status header.
+ * test/runner.rb: skip default gems to get rid of loading old versions
+ before installation.
-Wed Sep 13 01:09:12 2000 Yukihiro Matsumoto <matz@ruby-lang.org>
+Thu Jul 12 11:44:23 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * parse.y (yylex): allow global variables like '$__a'.
+ * string.c (rb_str_new_frozen): since the result object should have
+ same tainted/untrusted bits with the original object, return new
+ object if the shared object unmatch. [ruby-core:39745][Bug #5374]
-Tue Sep 12 22:28:43 2000 WATANABE Hirofumi <eban@os.rim.or.jp>
+Thu Jul 12 10:46:39 2012 NAKAMURA Usaku <usa@ruby-lang.org>
- * ext/socket/extconf.rb: avoid using terrible <netinet/tcp.h>
- on cygwin 1.1.5.
+ * test/net/http/test_http.rb (TestNetHTTPLocalBind#test_bind_to_local*):
+ cannot cross between network interfaces on Windows, so skip this test
+ until we find better test.
-Tue Sep 12 16:01:58 2000 WATANABE Hirofumi <eban@os.rim.or.jp>
+Thu Jul 12 08:48:33 2012 Ryan Davis <ryand-ruby@zenspider.com>
- * array.c (rb_ary_unshift_m): typo.
+ * lib/minitest/*: Imported minitest 3.2.0 (r7598)
+ * test/minitest/*: ditto
-Tue Sep 12 15:37:55 2000 Yukihiro Matsumoto <matz@ruby-lang.org>
+Thu Jul 12 05:11:41 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * eval.c (rb_yield_0): stripped array too much, should remove just
- for proc_call().
+ * insns.def (defined): use method entry and id in cfp for proper
+ superclass, since klass in iseq is shared by dynamically defined
+ methods from the same block. [ruby-core:45831][Bug #6644]
-Tue Sep 12 07:05:24 2000 Wakou Aoyama <wakou@fsinet.or.jp>
+Thu Jul 12 01:49:07 2012 NARUSE, Yui <naruse@ruby-lang.org>
- * lib/cgi.rb: version 2.0.0: require ruby1.5.4 or later.
+ * lib/net/http.rb (Net::HTTP#connect): use local_host and local_port
+ if specified. patched by Ricardo Amorim [Feature #6617]
- * lib/net/telnet.rb: version 1.6.0
+Wed Jul 11 17:36:39 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Tue Sep 12 03:26:07 2000 Yukihiro Matsumoto <matz@ruby-lang.org>
+ * ext/extmk.rb: append ENCOBJS to DLDOBJS but not EXTSOLIBS which is
+ not a target, to compile enc/encinit.c.
- * eval.c (massign): use to_ary to get an array if available.
+Wed Jul 11 12:38:20 2012 NAKAMURA Usaku <usa@ruby-lang.org>
- * object.c (rb_Array): ditto.
+ * ext/openssl/ossl_pkey_ec.c (ossl_ec_point_mul): nonstatic initializer
+ of an aggregate type is a C99ism.
-Mon Sep 11 14:24:47 2000 Yukihiro Matsumoto <matz@ruby-lang.org>
+ * ext/openssl/ossl_pkey_ec.c (ossl_ec_point_mul): get rid of VC++
+ warnings.
- * hash.c (ruby_setenv): should not free the element of
- origenvironment.
+Mon Jul 9 16:11:30 2012 Yuki Yugui Sonoda <yugui@google.com>
- * parse.y (command_call): kYIELD moved to this rule to allow
- 'a = yield b'. (ruby-bugs-ja:#PR15)
+ * vm_eval.c (rb_eval_string_from_file,
+ rb_eval_string_from_file_protect): new functions to replace
+ rb_compile_main_from_string() and ruby_eval_main().
-Mon Sep 11 01:27:54 2000 Yukihiro Matsumoto <matz@ruby-lang.org>
+ * nacl/pepper_ruby.c: Follows the change in vm_eval.c
- * eval.c (rb_yield_0): proc#call([]) should pass single value to
- the block.
+Mon Jul 9 14:05:42 2012 Yuki Yugui Sonoda <yugui@google.com>
- * eval.c (callargs): reduce array allocation.
+ Reverts a half of r36079. As we discussed on ruby-dev@ and IRC,
+ we do not need to disclose intermediate representation of program.
+ The program embedding CRuby should use rb_eval_string family.
+ * include/ruby/ruby.h (ruby_opaque_t): removed.
+ (ruby_compile_main_from_file, ruby_compile_main_from_string,
+ ruby_eval_main): removed.
- * eval.c (massign): precise check for argument number.
+ * eval.c (ruby_eval_main_internal): became ruby_exec_internal() again.
+ (ruby_eval_main): removed.
-Fri Sep 8 10:05:17 2000 Yukihiro Matsumoto <matz@ruby-lang.org>
+ * ruby.c (PREPARE_PARSE_MAIN) reverted.
+ (parse_and_compile_main, ruby_compile_main_from_file,
+ ruby_compile_main_from_string): removed
- * gc.c (STR_NO_ORIG): should be FL_USER2.
+Wed Jul 11 10:16:38 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Thu Sep 7 14:17:51 2000 Yukihiro Matsumoto <matz@ruby-lang.org>
+ * include/ruby.h (HAVE_RUBY_THREAD_H): to show ruby/thread.h to be
+ available. fixup of r36355.
- * string.c (rb_str_cat): should work even for concatenating same
- string.
+Wed Jul 11 03:26:47 2012 Eric Hodel <drbrain@segment7.net>
-Wed Sep 6 17:06:38 2000 Yukihiro Matsumoto <matz@ruby-lang.org>
+ * ext/zlib/zlib.c: Added streaming support to inflate processing.
+ This allows zlib streams to be processed without huge memory growth.
+ [Feature #6612]
+ * NEWS: ditto
+ * ext/zlib/zlib.c (zstream_expand_buffer): Uses rb_yield when a block
+ is given for streaming support. Refactored to use
+ zstream_expand_buffer_into to remove duplicate code.
+ * ext/zlib/zlib.c (zstream_expand_buffer_protect): Added wrapper
+ function to pass jump state back through GVL-free section to allow
+ zstream clean-up before terminating the ruby call.
+ * ext/zlib/zlib.c (zstream_expand_buffer_without_gvl): Acquire GVL to
+ yield processed chunk of output stream.
+ * ext/zlib/zlib.c (zstream_detach_buffer): When a block is given,
+ returns Qnil mid-stream and yields the output buffer at the end of
+ the stream.
+ * test/zlib/test_zlib.rb: Updated tests
- * variable.c (rb_cvar_declare): should check superclass's class
- variable first.
+Tue Jul 10 22:57:03 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Wed Sep 6 10:42:02 2000 Yukihiro Matsumoto <matz@ruby-lang.org>
+ * include/ruby/thread.h: new header file for thread stuff.
- * misc/ruby-mode.el (ruby-calculate-indent): shift continuing line
- if previous line ends with modifier keyword.
+ * thread.c (rb_thread_call_without_gvl): export. [Feature#4328]
+ returns void* instead of VALUE. [Feature #5543]
- * misc/ruby-mode.el (ruby-parse-region): should not give up if
- modifiers are at the end of line.
+ * thread.c (rb_thread_blocking_region): deprecate. [ruby-core:46295]
- * misc/ruby-mode.el (ruby-expr-beg): indented wrongly if modified
- statement was size 1.
+Tue Jul 10 10:48:59 2012 NAKAMURA Usaku <usa@ruby-lang.org>
-Wed Sep 6 10:41:19 2000 Kenichi Komiya <kom@mail1.accsnet.ne.jp>
+ * include/ruby/win32.h (NT, NtInitialize): removed unused old macros.
- * misc/ruby-mode.el (ruby-parse-region): modifier was not handled
- well on emacs19.
+Tue Jul 10 10:43:37 2012 NAKAMURA Usaku <usa@ruby-lang.org>
-Tue Sep 5 17:10:12 2000 Yukihiro Matsumoto <matz@ruby-lang.org>
+ * configure.in: removed --enable/disable-win95 options. (see r36342)
- * time.c (time_to_s): fixed zone string UTC for utc time object.
+Tue Jul 10 00:44:41 2012 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
-Tue Sep 5 00:26:06 2000 Yukihiro Matsumoto <matz@ruby-lang.org>
+ * include/ruby/ruby.h: Removed RUBY_GLOBAL_SETUP completely. It is
+ no meaning definition since r24894.
+ * main.c: ditto.
+ * nacl/pepper_main.c: ditto.
- * regex.c (re_search): range worked wrongly on bm_search().
+Mon Jul 9 23:59:36 2012 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
-Mon Sep 4 13:40:40 2000 WATANABE Hirofumi <eban@os.rim.or.jp>
+ * dln.c: Simplify and make consistent an ifdef for Mac OS X.
+ * ext/socket/rubysocket.h: ditto.
+ * ext/tk/stubs.c: ditto.
+ * io.c: ditto.
+ * process.c: ditto.
+ * signal.c: ditto.
+ * vm_dump.c: ditto.
- * configure.in: renamed libruby.a to libruby.{cygwin,mingw32}.a
- on cygwin and mingw32.
+Mon Jul 9 17:37:35 2012 NAKAMURA Usaku <usa@ruby-lang.org>
-Sun Sep 3 23:44:04 2000 Noriaki Harada <tenmei@maoh.office.ne.jp>
+ * win32/win32.c (win95_stat): removed unnecessary macro.
- * io.c (NO_SAFE_RENAME): for BeOS too.
+Mon Jul 9 17:22:16 2012 NAKAMURA Usaku <usa@ruby-lang.org>
-Sun Sep 3 11:31:53 2000 Takaaki Tateishi <ttate@jaist.ac.jp>
+ * win32/configure.bat, win32/setup.mak, win32/Makefile.sub: omitted
+ Win9x support. removed --enable/disable-win95 options.
- * parse.y (rescue): no assignment was done if rescue body was
- empty.
+ * include/ruby/win32.h, file.c, win32/win32.c: ditto.
-Sat Sep 2 10:52:21 2000 Yukihiro Matsumoto <matz@ruby-lang.org>
+ * win32/README.win32: ditto.
- * parse.y (call_args,aref_args): block_call can be the last
- argument.
+Mon Jul 9 13:28:34 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * parse.y (COND_PUSH,COND_POP): maintain condition stack to allow
- kDO2 in parentheses in while/until/for conditions.
+ * configure.in (DLDFLAGS): use TARGET_ENTRY to specify an entry point
+ instead of TARGET which may contain non-identifier characters.
- * parse.y (yylex): generate kDO2 for EXPR_ARG outside of
- while/until/for condition.
+ * lib/mkmf.rb (create_makefile): add TARGET_NAME which is the first
+ part consists of only word characters. [ruby-core:46248][Bug #6709]
-Fri Sep 1 10:36:29 2000 Yukihiro Matsumoto <matz@ruby-lang.org>
+Sun Jul 8 07:36:19 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * parse.y (aref_args,opt_call_args): add block_call to allow a
- method without parentheses and with block as a last argument.
+ * parse.y (shadowing_lvar_gen, warn_unused_var): no warnings for
+ variables starting with _. [ruby-core:46160][Feature #6693]
- * hash.c (rb_hash_sort): should not return nil.
+Sat Jul 7 23:07:30 2012 CHIKANAGA Tomoyuki <nagachika@ruby-lang.org>
- * re.c (match_aref): should use rb_reg_nth_match().
+ * test/csv/test_features.rb: add require for Tempfile.
+ * test/csv/test_serialization.rb: ditto.
- * eval.c (POP_SCOPE): recycled scopes too much
+Fri Jul 6 06:49:50 2012 Eric Hodel <drbrain@segment7.net>
- * eval.c (Init_eval): extend room for stack allowance.
+ * array.c (rb_ary_aref): Added a description of the behavior of
+ index positioning. [Bug #6680]
+ * array.c (rb_ary_aset): ditto. Reordered sentences for clarity.
+ * string.c (rb_str_aref_m): Added a description of the behavior of
+ index positioning
- * eval.c (POP_SCOPE): frees scope too much.
+Fri Jul 6 05:38:44 2012 Eric Hodel <drbrain@segment7.net>
-Thu Aug 31 14:28:39 2000 Yukihiro Matsumoto <matz@ruby-lang.org>
+ * string.c (rb_str_bytesize): Improve documentation. Patch by Oscar
+ Del Ben from github issue #138.
+ * string.c (rb_str_empty): ditto.
+ * string.c (rb_str_times): ditto.
+ * string.c (rb_str_dump): ditto.
+ * string.c (rb_str_center): ditto.
- * gc.c (rb_gc_mark): T_SCOPE condition must be more precise.
+Fri Jul 6 04:05:59 2012 Eric Hodel <drbrain@segment7.net>
- * eval.c (scope_dup): should not make all duped scope orphan.
+ * ext/zlib/zlib.c (zstream_expand_buffer_without_gvl): Use
+ ruby_xrealloc() to avoid crash with CALC_EXACT_MALLOC_SIZE.
-Thu Aug 31 10:11:47 2000 Yukihiro Matsumoto <matz@ruby-lang.org>
+Thu Jul 5 17:32:19 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * parse.y (stmt): allow stmt_rhs to be right hand side of multiple
- assignment.
+ * internal.h: move ThreadShield declarations from intern.h.
- * time.c (rb_time_timeval): type error should not mention the word
- 'interval'.
+Thu Jul 5 16:00:24 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Wed Aug 30 23:21:20 2000 Yukihiro Matsumoto <matz@ruby-lang.org>
+ * thread.c (ThreadShield): rename from Barrier.
- * numeric.c (rb_num2long): use rb_Integer() instead of independent
- convert routine.
+Thu Jul 5 15:14:50 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * eval.c (rb_rescue2): now takes arbitrary number of exception types.
+ * bootstraptest/runner.rb (show_progress): refine error output. do not
+ count non-empty error message, but just warn.
- * object.c (rb_convert_type): use rb_rescue2 now to handle NameError.
+ * bootstraptest/runner.rb (error): show errors immediately if tty.
- * object.c (rb_convert_type): better error message.
+Thu Jul 5 12:28:11 2012 Akinori MUSHA <knu@iDaemons.org>
-Wed Aug 30 17:09:14 2000 WATANABE Hirofumi <eban@os.rim.or.jp>
+ * test/net/http/test_httpresponses.rb: Add a test file for
+ Net::HTTPResponses and put a test case for the previous bug.
- * ext/Win32API/Win32API.c (Win32API_initialize): AlphaNT support.
+Thu Jul 5 06:33:52 2012 Mark Dodwell <mark@mkdynamic.co.uk>
-Wed Aug 30 14:19:07 2000 Yukihiro Matsumoto <matz@ruby-lang.org>
+ * lib/net/http/responses.rb: Fix 4xx classes to inherit correctly
+ from Net::HTTPClientError. [Bug #6700]
- * parse.y (node_assign): should support NODE_CVASGN2 too.
+Wed Jul 4 21:55:35 2012 NARUSE, Yui <naruse@ruby-lang.org>
-Wed Aug 30 11:31:47 2000 Nobuyoshi Nakada <nobu.nakada@nifty.ne.jp>
+ * ruby.c (proc_options): warn only if -K and -w option is specified.
+ see also r36274 [Feature #5206]
- * ext/Win32API/Win32API.c (Win32API_initialize): add the
- arguments checking.
+Wed Jul 4 21:41:44 2012 Naohisa Goto <ngotogenome@gmail.com>
- * ext/Win32API/Win32API.c (Win32API_initialize): add taint
- checking. allow String object in the third argument.
+ * gc.c, atomic.h (ATOMIC_SIZE_*): moved from gc.c to atomic.h
+ [ruby-dev:45909]
-Wed Aug 30 10:29:40 2000 Masahiro Tomita <tommy@tmtm.org>
+Wed Jul 4 19:13:15 2012 Masaki Suketa <masaki.suketa@nifty.ne.jp>
- * io.c (rb_f_p): flush output buffer.
+ * test/win32ole/test_win32ole.rb (test_s_codepage_changed):
+ FileSystemObject only supports ANSI or UTF-16LE encoding.
+ Patch by h.shirosaki (Hiroshi Shirosaki) [ruby-trunk - Bug #6650]
-Tue Aug 29 16:29:15 2000 Yukihiro Matsumoto <matz@ruby-lang.org>
+Wed Jul 4 11:52:12 2012 NAKAMURA Usaku <usa@ruby-lang.org>
- * parse.y (assignable): remove NODE_CVASGN3.
+ * gc.c (ATOMIC_SIZE_*): 64bit Windows support.
- * parse.y (gettable): remove NODE_CVAR3.
+Wed Jul 4 11:11:28 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Tue Aug 29 02:02:14 2000 Yukihiro Matsumoto <matz@ruby-lang.org>
+ * eval.c (rb_frame_callee, rb_f_callee_name): fix to return the
+ called id. this longstanding bug has been caused and blocked by
+ the structure of old rb_control_frame_t and rb_iseq_t.
- * lib/mkmf.rb (create_makefile): handles create_makefile("a/b").
+ * vm_insnhelper.c (vm_push_frame): set proper method entry.
- * ext/extmk.rb.in (create_makefile): ditto
+Wed Jul 4 08:29:31 2012 Eric Hodel <drbrain@segment7.net>
-Mon Aug 28 18:43:54 2000 Yukihiro Matsumoto <matz@ruby-lang.org>
+ * array.c (rb_ary_aref): Updated documentation to indicate the
+ starting index is an index into the array or string. Updated
+ examples to show behavior of indexes at the end of an array or
+ string. Based on patch by Marcus Stollsteimer. [Bug #6680]
+ * array.c (rb_ary_aset): ditto.
+ * string.c (rb_str_aref): ditto. Also added descriptive argument
+ names to call-seq section.
- * eval.c (is_defined): now handles class variables.
+Wed Jul 4 07:05:59 2012 Eric Hodel <drbrain@segment7.net>
- * eval.c (rb_eval): class variable behavior revisited.
+ * test/zlib/test_zlib.rb (test_inflate_partial_input): Added test for
+ inflating incomplete zlib streams.
- * parse.y (assignable): ditto.
+Tue Jul 3 23:14:16 2012 Naohisa Goto <ngotogenome@gmail.com>
- * parse.y (gettable): ditto.
+ * gc.c (ATOMIC_SIZE_EXCHANGE): fix function name on Solaris [Bug #6689]
+ [ruby-dev:45904]
- * regex.c (PUSH_FAILURE_COUNT): push/pop interval count on failure
- stack. this fix is inspired by the Emacs21 patch from Stefan
- Monnier <monnier@cs.yale.edu>.
+Tue Jul 3 16:07:49 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Fri Aug 25 15:24:39 2000 Yukihiro Matsumoto <matz@ruby-lang.org>
+ * gc.c (vm_malloc_fixup, vm_xrealloc, vm_xfree, after_gc_sweep): use
+ atomic operations to update malloc_params.
- * variable.c (rb_cvar_get): should not follow __attached__.
+Tue Jul 3 14:50:16 2012 Eric Hodel <drbrain@segment7.net>
- * variable.c (rb_cvar_set): ditto.
+ * ext/zlib/zlib.c (zstream_run_func): Don't exit run loop for buffer
+ error. [Feature #6615]
+ * ext/zlib/zlib.c: Fix style to match existing functions.
- * variable.c (rb_cvar_declare): ditto.
+Tue Jul 3 12:05:51 2012 NAKAMURA Usaku <usa@ruby-lang.org>
- * variable.c (mod_av_set): second class variable assignment at the
- toplevel should not give warning.
+ * ext/dl/cfunc.c (rb_dlcfunc_call): also needed the workaround for VC8
+ for x64. [ruby-dev:45875] [Bug #6676]
+ reported by aves_ramphastos (Seigo Ishigane)
-Fri Aug 25 01:18:36 2000 Yukihiro Matsumoto <matz@ruby-lang.org>
+Tue Jul 3 11:56:46 2012 Eric Hodel <drbrain@segment7.net>
- * io.c (next_argv): prepare path for open file.
+ * ext/zlib/zlib.c (zstream_detach_buffer): Refactored tainting of
+ output string, moving it from the callee to zstream_detach_buffer.
+ * ext/zlib/zlib.c (rb_zstream_finish): ditto
+ * ext/zlib/zlib.c (rb_zstream_flush_next_out): ditto
+ * ext/zlib/zlib.c (rb_deflate_deflate): ditto
+ * ext/zlib/zlib.c (rb_deflate_flush): ditto
+ * ext/zlib/zlib.c (rb_inflate_inflate): ditto
- * string.c (rb_str_setter): moved from io.c.
+Tue Jul 3 11:16:06 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * io.c (next_argv): filename should be "-" for refreshed ARGF.
+ * common.mk (runnable): make symbolic links to run in build directory.
-Thu Aug 24 15:27:39 2000 WATANABE Hirofumi <eban@os.rim.or.jp>
+Tue Jul 3 10:46:06 2012 NARUSE, Yui <naruse@ruby-lang.org>
- * ext/socket/socketport.h: use `extern int h_errno' if needed.
+ * ruby.c (proc_options): warn if -K option is specified. [Feature #5206]
-Sat Aug 19 01:34:02 2000 WATANABE Hirofumi <eban@os.rim.or.jp>
+Tue Jul 3 06:12:13 2012 Eric Hodel <drbrain@segment7.net>
- * ext/sdbm/_sdbm.c (sdbm_prep): flags should be or-ed by O_BINARY on
- Win32 too.
+ * object.c (Init_Object): Added RDoc location pointers for
+ Kernel#methods, Kernel#protected_methods, Kernel#private_methods and
+ Kernel#public_methods. [Bug #6666]
- * ext/sdbm/_sdbm.c (makroom): fill hole with 0 on Win32 too.
+Tue Jul 3 06:02:54 2012 Eric Hodel <drbrain@segment7.net>
-Fri Aug 18 13:23:59 2000 Yukihiro Matsumoto <matz@ruby-lang.org>
+ * ext/zlib/zlib.c (zstream_run): Process zlib streams without GVL.
+ [Feature #6615]
+ * NEWS: ditto.
- * eval.c (rb_eval): should preserve and clear $! value before
- compilation.
+Mon Jul 2 22:13:04 2012 Tanaka Akira <akr@fsij.org>
- * eval.c (eval): ditto.
+ * thread.c (rb_thread_aref): add explanation for why Thread#[] and
+ Thread#[]= are fiber-local and not thread-local.
+ reported by Julien A. [ruby-core:41606] [ruby-trunk - Bug #5750]
-Fri Aug 18 11:06:19 2000 Shugo Maeda <shugo@ruby-lang.org>
+Mon Jul 2 21:25:55 2012 Tanaka Akira <akr@fsij.org>
- * ext/socket/socket.c (s_accept): start GC on EMFILE/ENFILE.
+ * time.c (timew_out_of_timet_range): specialization for
+ SIZEOF_TIME_T == SIZEOF_INT64_T.
-Thu Aug 17 16:04:48 2000 Yukihiro Matsumoto <matz@ruby-lang.org>
+Mon Jul 2 17:06:32 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * eval.c (is_defined): should clear ruby_errinfo.
+ * class.c (rb_include_module): include modules after the origin.
-Thu Aug 17 04:26:31 2000 Minero Aoki <aamine@dp.u-netsurf.ne.jp>
+ * class.c (include_modules_at): skip prepended modules.
- * lib/net/protocol.rb, smtp.rb, pop.rb, http.rb: 1.1.27.
+ * class.c (rb_prepend_module): now basic.klass in ICLASS refers the
+ old original class/module. [ruby-dev:45868][Bug #6662]
- * lib/net/protocol.rb: writing methods returns written byte size.
+ * class.c (rb_mod_ancestors): ditto.
- * lib/net/smtp.rb: send_mail accepts many destinations.
+ * vm_method.c (search_method): search method entry from the origin
+ iclass.
-Wed Aug 16 00:43:47 2000 Yukihiro Matsumoto <matz@ruby-lang.org>
+Mon Jul 2 05:54:58 2012 Tadayoshi Funaba <tadf@dotrb.org>
- * time.c (time_s_times): use CLK_TCK for HZ if it's defined.
+ * ext/date/date_core.c: [ruby-core:46058].
-Tue Aug 15 17:30:59 2000 Yukihiro Matsumoto <matz@ruby-lang.org>
+Mon Jul 2 05:35:43 2012 Tadayoshi Funaba <tadf@dotrb.org>
- * eval.c (frame_dup): should set flag FRAME_MALLOC after
- argv allocation.
+ * ext/date/date_core.c (d_lite_marshal_load): accepts old dump.
- * eval.c (blk_free): should not free argv if GC was called before
- frame_dup.
+Mon Jul 2 03:21:53 2012 Ayumu AIZAWA <ayumu.aizawa@gmail.com>
-Tue Aug 15 16:08:40 2000 WATANABE Hirofumi <eban@os.rim.or.jp>
+ * README.EXT.ja: fixed args of have_struct_member() ,
+ create_makefile() same as r35977. however, mkmf.rb include
+ no Japanese-docs, so Appendix C was not removed. [Bug #6597]
- * configure.in: add ac_cv_func_times=yes for mingw32.
+Fri Jun 29 05:08:41 2012 NARUSE, Yui <naruse@ruby-lang.org>
- * win32/win32.c (mytimes): typo.
+ * lib/test/unit/parallel.rb: workaround fix for rubygems.
+ RubyGems can't find rake if the source directory is not equal to
+ the directory which is running the test. [Bug #6604]
-Tue Aug 15 01:45:28 2000 Yukihiro Matsumoto <matz@ruby-lang.org>
+Thu Jun 28 20:33:15 2012 Luis Lavena <luislavena@gmail.com>
- * io.c (argf_eof): should return true at the end of ARGF without
- checking stdout if arguments are given.
+ * test/win32ole/test_win32ole.rb (test_s_codepage_changed):
+ FileSystemObject only supports ANSI or UTF-16LE encoding.
+ Patch by bosko (Bosko Ivanisevic) [ruby-trunk - Bug #6650]
-Mon Aug 14 10:34:32 2000 Yukihiro Matsumoto <matz@ruby-lang.org>
+Thu Jun 28 09:27:09 2012 CHIKANAGA Tomoyuki <nagachika@ruby-lang.org>
- * eval.c (rb_thread_status): status should return false for normal
- termination, nil for termination by exception.
+ * class.c (class_instance_method_list): consider prepended Class/Module
+ when recur != 0. [ruby-dev:45863] [Bug #6660]
-Fri Aug 11 15:43:46 2000 Yukihiro Matsumoto <matz@ruby-lang.org>
+ * test/ruby/test_module.rb (test_prepend_instance_methods_false): add
+ a test for it.
- * eval.c (rb_undef): give warning for undefining __id__, __send__.
-Thu Aug 10 08:05:03 2000 Yukihiro Matsumoto <matz@ruby-lang.org>
+Thu Jun 28 06:12:42 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * eval.c (rb_callcc): returned current thread instead of
- continuation wrongly.
+ * class.c (rb_mod_ancestors): fix ancestors order.
+ [ruby-core:45919][Bug #6658] [ruby-dev:45861][Bug #6659]
-Thu Aug 10 05:40:28 2000 WATANABE Hirofumi <eban@os.rim.or.jp>
+Wed Jun 27 21:28:59 2012 Kazuhiro NISHIYAMA <zn@mbf.nifty.com>
- * ext/extmk.rb.in: $CPPFLAGS should be initialized.
+ * lib/racc/parser.rb: NotImplementError is not exist.
- * ext/tcltklib/depend: add stubs.o.
+ * lib/irb/output-method.rb (IRB::OutputMethod#print): ditto.
- * ext/tcltklib/extconf.rb: use $CPPFLAGS instead of $CFLAGS.
+Wed Jun 27 21:31:13 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Wed Aug 9 16:31:48 2000 Yukihiro Matsumoto <matz@ruby-lang.org>
+ * class.c (rb_prepend_module): ancestors of prepending module also
+ should be included. [ruby-core:45914][Bug #6654]
- * eval.c (rb_callcc): thread status for continuations must be
- THREAD_KILLED, otherwise thread_free() breaks other threads.
+Wed Jun 27 21:01:32 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Wed Aug 9 13:24:25 2000 WATANABE Hirofumi <eban@os.rim.or.jp>
+ * class.c (class_instance_method_list): m_tbl in prepended
+ class/module is NULL. [ruby-core:45915][Bug #6655]
- * win32/win32.[ch]: emulate rename(2).
+Wed Jun 27 16:48:48 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Tue Aug 8 14:01:46 2000 WATANABE Hirofumi <eban@os.rim.or.jp>
+ * class.c (rb_prepend_module): prepend module into another module.
- * ext/tcltklib/tcltklib.c: support --enable-tcltk_stubs
+ * eval.c (rb_mod_prepend): new method Module#prepend. [Feature #1102]
- * ext/tcltklib/extconf.rb: ditto.
+Wed Jun 27 09:15:46 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * ext/tcltklib/stubs.c: created. examine candidate shared libraries.
+ * io.c (is_popen_fork): check if fork and raise NotImplementedError if
+ unavailable.
-Mon Aug 7 13:59:12 2000 Yukihiro Matsumoto <matz@ruby-lang.org>
+ * io.c (rb_io_s_popen): allow environment variables hash and exec
+ options as flat parameters, not in an array arguments.
+ [Feature#6651] [EXPERIMENTAL]
- * ruby.h (CLONESETUP): should copy flags before any potential
- object allocation.
+ * process.c (rb_execarg_extract_options): extract exec options, but no
+ exceptions on non-exec options and returns them as a Hash.
- * regex.c (re_match): check for stack depth was needed.
+ * process.c (rb_execarg_setenv): set environment variables.
-Sat Aug 5 16:43:43 2000 WATANABE Hirofumi <eban@os.rim.or.jp>
+Tue Jun 26 16:57:14 2012 Koichi Sasada <ko1@atdot.net>
- * djgpp/*: convert DOS line endings to UNIX style.
+ * thread_pthread.c (register_cached_thread_and_wait):
+ return immediately if malloc() failed.
+ [ruby-core:43960] [ruby-trunk - Bug #6235]
- * djgpp/config.status: rename to config.sed for SFN.
+ * thread_pthread.c (USE_THREAD_CACHE): check already defined or not.
- * lib/ftools.rb (compare, safe_unlink, chmod): avoid warnings.
+Tue Jun 26 10:01:56 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * lib/ftools.rb (move): typo. not `tpath', but `to'.
+ * io.c (rb_io_s_popen): revert r36213 "popen: shell commands with
+ envvar" because it disabled to let single command bypass shell.
-Fri Aug 4 23:26:48 2000 Yukihiro Matsumoto <matz@netlab.co.jp>
+Mon Jun 25 17:49:28 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * eval.c (proc_call): gives warning if a block is supplied.
+ * class.c (rb_mix_module): revert Module#mix.
- * eval.c (rb_eval): no warning for discarding if an alias for the
- method is already made.
+Mon Jun 25 16:57:38 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Fri Aug 4 16:32:29 2000 Yukihiro Matsumoto <matz@netlab.co.jp>
+ * proc.c (rb_mod_define_method): allow method transplanting from a
+ module to either class or module. [ruby-core:34267][Feature #4254]
- * array.c (rb_ary_reject_bang): returns nil if no element removed.
+Mon Jun 25 11:34:45 2012 NAKAMURA Usaku <usa@ruby-lang.org>
- * hash.c (rb_hash_reject_bang): returns nil if no element removed.
+ * internal.h: use rb_pid_t instead of pid_t because of there is no
+ definition of pid_t here on Windows.
-Thu Aug 3 19:44:26 2000 Yukihiro Matsumoto <matz@netlab.co.jp>
+Mon Jun 25 00:25:01 2012 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
- * eval.c (rb_thread_fd_writable): should return integer value.
+ * configure.in (for stack end address): remove human68k specific
+ check. It is no longer supported.
- * array.c (rb_ary_assoc): search array element whose length is
- longer than 0 (not 1).
+Sun Jun 24 23:02:17 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Wed Aug 2 18:27:47 2000 Yukihiro Matsumoto <matz@netlab.co.jp>
+ * io.c (pipe_open): merge win32 code using spawnv().
- * eval.c (rb_thread_wait_fd): prohibit thread context switch
- during compilation.
+Sun Jun 24 22:53:42 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * eval.c (rb_cont_call): prohibit Continuation#call across threads.
+ * process.c (check_exec_fds): separate check_exec_fds_1() since
+ nonstatic initializer of an aggregate type is not allowed by C89.
-Wed Aug 2 08:22:04 2000 Yukihiro Matsumoto <matz@netlab.co.jp>
+Sun Jun 24 07:47:17 2012 Tanaka Akira <akr@fsij.org>
- * gc.c (rb_gc): clear malloc_memories to zero, to avoid potential
- super frequent GC invocation. (ruby-bugs:#PR48)
+ * internal.h (rb_execarg): options field removed.
- * gc.c (rb_gc): only add_heap() if GC trigger condition is
- satisfied.
+ * process.c: follow the rb_execarg change.
-Tue Aug 1 16:41:58 2000 Yukihiro Matsumoto <matz@netlab.co.jp>
+Sat Jun 23 23:48:21 2012 Tanaka Akira <akr@fsij.org>
- * ruby.c (proc_options): global load path setting moved from
- ruby_prog_init().
+ * process.c (proc_spawn_cmd): unused variable removed to suppress a
+ warning.
+ (save_env): ditto.
- * ruby.c (incpush): renamed. push path entry at the END of the
- load path array. This makes -I directories sorted in order in
- the arguments.
+ [ruby-core:45797] reported by Luis Lavena.
-Sat Jul 29 23:42:04 2000 Yukihiro Matsumoto <matz@netlab.co.jp>
+Sat Jun 23 23:19:31 2012 Tanaka Akira <akr@fsij.org>
- * dir.c (dir_each): should check whether dir is closed during the
- block execution. (ruby-bugs:#PR47)
+ * internal.h (rb_execarg): add new_pgroup_given and new_pgroup_flag
+ fields.
-Sat Jul 29 21:57:30 2000 WATANABE Hirofumi <eban@os.rim.or.jp>
+ * process.c (EXEC_OPTION_NEW_PGROUP): removed.
+ (proc_spawn_cmd): take a struct rb_execarg argument.
+ use the new fields.
+ (rb_execarg_addopt): use the new fields.
+ (rb_spawn_process): follow the proc_spawn_cmd change.
- * ruby.c (rubylib_mangle): provide another buffer for the result.
+ [ruby-core:45794] [ruby-trunk - Bug #6633] reported by Luis Lavena.
-Wed Jul 26 10:09:01 2000 WATANABE Hirofumi <eban@os.rim.or.jp>
+Sat Jun 23 20:26:36 2012 Tanaka Akira <akr@fsij.org>
- * configure.in: set SOLIBS to LIBS on Cygwin.
+ * internal.h (rb_execarg): add fd_dup2, fd_close, fd_open,
+ fd_dup2_child fields.
- * configure.in: LIBRUBY_SO='$(RUBY_INSTALL_NAME)'.$target_os.dll
- on cygwin and mingw32. ruby-cygwin.dll is bad. why?
+ * process.c (EXEC_OPTION_DUP2): removed.
+ (EXEC_OPTION_CLOSE): removed.
+ (EXEC_OPTION_OPEN): removed.
+ (EXEC_OPTION_DUP2_CHILD): removed.
+ (mark_exec_arg): mark the new fields.
+ (check_exec_redirect1): change condition for default option.
+ (check_exec_redirect): take a struct rb_execarg argument.
+ use the new fields.
+ (rb_execarg_addopt): follow the check_exec_redirect change.
+ (check_exec_fds): use the new fields.
+ (save_redirect_fd): ditto.
-Wed Jul 26 10:04:03 2000 Yukihiro Matsumoto <matz@netlab.co.jp>
+Sat Jun 23 19:01:18 2012 Tanaka Akira <akr@fsij.org>
- * gc.c (gc_sweep): avoid full scan during compilation.
+ * process.c (rb_execarg_fixup): fix envopts condition.
- * gc.c (rb_gc): add heap during no gc period (including
- compilation).
+Sat Jun 23 18:44:13 2012 Tanaka Akira <akr@fsij.org>
-Tue Jul 25 19:03:04 2000 WATANABE Hirofumi <eban@os.rim.or.jp>
+ * process.c (check_exec_redirect1): extracted from
+ check_exec_redirect.
- * cygwin/GNUmakefile: use puts instead of print, because
- Cygwin DLL's behavior is changed(or bug?).
+Sat Jun 23 17:22:02 2012 Tanaka Akira <akr@fsij.org>
- * configure.in: LIBRUBY_SO='$(RUBY_INSTALL_NAME)'-$target_os.dll
- on cygwin and mingw32.
+ * process.c (save_env): don't use EXEC_OPTION_UNSETENV_OTHERS.
+ (rb_execarg_run_options): ditto.
- * cygwin/GNUmakefile: ditto.
+Sat Jun 23 17:04:08 2012 Tanaka Akira <akr@fsij.org>
- * Makefile.in: $(SOLIBS) should be put after dmyext.@OBJEXT@.
+ * internal.h (rb_execarg): add env_modification field.
- * instruby.rb: install $(LIBRUBY) to libdir
- if $(LIBRUBY) != $(LIBRUBY_A_).
+ * process.c (EXEC_OPTION_ENV): removed.
+ (mark_exec_arg): mark env_modification field.
+ (rb_exec_fillarg): update the new field, instead of options array.
+ (rb_execarg_fixup): use the new field.
+ (save_env): ditto.
+ (rb_execarg_run_options): ditto.
-Tue Jul 25 15:16:00 2000 Yukihiro Matsumoto <matz@netlab.co.jp>
+Sat Jun 23 16:27:01 2012 Tanaka Akira <akr@fsij.org>
- * io.c (rb_p): redirect to $defout.
+ * internal.h (rb_execarg): add rlimit_limits field.
-Mon Jul 24 18:52:55 2000 WATANABE Hirofumi <eban@os.rim.or.jp>
+ * process.c (EXEC_OPTION_RLIMIT): removed.
+ (mark_exec_arg): mark rlimit_limits field.
+ (rb_execarg_addopt): update the new fields, instead of options array.
+ (run_exec_rlimit): use the new field.
+ (rb_execarg_run_options): clear sarg using MEMZERO. use the new
+ field.
- * win32/win32.c (win32_getenv): should remove `static'.
+Sat Jun 23 14:29:25 2012 Tanaka Akira <akr@fsij.org>
- * ruby.c (rubylib_mangle): support "/hoge;/foo"
+ * internal.h (rb_execarg): add chdir_given and chdir_dir fields.
-Mon Jul 24 10:28:55 2000 GOTO Kentaro <gotoken@math.sci.hokudai.ac.jp>
+ * process.c (EXEC_OPTION_CHDIR): removed.
+ (mark_exec_arg): mark chdir_dir field.
+ (rb_execarg_addopt): update the new fields, instead of options array.
+ (rb_execarg_run_options): use the new fields.
- * string.c (rb_str_count): raise exception if no argument is
- given.
+Sat Jun 23 13:20:47 2012 Tanaka Akira <akr@fsij.org>
-Sun Jul 23 12:55:04 2000 Dave Thomas <Dave@Thomases.com>
+ * internal.h (rb_execarg): add close_others_given, close_others_do and
+ close_others_maxhint fields.
- * string.c (rb_str_rindex): Support negative end position.
+ * process.c (EXEC_OPTION_CLOSE_OTHERS): removed.
+ (rb_execarg_addopt): update the new fields, instead of options array.
+ (check_exec_fds): take eargp as an argument. update the
+ close_others_maxhint field.
+ (rb_execarg_fixup): follow the argument change of check_exec_fds.
+ (rb_execarg_run_options): use the new fields.
-Fri Jul 21 17:35:01 2000 Yukihiro Matsumoto <matz@netlab.co.jp>
+Sat Jun 23 10:41:59 2012 Tanaka Akira <akr@fsij.org>
- * parse.y (aref_args): command_call now be permitted as
- aref_args.
+ * internal.h (rb_execarg): add unsetenv_others_given and
+ unsetenv_others_do fields.
- * process.c (proc_getpriority): getpriority(2) may return valid
- negative number. use errno to detect error.
+ * process.c (EXEC_OPTION_UNSETENV_OTHERS): removed.
+ (rb_execarg_addopt): update the new fields, instead of options array.
+ (rb_execarg_fixup): use the new fields.
- * marshal.c (dump_ensure): dumped string should be tainted if
- any among target objects is tainted.
+Sat Jun 23 09:35:47 2012 Tanaka Akira <akr@fsij.org>
- * marshal.c (r_regist): restored object should be tainted if and
- only if the source is a file or a tainted string.
+ * process.c: use the variable name "soptions" for sargp->options.
-Wed Jul 19 15:14:04 2000 Yukihiro Matsumoto <matz@netlab.co.jp>
+Sat Jun 23 09:17:49 2012 Tanaka Akira <akr@fsij.org>
- * bignum.c (bigdivrem): should use rb_int2big(), not rb_uint2big().
+ * process.c: use the name "sargp" for struct rb_execarg variables
+ consistently for saving process attributes.
-Tue Jul 18 14:58:30 2000 Yukihiro Matsumoto <matz@netlab.co.jp>
+ * io.c: ditto.
- * eval.c (ruby_options): should treat SystemExit etc. properly.
+Sat Jun 23 07:59:57 2012 Tanaka Akira <akr@fsij.org>
- * parse.y (yycompile): should check compile_for_eval, not
- ruby_in_eval.
+ * process.c: use the name "eargp" for struct rb_execarg variables
+ consistently except for saving process attributes.
-Mon Jul 17 04:29:50 2000 Minero Aoki <aamine@dp.u-netsurf.ne.jp>
+ * io.c: ditto.
- * lib/mkmf.rb: converts extension of $objs into $OBJEXT.
+ * ext/pty/pty.c: ditto.
-Sun Jul 16 03:02:34 2000 Dave Thomas <dave@thomases.com>
+Wed Jun 20 18:27:03 2012 Yuki Yugui Sonoda <yugui@google.com>
- * lib/weakref.rb: Change to use new ObjectSpace calls.
+ * common.mk: Add missing dependencies.
-Sat Jul 15 21:59:58 2000 Yukihiro Matsumoto <matz@netlab.co.jp>
+Fri Jun 22 20:27:39 2012 Tanaka Akira <akr@fsij.org>
- * eval.c (rb_eval): should not redefine __id__ nor __send__.
+ * internal.h (rb_execarg): add pgroup_given and pgroup_pgid fields.
- * gc.c (define_final): integrate final.rb features into the
- interpreter. define_finalizer and undefine_finalizer was
- added to ObjectSpace. plus, add_finalizer, remove_finalizer,
- and call_finalizer are deprecated now.
+ * process.c (EXEC_OPTION_PGROUP): removed.
+ (rb_execarg_addopt): update the new fields, instead of options array.
+ (run_exec_pgroup): take a struct rb_execarg argument. refer the new
+ fields.
+ (rb_execarg_run_options): follow run_exec_pgroup change.
-Sat Jul 15 01:32:34 2000 Yukihiro Matsumoto <matz@netlab.co.jp>
+Fri Jun 22 18:48:51 2012 Kouhei Sutou <kou@cozmixng.org>
- * eval.c (rb_mod_method): implements unbound method.
+ * README.EXT, README.EXT.ja: use "sval" for the third argument
+ name of Data_Wrap_Struct().
+ Suggested by @satoh_fumiyasu. Thanks!!!
- * eval.c (Init_eval): should prohibit `module_function' for class
- Class.
+Fri Jun 22 18:04:26 2012 Koichi Sasada <ko1@atdot.net>
-Fri Jul 14 17:19:59 2000 WATANABE Hirofumi <eban@os.rim.or.jp>
+ * iseq.c, vm_eval.c: set th->base_block properly.
+ th->base_block is information for (a) parsing, (b) compiling
+ and (c) setting up the frame to execute the program passed by
+ `eval' method. For example, (1) parser need to know up-level
+ variables to detect it is variable or method without paren.
+ Befor (a), (b) and (c), VM set th->base_block by passed bindng
+ (or previous frame information). After execute (a), (b) and (c),
+ VM should clear th->base_block. However, if (a), (b) or (c)
+ raises an exception, then th->base_block is not cleared.
+ Problem is that the uncleared value th->balo_block is used for
+ irrelevant iseq compilation. It causes SEGV or critical error.
+ I tried to solve this problem: to clear them before exception,
+ but finally I found out that it is difficult to do it (Ruby
+ program can be run in many places).
+ Because of this background, I set th->base_block before
+ compiling iseq and restore it after compiling.
+ Basically, th->base_block is dirty hack (similar to global
+ variable) and this patch is also dirty.
- * cygwin/GNUmakefile.in: use miniruby instead of sed.
+ * bootstraptest/test_eval.rb: add a test for above.
-Fri Jul 14 12:49:50 2000 Yukihiro Matsumoto <matz@netlab.co.jp>
+ * internal.h: remove unused decl.
- * io.c (argf_eof): need to check stdin, when next_p == -1.
+ * iseq.c (rb_iseq_compile_with_option): add base_block parameter.
+ set th->base_block before compilation and restore it after
+ compilation.
- * io.c (read_all): use io_fread() instead of fread(3).
+ * ruby.c (require_libraries): pass 0 as base_block instead of
+ setting th->base_block
- * io.c (io_reopen): should clearerr FILE if fd < 3.
+ * tool/compile_prelude.rb (prelude_eval): apply above changes.
- * re.c (rb_reg_match_m): the result is exported, so it should be
- declared as busy.
+ * vm.c, vm_eval.c: ditto.
- * eval.c (rb_eval): should preserve errinfo even if return, break,
- etc. is called in rescue clause.
+ * vm_core.h: add comments.
- * instruby.rb: install irb too.
+Fri Jun 22 18:19:38 2012 Tanaka Akira <akr@fsij.org>
-Wed Jul 12 15:32:57 2000 Yukihiro Matsumoto <matz@netlab.co.jp>
+ * process.c: pass struct rb_execarg value instead of its options
+ field for saving process attribute changing functions.
+ (save_redirect_fd): take a struct rb_execarg argument.
+ (run_exec_dup2): ditto.
+ (run_exec_close): ditto.
+ (run_exec_open): ditto.
+ (run_exec_dup2_child): ditto.
+ (run_exec_pgroup): ditto.
+ (run_exec_rlimit): ditto.
+ (save_env): ditto.
+ (rb_execarg_run_options): follow the above functions change.
- * variable.c (rb_const_get): constants for builtin classes must
- have higher priority than constants from included modules at
- Object class.
+Fri Jun 22 17:55:48 2012 Koichi Sasada <ko1@atdot.net>
- * bignum.c (bigdivrem): small embarrassing typo.
+ * test/ruby/test_backtrace.rb: decrease recursion depth
+ to reduce consuming stack size.
-Wed Jul 12 15:06:28 2000 Yukihiro Matsumoto <matz@netlab.co.jp>
+Fri Jun 22 13:36:50 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * eval.c (rb_eval): use rb_const_get_at().
+ * random.c (random_init, random_load): cannot initialize frozen object
+ again, nor with tainted/untrusted object. [Bug #6540]
- * variable.c (top_const_get): retrieve toplevel constants only,
- not ones of Object (and its included modules) in general.
+Fri Jun 22 13:32:33 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Wed Jul 12 15:04:11 2000 Minero Aoki <aamine@dp.u-netsurf.ne.jp>
+ * error.c (rb_check_copyable): new function, to ensure the target is
+ not frozen and the source is not tainted nor untrusted.
- * lib/net/protocol.rb, smtp.rb, pop.rb, http.rb: 1.1.26.
+Fri Jun 22 05:55:20 2012 Eric Hodel <drbrain@segment7.net>
- * lib/net/protocol.rb, smtp.rb, pop.rb, http.rb:
- add module Net::NetPrivate and its inner classes
- {Read,Write}Adapter, Command, Socket,
- SMTPCommand, POP3Command, APOPCommand, HTTPCommand
+ * eval.c (ruby_cleanup): Fixed typo. Patch by Trever Dawe.
+ Fixes #131 (github). [ruby-trunk - Bug #6619]
-Wed Jul 12 13:10:30 2000 Yukihiro Matsumoto <matz@netlab.co.jp>
+Thu Jun 21 21:16:58 2012 Tanaka Akira <akr@fsij.org>
- * bignum.c (bigdivrem): defer bignorm().
+ * process.c (rb_execarg_addopt): take a VALUE argument instead of
+ struct rb_execarg.
+ (rb_exec_arg_addopt): follow the rb_execarg_addopt change.
+ (check_exec_options_i): ditto.
- * bignum.c (bignorm): accepts accidental fixnums.
+ * io.c (pipe_open): follow the rb_execarg_addopt change.
-Tue Jul 11 16:54:17 2000 Yukihiro Matsumoto <matz@netlab.co.jp>
+ * internal.h (rb_execarg_addopt): follow the definition change.
- * parse.y (yylex): `@<digit>' is no longer a valid instance
- variable name.
+Thu Jun 21 20:34:19 2012 Tanaka Akira <akr@fsij.org>
-Tue Jul 11 01:51:50 2000 Yukihiro Matsumoto <matz@netlab.co.jp>
+ * process.c (rb_exec_fillarg): take a VALUE argument instead of
+ struct rb_execarg.
+ (rb_check_exec_options): ditto.
+ (check_exec_options_i): ditto.
- * bignum.c (rb_big_divmod): should not use Integer(float) for
- the right operand.
+Thu Jun 21 19:48:05 2012 Tanaka Akira <akr@fsij.org>
- * bignum.c (rb_big_remainder): ditto.
+ * process.c (rb_exec_async_signal_safe): use rb_execarg_run_options
+ instead of rb_run_exec_options_err.
+ (rb_spawn_process): ditto.
- * bignum.c (rb_big_modulo): ditto.
+Thu Jun 21 19:02:43 2012 Tanaka Akira <akr@fsij.org>
-Mon Jul 10 15:27:16 2000 WATANABE Hirofumi <eban@os.rim.or.jp>
+ * process.c (rb_exec_fillarg): take a VALUE argument instead of
+ struct rb_execarg.
+ (rb_execarg_init): follow the rb_exec_fillarg change.
- * io.c (pipe_finalize): should set rb_last_status when pclose().
+Thu Jun 21 18:36:43 2012 Tanaka Akira <akr@fsij.org>
-Mon Jul 10 09:07:54 2000 Yukihiro Matsumoto <matz@netlab.co.jp>
+ * process.c (rb_execarg_init): take a VALUE argument instead of
+ struct rb_execarg.
+ (rb_execarg_new): follow the rb_execarg_init change.
+ (rb_exec_arg_init): ditto.
- * error.c (rb_bug): print version number and such too.
+ * internal.h (rb_execarg_init): follow the definition change.
-Sat Jul 8 23:08:40 2000 Yukihiro Matsumoto <matz@netlab.co.jp>
+Thu Jun 21 17:20:44 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * eval.c (rb_thread_start_0): should copy previous scopes to
- prevent rb_gc_force_recycle().
+ * parse.y (new_args_tail_gen): fix GC problem of keyword rest
+ argument. the wrapped struct should be bound to the wrapping node
+ before assignment of child nodes, to get rid of the case the
+ children are referred by only the struct pointer which is not a
+ subject of GC. [ruby-core:45744]
-Fri Jul 7 23:36:36 2000 Katsuyuki Komatsu <komatsu@sarion.co.jp>
+Thu Jun 21 07:06:52 2012 Koichi Sasada <ko1@atdot.net>
- * ext/socket/addrinfo.h: move IN_EXPERIMENTAL and IN_LOOPBACKNET
- definitions to ext/socket/sockport.h.
+ * error.c (err_append): rename err_append() to compile_err_append()
+ and move definition body. err_append() is used only by compiling.
- * ext/socket/extconf.rb: add getservbyport() and arpa/inet.h check.
+Thu Jun 21 06:21:54 2012 Tanaka Akira <akr@fsij.org>
- * ext/socket/getaddrinfo.c (getaddrinfo): SOCK_RAW may not be
- defined (ex. BeOS, Palm OS 2.x or before).
+ * process.c (rb_execarg_fixup): take a VALUE argument instead of
+ struct rb_execarg.
- * ext/socket/getnameinfo.c (getnameinfo): getservbyport() may not
- exist (ex. BeOS, Palm OS).
+ * internal.h (rb_execarg_fixup): follow the definition change.
- * ext/socket/sockport.h: add IN_EXPERIMENTAL, IN_CLASSA_NSHIFT,
- IN_LOOPBACKNET, AF_UNSPEC, PF_UNSPEC and PF_INET.
+ * io.c (pipe_open): follow rb_execarg_fixup change.
-Fri Jul 7 03:30:00 2000 Yukihiro Matsumoto <matz@netlab.co.jp>
+ * ext/pty/pty.c (establishShell): ditto.
- * parse.y (aref_args): should allow Hash[:a=>2] etc.
+Wed Jun 20 21:25:37 2012 Tanaka Akira <akr@fsij.org>
- * numeric.c (fix_aref): convert index by NUM2INT, not FIX2INT.
- (ruby-bugs:#PR37)
+ * internal.h (struct rb_execarg): add umask_given and umask_mask
+ fields.
- * time.c (time_localtime): should prohibit for frozen time.
+ * process.c (STATIC_ASSERT): removed.
+ (rb_execarg_addopt): follow the rb_execarg change.
+ (rb_execarg_run_options): ditto.
- * time.c (time_gmtime): ditto.
+Wed Jun 20 20:38:23 2012 Tanaka Akira <akr@fsij.org>
-Thu Jul 6 19:12:12 2000 Yukihiro Matsumoto <matz@netlab.co.jp>
+ * internal.h (struct rb_execarg) moved and renamed from
+ struct rb_exec_arg in intern.h.
- * io.c (rb_file_s_open): should not terminate fptr; just clear it.
+ * include/ruby/intern.h (struct rb_exec_arg): refer Data object which
+ contains struct rb_execarg.
- * ruby.c (proc_options): should not call require_libraries()
- twice.
+ * process.c: use struct rb_execarg instead of struct rb_exec_arg
+ except functions declared in intern.h.
+ (rb_exec_arg_addopt): extract a pointer to struct rb_execarg from
+ struct rb_exec_arg.
+ (rb_exec_arg_init): ditto.
+ (rb_exec_arg_fixup): ditto.
+ (rb_run_exec_options_err): ditto.
+ (rb_run_exec_options): ditto.
+ (rb_exec_err): ditto.
+ (rb_exec): ditto.
- * ruby.c (require_libraries): clear req_list_head.next after
- execution.
+ * io.c: use struct rb_execarg instead of struct rb_exec_arg.
-Thu Jul 6 13:51:57 2000 Nobuyoshi Nakada <nobu.nakada@nifty.ne.jp>
+ * ext/pty/pty.c: ditto.
- * object.c (rb_to_id): name may not be symbol nor fixnum.
+Wed Jun 20 19:13:25 2012 Tanaka Akira <akr@fsij.org>
- * struct.c (rb_struct_s_def): name may be nil.
+ * internal.h (rb_execarg_new): declared.
+ (rb_execarg_get): ditto.
-Thu Jul 6 02:09:06 2000 Yukihiro Matsumoto <matz@netlab.co.jp>
+ * process.c (mark_exec_arg): new function.
+ (free_exec_arg): ditto.
+ (memsize_exec_arg): ditto.
+ (exec_arg_data_type): defined.
+ (rb_execarg_new): new function.
+ (rb_execarg_get): ditto.
+ (rb_f_exec): use rb_execarg_new.
+ (rb_spawn_internal): ditto.
+ (rb_f_spawn): ditto.
- * bignum.c (bigdivrem): new function to return remainder.
+ * io.c (pipe_open_v): use rb_execarg_new.
+ (pipe_open_s): ditto.
- * numeric.c (fixdivmod): now returns modulo, not remainder.
+ * ext/pty/pty.c (establishShell): use rb_execarg_new.
- * numeric.c (flodivmod): ditto.
+Wed Jun 20 16:36:14 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * bignum.c (bigdivmod): ditto.
+ * missing/setproctitle.c (environ): use (*_NSGetEnviron()) instead of
+ environ on Darwin for namespace cleanness, same as [ruby-core:00537].
+ [ruby-core:45615] [Bug #6576]
- * numeric.c (num_modulo): new method; alias to '%'.
+Wed Jun 20 11:33:04 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Thu Jul 6 00:51:43 2000 WATANABE Hirofumi <eban@os.rim.or.jp>
+ * process.c (rb_execarg_addopt): always make Fixnum, and ignore higher
+ bits in too large umask value.
- * win32/win32.c (NtCmdGlob): patterns should be separated and
- NUL terminated.
+Wed Jun 20 11:24:35 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Wed Jul 5 22:27:56 2000 WATANABE Hirofumi <eban@os.rim.or.jp>
+ * lib/test/unit.rb (Test::Unit::Runner#_run_parallel): deal with
+ sudden-death of workers.
- * cygwin/GNUmakefile: use ruby.def to make rubycw.dll.
+Mon Jun 18 20:34:20 2012 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
- * ext/extmk.rb.in: create target.def.
+ * time.c (init_leap_second_info): fix non-ANSI function declaration.
- * lib/mkmf.rb: ditto.
+Mon Jun 18 20:29:04 2012 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
-Wed Jul 5 09:47:14 2000 Yukihiro Matsumoto <matz@netlab.co.jp>
+ * ruby.c (rb_f_sub): use ansi style declaration.
+ * ruby.c (rb_f_gsub): ditto.
+ * ruby.c (rb_f_chomp): ditto.
- * time.c (time_arg): Time::local, Time::gm now take 7th optional
- argument for usec.
+Mon Jun 18 20:26:23 2012 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
- * numeric.c (num_ceil, etc): default ceil, floor, round, truncate
- implementation for Numeric, using `to_f'.
+ * random.c (rb_random_int32): get rid of "warning: constant 0x100000000
+ is so big it is long" warning.
- * io.c (rb_io_reopen): clear fptr->path after free() to prevent
- potential GC crash.
+Mon Jun 18 20:07:23 2012 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
- * io.c (rb_file_s_open): terminate fptr unless null.
+ * dir.c (dir_initialize): get rid of "unused return: argc = rb_scan_args()"
+ warning.
- * io.c (rb_file_initialize): ditto.
+Mon Jun 18 19:31:20 2012 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
- * lib/tempfile.rb: specify FILE::CREAT|File::EXCL to open for
- better security.
+ * include/ruby/missing.h: include math.h before checking INFINITY
+ and NAN. Otherwise, strange macro redefinition will occur.
- * numeric.c (flo_truncate): new method.
+Mon Jun 18 19:12:37 2012 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
-Wed Jul 5 01:02:53 2000 WATANABE Hirofumi <eban@os.rim.or.jp>
+ * array.c (ary_reverse): use ansi style declaration.
- * ext/extmk.rb.in: join ' ' -> join(' ').
+Tue Jun 19 18:43:50 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * lib/mkmf.rb: ditto.
+ * include/ruby/backward/rubysig.h: fix visibility. [Bug #6607]
-Tue Jul 4 13:51:29 2000 Yukihiro Matsumoto <matz@netlab.co.jp>
+Tue Jun 19 17:51:54 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * ext/dbm/dbm.c: add methods added to Hash in 1.5.x.
+ * process.c (rb_execarg_run_options): do not call any methods in the
+ async-signal-safe function. mask has been checked with NUM2MODET()
+ already and converted with LONG2NUM().
- * ext/gdbm/gdbm.c: ditto.
+Tue Jun 19 11:59:56 2012 NARUSE, Yui <naruse@ruby-lang.org>
- * ext/sdbm/init.c: ditto.
+ * ext/readline/readline.c (Init_readline): don't set 0 to
+ rl_catch_signals and rl_catch_sigwinch. [Bug #5423]
- * eval.c (proc_call): args may be Qundef (means no argument), do
- not call TYPE() for args.
+Tue Jun 19 11:52:59 2012 NARUSE, Yui <naruse@ruby-lang.org>
-Tue Jul 4 13:20:56 2000 WATANABE Hirofumi <eban@os.rim.or.jp>
+ * ext/readline/readline.c (readline_s_get_special_prefixes): suppress
+ warning: uninitialized instance variable.
- * ext/extmk.rb.in: make command line must be single-quoted.
- $(RUBY_INSTALL_NAME) is command substitution in the POSIX sh.
+Tue Jun 19 11:43:16 2012 NARUSE, Yui <naruse@ruby-lang.org>
-Tue Jul 4 13:16:02 2000 Yukihiro Matsumoto <matz@netlab.co.jp>
+ * ext/readline/readline.c (readline_getc): fix editline compatibility
+ broken by r36123. [Bug #6601]
- * util.c (rb_type): should add T_UNDEF.
+Mon Jun 18 17:10:08 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Tue Jul 4 09:30:35 2000 Yukihiro Matsumoto <matz@netlab.co.jp>
+ * string.c (rb_str_subpos): split from rb_str_substr. returns
+ adjusted position for substring.
- * parse.y (here_document): supports EOF right after terminator.
+Mon Jun 18 10:42:57 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * random.c (rb_f_rand): argument is now optional (rand(max=0)).
+ * ext/readline/readline.c (readline_getc): deal with ESC just followed
+ by ASCII as meta prefix in incremental search mode. based on the
+ patch from rctay (Tay Ray Chuan) at [ruby-core:45682]. [Bug #6601]
-Tue Jul 4 01:50:49 2000 WATANABE Hirofumi <eban@os.rim.or.jp>
+Sun Jun 17 22:23:53 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * win32/ruby.def: remove ruby_mktemp.
+ * dir.c (rb_file_directory_p): move documentation for Dir.exist? from
+ file.c so that the proper description will be shown instead of the
+ documentation of File.directory?. [ruby-core:45685]
-Tue Jul 4 01:27:13 2000 Yukihiro Matsumoto <matz@netlab.co.jp>
+Sun Jun 17 16:21:01 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * eval.c (rb_rescue2): new function to rescue arbitrary exception.
+ * thread_win32.h (rb_thread_lock_t): make a union for USE_WIN32_MUTEX.
+ this internal is used only in thread_win32.c, but has to be complete
+ to define rb_thread_t.
- * numeric.c (do_coerce): should catch NameError explicitly.
+ * thread_win32.c (native_mutex_lock, native_mutex_destroy): fix for
+ USE_WIN32_MUTEX.
-Tue Jul 4 00:15:23 2000 Dave Thomas <Dave@thomases.com>
+ * thread_win32.c (native_cond_timedwait_ms): rename reserved pattern
+ name. user defined symbols should not start with __.
- * numeric.c (Init_Numeric): forgot to register Numeric#remainder.
+Sat Jun 16 19:24:01 2012 Tadayoshi Funaba <tadf@dotrb.org>
-Mon Jul 3 23:46:56 2000 Katsuyuki Komatsu <komatsu@sarion.co.jp>
+ * ext/date/date_core.c: define date_sg_t.
- * win32/win32.c (myselect, myaccept): disable interrupt while
- executing accept() or select() to avoid Ctrl-C causes
- "unknown software exception (0xc0000029)".
+Sat Jun 16 18:46:57 2012 Tadayoshi Funaba <tadf@dotrb.org>
-Mon Jul 3 18:35:41 2000 WATANABE Hirofumi <eban@os.rim.or.jp>
+ * ext/date/date_tmx.h: offset in struct tmx_funcs is now int.
+ * ext/date/date_strftime.c: ditto.
+ * ext/date/date_core.c: ditto.
- * lib/mkmf.rb: use null device if it exists for cross-compiling.
+Sat Jun 16 18:31:46 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Mon Jul 3 18:19:51 2000 Minero Aoki <aamine@dp.u-netsurf.ne.jp>
+ * eval.c (ruby_setup): set running state in the normal case before
+ popping a tag.
- * lib/net/protocol.rb, smtp.rb, pop.rb, http.rb: 1.1.26.
+Sat Jun 16 07:46:03 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * lib/net/protocol.rb (finish): do nothing unless active.
+ * lib/test/unit.rb (Test::Unit::Runner#_run_parallel): format workers
+ results in the parent.
- * lib/net/http.rb: HTTP#{get,post}2 again (for new impl).
+Sat Jun 16 07:12:56 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Mon Jul 3 16:47:22 2000 WATANABE Hirofumi <eban@os.rim.or.jp>
+ * tool/runruby.rb (File.realpath): return real path of expanded path.
+ [Bug #6598]
- * cygwin/GNUmakefile: librubys.a -> lib$(RUBY_INSTALL_NAME)s.a
+Sat Jun 16 07:12:28 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * configure.in: use AC_CANONICAL_{HOST,TARGET,BUILD}.
+ * bootstraptest/runner.rb (main): ignore -j option for compatibility
+ with test/unit.
-Mon Jul 3 13:15:02 2000 Yukihiro Matsumoto <matz@netlab.co.jp>
+Sat Jun 16 07:11:52 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * numeric.c (fix_divmod): x * d + m = y where d, m = x.divmod(y).
+ * lib/test/unit.rb (Test::Unit::Runner#puke): modify only result and
+ drop useless reports, not override entirely.
- * bignum.c (rb_big_divmod): ditto.
+ * lib/test/unit/parallel.rb (Test::Unit::Worker#_run_suite): report
+ unformatted results. formatting messages is not a workers task.
- * numeric.c (fixdivmod): does not depend C's undefined %
- behavior. adopt to fmod(3m) behavior.
+ * lib/test/unit/parallel.rb (Test::Unit::Worker#puke): store raw
+ results.
- * numeric.c (flo_mod): modulo now reserves fmod(3m) behavior.
+Sat Jun 16 01:27:14 2012 Aaron Patterson <aaron@tenderlovemaking.com>
- * numeric.c (num_remainder): 'deprecated' warning.
+ * ext/psych/lib/psych.rb: bumping psych to 1.3.3
+ * ext/psych/psych.gemspec: ditto
-Mon Jul 3 10:27:28 2000 WATANABE Hirofumi <eban@os.rim.or.jp>
+Fri Jun 15 20:54:28 2012 Kazuhiro NISHIYAMA <zn@mbf.nifty.com>
- * configure.in: use AC_CANONICAL_SYSTEM.
+ * vm_backtrace.c (backtrace_collect): rename from backtreace_collect.
-Sun Jul 2 21:17:37 2000 WATANABE Hirofumi <eban@os.rim.or.jp>
+Fri Jun 15 19:22:13 2012 Koichi Sasada <ko1@atdot.net>
- * configure.in: support without --enable-shared for cygwin/mingw32.
+ * vm_core.h: remove VM_FRAME_MAGIC_FINISH (finish frame type).
+ Before this commit:
+ `finish frame' was place holder which indicates that VM loop
+ needs to return function.
+ If a C method calls a Ruby methods (a method written by Ruby),
+ then VM loop will be (re-)invoked. When the Ruby method returns,
+ then also VM loop should be escaped. `finish frame' has only
+ one instruction `finish', which returns VM loop function.
+ VM loop function executes `finish' instruction, then VM loop
+ function returns itself.
+ With such mechanism, `leave' instruction (which returns one
+ frame from current scope) doesn't need to check that this `leave'
+ should also return from VM loop function.
+ Strictly, one branch can be removed from `leave' instruction.
+ Consideration:
+ However, pushing the `finish frame' needs costs because
+ it needs several memory accesses. The number of pushing
+ `finish frame' is greater than I had assumed. Of course,
+ pushing `finish frame' consumes additional control frame.
+ Moreover, recent processors has good branch prediction,
+ with which we can ignore such trivial checking.
+ After this commit:
+ Finally, I decide to remove `finish frame' and `finish'
+ instruction. Some parts of VM depend on `finish frame',
+ so the new frame flag VM_FRAME_FLAG_FINISH is introduced.
+ If this frame should escape from VM function loop, then
+ the result of VM_FRAME_TYPE_FINISH_P(cfp) is true.
+ `leave' instruction checks this flag every time.
+ I measured performance on it. However on my environments,
+ it improves some benchmarks and slows some benchmarks down.
+ Maybe it is because of C compiler optimization parameters.
+ I'll re-visit here if this cause problems.
- * cygwin/GNUmakefile: ditto.
+ * insns.def (leave, finish): remove finish instruction.
- * ext/extmk.rb.in: use null device if it exists for cross-compiling.
+ * vm.c, vm_eval.c, vm_exec.c, vm_backtrace.c, vm_dump.c:
+ apply above changes.
- * lib/mkmf.rb: ditto.
+Fri Jun 15 19:11:23 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * util.c (ruby_mktemp): remove unused ruby_mktemp().
+ * lib/test/unit.rb (Test::Unit::Runner#puke): always add skipped
+ results to the report for parallel test. [Bug #6595]
-Sun Jul 2 14:18:04 2000 Koji Arai <JCA02266@nifty.ne.jp>
+Fri Jun 15 09:01:35 2012 Yuki Yugui Sonoda <yugui@google.com>
- * eval.c (TMP_PROTECT_END): tmp__protect_tmp may be NULL.
+ * nacl/pepper_main.c: Removed an unnecessary and erroneous inclusion.
-Sun Jul 2 03:37:50 2000 Minero Aoki <aamine@dp.u-netsurf.ne.jp>
+Thu Jun 14 22:59:56 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * lib/net/protocol.rb, smtp.rb, pop.rb, http.rb: 1.1.25.
+ * configure.in (RUBY_CPPOUTFILE): check if output is really sent to
+ specified file to tell if -o option works. [ruby-dev:45742]
+ [Bug#6591]
- * lib/net/protocol.rb (each_crlf_line): beg = 0 is needed in adding{}
+ * configure.in (RUBY_CPPOUTFILE): check if output file is actually
+ created. [ruby-dev:45742] [Bug#6591]
- * lib/net/smtp.rb: allow String for to_addr of SMTP#sendmail
+Thu Jun 14 22:10:50 2012 Tanaka Akira <akr@fsij.org>
-Sat Jul 1 15:22:35 2000 Yukihiro Matsumoto <matz@netlab.co.jp>
+ * process.c (proc_exec_sh): don't strip leading spaces of the script.
- * numeric.c (fix_rshift): should handle shift value more than
- sizeof(long).
+Thu Jun 14 15:54:02 2012 NAKAMURA Usaku <usa@ruby-lang.org>
-Sat Jul 1 15:22:35 2000 Yukihiro Matsumoto <matz@netlab.co.jp>
+ * file.c (rb_file_s_basename, rb_file_s_dirname): documentation fix.
+ File.basename and File.dirname support File::ALT_SEPARATOR.
- * eval.c (rb_eval): the value from RTEST() is not valid Ruby
- object. result should be either true or false.
+Thu Jun 14 11:10:10 2012 Yuki Yugui Sonoda <yugui@google.com>
-Sat Jul 1 09:30:06 2000 Katsuyuki Komatsu <komatsu@sarion.co.jp>
+ * nacl/pepper_main.c: Applies the new embedding API to pepper_ruby.
- * re.c (rb_reg_initialize): was freeing invalid pointer.
+Thu Jun 14 10:44:41 2012 Yuki Yugui Sonoda <yugui@google.com>
-Sat Jul 1 03:25:56 2000 Yukihiro Matsumoto <matz@netlab.co.jp>
+ * include/ruby/ruby.h: Grouped APIs for embedding CRuby interpreter.
+ (ruby_setup, ruby_compile_main_from_file,
+ ruby_compile_main_from_string, ruby_eval_main,
+ ruby_set_script_name): new APIs to embed CRuby.
+ (ruby_opaque_t) Opaque pointer to an internal data, to NODE or iseq
+ in particular.
- * parse.y (call_args): command_call can be the last argument of
- call_args. It had to be the only argument.
+ * eval.c (ruby_setup): Similar to ruby_init but returns an error code
+ instead of exit(3) on error.
+ (ruby_eval_main): Similar to ruby_exec_node but returns the
+ evaluation result.
+ (ruby_eval_main_internal): renamed from ruby_exec_internal.
- * re.c (rb_reg_s_quote): should not dump core even for unsane mbc
- string.
+ * ruby.c (toplevel_context): new helper function.
+ (PREPARE_EVAL_MAIN): moved.
+ (process_options): refactored with new functions.
+ (parse_and_compile_main) new helper function.
+ (ruby_compile_main_from_file, ruby_compile_main_from_string) new API
+ (ruby_set_script_name): new API.
-Fri Jun 30 01:36:20 2000 Aleksi Niemela <aleksi.niemela@cinnober.com>
- * parse.y (f_norm_arg): better, nicer error message.
+Thu Jun 14 10:39:48 2012 Yuki Yugui Sonoda <yugui@google.com>
-Thu Jun 29 07:45:33 2000 Yukihiro Matsumoto <matz@netlab.co.jp>
+ * eval.c: Add doxygen comments.
- * ext/socket/socket.c (udp_send): destination may be packed
- struct sockaddr.
+ * ruby.c: ditto.
- * object.c (rb_Integer): Integer(nil) should be invalid, on the
- other hand, nil.to_i is OK.
+ * thread_pthread.c: ditto
-Wed Jun 28 17:26:06 2000 Yukihiro Matsumoto <matz@netlab.co.jp>
+ * version.c: ditto.
- * ext/socket/socket.c (ip_recvfrom): udp_recvfrom and tcp_recvfrom
- is merged and moved to IPSocket#recvfrom.
+ * vm_core.h: ditto.
- * ext/socket/socket.c (sock_s_getaddrinfo): family can be a
- strings such as "AF_INET" etc.
+Thu Jun 14 10:16:07 2012 NARUSE, Yui <naruse@ruby-lang.org>
- * ruby.c (require_libraries): . and RUBYLIB added to $load_path
- just before -r procedure.
+ * configure.in: revert r36071 and add NetBSD to blacklist of -ansi.
- * ruby.c (proc_options): -e, - did not exec -r.
+Thu Jun 14 07:59:12 2012 NARUSE, Yui <naruse@ruby-lang.org>
-Wed Jun 28 14:52:28 2000 Koga Youichirou <y-koga@mms.mt.nec.co.jp>
+ * thread_pthread.c (get_stack): Linux is the only OS which includes
+ the size of guard page into the stack size.
- * config.sub: NetBSD/hpcmips support.
+Thu Jun 14 06:21:00 2012 Eric Hodel <drbrain@segment7.net>
-Wed Jun 28 10:11:06 2000 Yukihiro Matsumoto <matz@netlab.co.jp>
+ * lib/drb/drb.rb: Replace broken links to the English DRb book.
+ Patch by Zachary Scott. [ruby-trunk - Bug #6544]
- * gc.c: gc trigger threshold changed; GC_NEWOBJ_LIMIT removed,
- FREE_MIN is increased to 4096.
+Thu Jun 14 06:17:47 2012 Eric Hodel <drbrain@segment7.net>
-Tue Jun 27 22:39:28 2000 Minero Aoki <aamine@dp.u-netsurf.ne.jp>
+ * lib/observer.rb: Update broken link to the Programming Ruby book.
+ Patch by Zachary Scott. [ruby-trunk - Bug #6536]
+ * lib/drb/drb.rb: ditto.
- * lib/net/protocol.rb, smtp.rb, pop.rb, http.rb: 1.1.24.
+Thu Jun 14 05:23:05 2012 NARUSE, Yui <naruse@ruby-lang.org>
- * lib/net/protocol.rb: modified each_crlf_line again.
+ * regparse.c (PFETCH_READY): suppress Wunused-but-set-variable.
- * lib/net/protocol.rb: do_write_beg,do_write_end -> writing{}
- do_write_do -> do_write
+ * regparse.c (is_onechar_cclass): restructured to clarify that c is
+ used iff found == 1.
- * lib/net/http.rb: can make proxy connection by passing
- addresses to HTTP.new, start.
+Thu Jun 14 02:54:17 2012 NARUSE, Yui <naruse@ruby-lang.org>
- * lib/net/http.rb: HTTP.new_implementation, old_implementation:
- can use 1.2 implementation of head, get, post, put.
- (see document)
+ * configure.in: use -fbuiltin with -ansi -std=iso9899:199409.
+ This prevents errors introduced by disabling builtin functions,
+ which is the sub-effect of -ansi/-std.
+ Now NetBSD can use -ansi -std=iso9899:199409.
+ Maybe mingw, cygwin and darwin can also.
-Tue Jun 27 12:05:10 2000 Katsuyuki Komatsu <komatsu@sarion.co.jp>
+Thu Jun 14 02:53:30 2012 NARUSE, Yui <naruse@ruby-lang.org>
- * win32.c (myfdclr): new function.
+ * Makefile.in: don't remove macros. now name2ctype uses macros.
- * win32.h: add FD_CLR.
+ * tool/enc-unicode.rb: add comment why it uses Hash#index.
-Mon Jun 26 23:41:41 2000 WATANABE Hirofumi <eban@os.rim.or.jp>
+ * enc/unicode/{name2ctype.kwd,name2ctype.src,name2ctype.h.blt}:
+ update to follow the current name2ctype.h.
+ FYI current Unicode version is 6.1.
- * ruby.h: add cast for ANSI style.
+Thu Jun 14 00:16:59 2012 Akinori MUSHA <knu@iDaemons.org>
- * gc.c (rb_data_object_alloc): use RUBY_DATA_FUNC.
+ * lib/net/http/responses.rb, lib/webrick/httpstatus.rb: Add HTTP
+ response codes added in RFCs 2817 and 4918. [ruby-core:45547]
+ [Feature #6569]
-Mon Jun 26 22:20:03 2000 Katsuyuki Komatsu <komatsu@sarion.co.jp>
+ * lib/net/http/responses.rb: Rename Net::HTTPMultipleChoice to
+ Net::HTTPMultipleChoices, leaving the former as alias to the
+ latter for backward compatibility. [ruby-core:45547]
+ [Feature #6569]
- * win32/win32.c (is_socket, extract_file_fd): New function.
+ * lib/net/http/responses.rb: Add comments about unused,
+ still-in-draft and private extension response codes.
+ [ruby-core:45547] [Feature #6569]
- * win32/win32.c (myfdopen): use is_socket().
+Wed Jun 13 22:44:32 2012 Naohisa Goto <ngotogenome@gmail.com>
- * win32/win32.c (myselect): return non socket files immediately
- if file and socket handles are mixed.
+ * test/dl/test_func.rb (test_qsort1, test_qsort2): use TYPE_SIZE_T
+ for size_t variables. [ruby-dev:45733] [Bug #6584]
-Mon Jun 26 16:21:30 2000 Yukihiro Matsumoto <matz@netlab.co.jp>
+Wed Jun 13 22:18:01 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * eval.c (rb_thread_schedule): wait_for cleared too early.
+ * configure.in: remove -ansi and -std options for lgamma_r() and
+ finite().
-Mon Jun 26 09:15:31 2000 Yukihiro Matsumoto <matz@netlab.co.jp>
+Wed Jun 13 21:46:34 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * pack.c: remove obsolete 'F', 'D' specifiers.
+ * configure.in: cygwin does not provide some declarations in strict
+ ANSI mode.
-Sun Jun 25 00:55:03 2000 Katsuyuki Komatsu <komatsu@sarion.co.jp>
+Wed Jun 13 20:19:59 2012 Tanaka Akira <akr@fsij.org>
- * ext/socket/socket.c (sock_s_getnameinfo): `res' would not
- be assigned if TYPE(sa) == T_STRING.
+ * process.c (rb_fork_internal): move a variable declaration.
-Sat Jun 24 14:36:29 2000 WATANABE Hirofumi <eban@os.rim.or.jp>
+Wed Jun 13 17:54:38 2012 URABE Shyouhei <shyouhei@ruby-lang.org>
- * config*.dj, configure.bat, top.sed: move to djgpp/.
+ * regparse.c (PFETCH_READY): this line was to suppress warning,
+ but did emit warnings if -Wuninitialized was set. Assigning
+ NULL instead if pfetch_prev should suffice the situation.
-Sat Jun 24 02:34:17 2000 Yukihiro Matsumoto <matz@netlab.co.jp>
+Wed Jun 13 17:51:05 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * ruby.c (load_file): call require_libraries() here to let
- debug.rb work properly.
+ * configure.in: cygwin needs C99 for some stuff, e.g.,
+ pthread_attr_setstacksize, sched_yield.
-Fri Jun 23 22:34:51 2000 Katsuyuki Komatsu <komatsu@sarion.co.jp>
+Wed Jun 13 17:50:43 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * bignum.c (rb_big_lshift): reorder xds assignment to avoid
- reusing `x' as `len' by VC++ 6.0 SP3 compiler with -Ox switch.
+ * Makefile.in (.c.i): add warnflags to make the result consistent with
+ compilation.
-Fri Jun 23 01:11:27 2000 Yukihiro Matsumoto <matz@netlab.co.jp>
+Wed Jun 13 15:12:07 2012 URABE Shyouhei <shyouhei@ruby-lang.org>
- * string.c (rb_str_substr): should return empty string (""),
- if beg == str.size and len == zero, mostly for convenience and
- backward compatibility.
+ * configure.in: On Windows platforms, system provided headers are
+ VC++ optimized. That is, C++ habits are often contaminated into
+ various headers. Most frequent situation is the use of //
+ comments. We bypass ANSI C mode for them. Otherwise extension
+ libs cannot include those headers.
- * parse.y (new_super): should tweak block_pass node for super too.
+Wed Jun 13 13:39:23 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * string.c (rb_str_split_m): last split element should not be nil,
- but "" when limit is specified.
+ * include/ruby/win32.h: get rid of C99 style one line comments.
-Thu Jun 22 17:27:46 2000 Yukihiro Matsumoto <matz@netlab.co.jp>
+Wed Jun 13 13:39:04 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * string.c (rb_str_substr): str[n,m] now returns nil when n equals
- to str.size.
+ * encoding.c (enc_alias_internal): use strdup defined as macro.
-Thu Jun 22 13:49:02 2000 Uechi Yasumasa <uechi@ryucom.ne.jp>
+Wed Jun 13 10:20:27 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * lib/net/ftp.rb: support resuming.
+ * process.c (rb_exec_fillarg): get rid of SIZE_T_MAX which may need
+ more headers.
-Thu Jun 22 13:37:19 2000 WATANABE Hirofumi <eban@os.rim.or.jp>
+ * process.c (rb_exec_fillarg): fix array element size. "continue" and
+ "readonly" exceeded the size.
- * eval.c (rb_thread_sleep_forever): merge pause() macro.
+ * process.c (rb_exec_fillarg): use shell if the first word is reserved
+ or special built-in name.
+ http://pubs.opengroup.org/onlinepubs/009695399/utilities/xcu_chap02.html
-Wed Jun 21 08:49:04 2000 Yukihiro Matsumoto <matz@netlab.co.jp>
+ * process.c (rb_exec_fillarg): treat '=' only in the first word. if
+ the first word does not contain '=', it is the command name and
+ environment assignments cannot be anymore.
- * eval.c (rb_eval): should not raise exception just by defining
- singleton class.
+Tue Jun 12 23:45:36 2012 NARUSE, Yui <naruse@ruby-lang.org>
-Wed Jun 21 01:18:03 2000 Yukihiro Matsumoto <matz@netlab.co.jp>
+ * lib/mkmf.rb: add dummy clean-static target to prevent errors for the
+ case real clean-static target doesn't exist.
- * ruby.h: two macros RUBY_DATA_FUNC and RUBY_METHOD_FUNC are added
- to make writing C++ extensions easier.
+Tue Jun 12 22:49:42 2012 Naohisa Goto <ngotogenome@gmail.com>
- * array.c (rb_ary_dup): internal classes should not be shared by dup.
+ * process.c (rb_exec_arg_fixup): fix compile error
- * hash.c (rb_hash_dup): ditto.
+Tue Jun 12 21:40:13 2012 Tanaka Akira <akr@fsij.org>
- * object.c (rb_obj_dup): ditto.
+ * process.c (rb_exec_fillarg): treat '=' character as a meta
+ character to detect assignments preceding command name.
- * string.c (rb_str_dup): ditto.
+Tue Jun 12 20:29:19 2012 Tanaka Akira <akr@fsij.org>
- * error.c (Init_Exception): renamed NotImplementError to
- NotImplementedError.
+ * include/ruby/intern.h (rb_exec_arg_init): deprecated.
+ (rb_exec_arg_addopt): ditto.
+ (rb_exec_arg_fixup): ditto.
+ (rb_run_exec_options): ditto.
+ (rb_run_exec_options_err): ditto.
-Tue Jun 20 16:22:38 2000 Yukihiro Matsumoto <matz@netlab.co.jp>
+ * internal.h (rb_execarg_init): declared.
+ (rb_execarg_addopt): ditto.
+ (rb_execarg_fixup): ditto.
+ (rb_execarg_run_options): ditto.
- * time.c (make_time_t): bug in DST boundary.
+ * process.c: call rb_execarg_addopt, rb_execarg_fixup,
+ rb_execarg_run_options, rb_execarg_init.
+ (rb_execarg_addopt): renamed from rb_exec_arg_addopt.
+ (rb_exec_arg_addopt): stub to call rb_execarg_addopt.
+ (rb_execarg_init): renamed from rb_exec_arg_init.
+ (rb_exec_arg_init): stub to call rb_execarg_init.
+ (rb_execarg_fixup): renamed from rb_exec_arg_fixup.
+ (rb_exec_arg_fixup): stub to call rb_execarg_fixup.
+ (rb_execarg_run_options): renamed from rb_run_exec_options_err.
+ (rb_run_exec_options_err): stub to call rb_execarg_run_options.
+ (rb_run_exec_options): call rb_execarg_run_options.
-Tue Jun 20 10:54:19 2000 WATANABE Hirofumi <eban@os.rim.or.jp>
+ * io.c: call rb_execarg_addopt, rb_execarg_fixup,
+ rb_execarg_run_options, rb_execarg_init.
- * configure.in: add eval sitedir.
+ * ext/pty/pty.c (establishShell): call rb_execarg_init and
+ rb_execarg_fixup.
-Tue Jun 20 06:14:43 2000 Wakou Aoyama <wakou@fsinet.or.jp>
+Tue Jun 12 18:39:59 2012 URABE Shyouhei <shyouhei@ruby-lang.org>
- * lib/cgi.rb: change: version syntax. old: x.yz, now: x.y.z
+ * configure.in: enable strict ANSI mode by default in case of GCC,
+ requested by _ko1.
- * lib/net/telnet.rb: ditto.
+Tue Jun 12 06:40:23 2012 Tanaka Akira <akr@fsij.org>
-Tue Jun 20 00:37:45 2000 Yukihiro Matsumoto <matz@netlab.co.jp>
+ * process.c (rb_exec_fillarg): detect '#' as a meta character.
- * re.c (rb_reg_kcode_m): Regexp#kcode returns nil for code unfixed
- regexp object.
+Mon Jun 11 22:15:44 2012 Tanaka Akira <akr@fsij.org>
- * bignum.c (bigdivmod): bignum zero check was wrong.
+ * include/ruby/intern.h (rb_proc_exec_n): deprecated.
+ (rb_exec): ditto.
+ (rb_exec_err): ditto.
+ (rb_fork): ditto.
+ (rb_fork_err): ditto.
-Mon Jun 19 10:48:28 2000 Yukihiro Matsumoto <matz@netlab.co.jp>
+Mon Jun 11 18:49:52 2012 NARUSE, Yui <naruse@ruby-lang.org>
- * variable.c (rb_cvar_set): forgot to add security check for class
- variable assignment.
+ * configure.in: on checking libexecinfo, don't specify /use/local.
+ On FreeBSD people must specify --with-opt-dir or --with-execinfo-dir.
-Sun Jun 18 22:49:13 2000 WATANABE Hirofumi <eban@os.rim.or.jp>
+Mon Jun 11 12:14:37 2012 Koichi Sasada <ko1@atdot.net>
- * configure.in: single quoted sitedir.
+ * vm_core.h: remove lfp (local frame pointer) and rename
+ dfp (dynamic frame pointer) to ep (environment pointer).
+ This change make VM `normal' (similar to other interpreters).
+ Before this commit:
+ Each frame has two env pointers lfp and dfp. lfp points
+ local environment which is method/class/toplevel frame.
+ lfp[0] is block pointer.
+ dfp is block local frame. dfp[0] points previous (parent)
+ environment pointer.
+ lfp == dfp when frame is method/class/toplevel.
+ You can get lfp from dfp by traversing previous environment
+ pointers.
+ After this commit:
+ Each frame has only `ep' to point respective environment.
+ If there is parent environment, then ep[0] points parent
+ environment (as dfp). If there are no more environment,
+ then ep[0] points block pointer (as lfp). We call such ep
+ as `LEP' (local EP). We add some macros to get LEP and to
+ detect LEP or not.
+ In short, we replace dfp and lfp with ep and LEP.
+ rb_block_t and rb_binding_t member `lfp' and `dfp' are removed
+ and member `ep' is added.
+ rename rb_thread_t's member `local_lfp' and `local_svar' to
+ `root_lep' and `root_svar'.
+ (VM_EP_PREV_EP(ep)): get previous environment pointer. This macro
+ assume that ep is not LEP.
+ (VM_EP_BLOCK_PTR(ep)): get block pointer. This macro assume
+ that ep is LEP.
+ (VM_EP_LEP_P(ep)): detect ep is LEP or not.
+ (VM_ENVVAL_BLOCK_PTR(ptr)): make block pointer.
+ (VM_ENVVAL_BLOCK_PTR_P(v)): detect v is block pointer.
+ (VM_ENVVAL_PREV_EP_PTR(ptr)): make prev environment pointer.
+ (VM_ENVVAL_PREV_EP_PTR_P(v)): detect v is prev env pointer.
- * mkconfig.rb: add DESTDIR for cross-compiling.
+ * vm.c: apply above changes.
+ (VM_EP_LEP(ep)): get LEP.
+ (VM_CF_LEP(cfp)): get LEP of cfp->ep.
+ (VM_CF_PREV_EP(cfp)): utility function VM_EP_PREV_EP(cfp->ep).
+ (VM_CF_BLOCK_PTR(cfp)): utility function VM_EP_BLOCK_PTR(cfp->ep).
- * lib/mkmf.rb: add DESTDIR.
+ * vm.c, vm_eval.c, vm_insnhelper.c, vm_insnhelper.h, insns.def:
+ apply above changes.
- * ruby.c (load_file): force binmode if fname includes ".exe"
- on DOSISH.
+ * cont.c: ditto.
-Sat Jun 17 23:22:17 2000 Yukihiro Matsumoto <matz@netlab.co.jp>
+ * eval.c, eval_intern.h: ditto.
- * sprintf.c (rb_f_sprintf): should ignore negative precision given
- by <%.*>.
+ * proc.c: ditto.
- * sprintf.c (rb_f_sprintf): should allow zero precision.
+ * thread.c: ditto.
-Sat Jun 17 03:13:29 2000 Yukihiro Matsumoto <matz@netlab.co.jp>
+ * vm_dump.c: ditto.
- * time.c (time_localtime): avoid unnecessary call of localtime.
+ * vm_exec.h: fix function name (on vm debug mode).
- * time.c (time_gmtime): avoid unnecessary call of gmtime.
+Mon Jun 11 11:52:18 2012 URABE Shyouhei <shyouhei@ruby-lang.org>
- * process.c (proc_wait2): new method.
+ * compile.c (iseq_set_sequence): nonstatic initializer of an
+ aggregate type is a C99ism.
- * process.c (proc_waitpid): second argument made optional.
+ * compile.c (enum compile_array_type_t): comma at the end of enum
+ list is a C99ism.
- * process.c (proc_waitpid2): new method.
+ * vm_backtrace.c (enum LOCATION_TYPE): ditto.
-Sat Jun 17 00:05:00 2000 Yukihiro Matsumoto <matz@netlab.co.jp>
+Mon Jun 11 06:31:33 2012 Tanaka Akira <akr@fsij.org>
- * re.c (rb_reg_clone): should initialize member fields.
+ * process.c (rb_proc_exec_n): revert the function removed at r35889.
-Fri Jun 16 22:49:34 2000 Yukihiro Matsumoto <matz@netlab.co.jp>
+Mon Jun 11 06:20:50 2012 NARUSE, Yui <naruse@ruby-lang.org>
- * io.c (rb_io_rewind): set lineno to zero.
+ * thread_pthread.c (rb_thread_create_timer_thread): assign return
+ value to the variable err.
-Fri Jun 16 22:47:47 2000 Minero Aoki <aamine@dp.u-netsurf.ne.jp>
+Mon Jun 11 06:17:06 2012 NARUSE, Yui <naruse@ruby-lang.org>
- * lib/net/protocol.rb, smtp.rb, pop.rb, http.rb: 1.1.23.
+ * thread_pthread.c (native_cond_initialize): fix typo in r36022.
+ this cause a failure on FreeBSD 8.2 amd64.
+ http://fbsd.rubyci.org/~chkbuild/ruby-trunk/log/20120610T130201Z.diff.html.gz
- * lib/net/protocol.rb: too many CRLF in last line.
+Mon Jun 11 05:21:57 2012 Koichi Sasada <ko1@atdot.net>
-Fri Jun 16 21:23:59 2000 WATANABE Hirofumi <eban@os.rim.or.jp>
+ * .gdbinit (SDR): add SDR function. It's only for VM debugging.
- * configure.in: add pause(2) checking.
+Sun Jun 10 21:50:45 2012 Yuki Sonoda (Yugui) <yugui@yugui.jp>
- * eval.c: define pause() if missing.
+ * nacl/nacl_config.rb: Fixed for 32bit hosts.
-Fri Jun 16 18:41:58 2000 Koji Arai <JCA02266@nifty.ne.jp>
+Sun Jun 10 20:23:14 2012 Yuki Sonoda (Yugui) <yugui@yugui.jp>
- * process.c (proc_setsid): BSD-style setpgrp() don't return
- process group ID, but 0 or -1.
+ Fixes threading on NativeClient.
-Fri Jun 16 16:23:35 2000 Koji Arai <JCA02266@nifty.ne.jp>
+ * thread_pthread.c (timer_thread_sleep): Extracted out a function from
+ thread_timer(). Added an alternative implementation for platforms
+ that lacks select(2) or pipe(2).
+ (rb_thread_create_timer_thread, native_cond_initialize,
+ native_cond_destroy): Replaced wrong HAVE_XXX checks.
- * file.c (rb_stat_inspect): gives detailed information;
- compatibility with ruby-1.4.x.
+ * configure.in (pthread_attr_init): New check.
-Fri Jun 16 05:18:45 2000 Yasuhiro Fukuma <yasuf@bsdclub.org>
+Sun Jun 10 21:30:11 2012 Tanaka Akira <akr@fsij.org>
- * configure.in: FreeBSD: do not link dummy libxpg4 which was
- merged into libc.
+ * process.c (rb_exec_without_timer_thread): renamed from rb_exec_err.
+ (rb_exec_err): new stub function to call
+ rb_exec_without_timer_thread.
+ (rb_f_exec): call rb_exec_without_timer_thread.
+ (rb_exec): call rb_exec_without_timer_thread.
-Fri Jun 16 03:17:36 2000 Satoshi Nojo <nojo@t-samukawa.or.jp>
+Sun Jun 10 21:13:10 2012 Tanaka Akira <akr@fsij.org>
- * ext/dbm/dbm.c (fdbm_length): use GetDBM. empty?, [] too.
+ * process.c (rb_fork): call rb_fork_internal instead of rb_fork_err.
- * ext/gdbm/gdbm.c (fgdbm_length): ditto.
+Sun Jun 10 20:55:59 2012 Tanaka Akira <akr@fsij.org>
- * ext/sdbm/init.c (fsdbm_length): ditto.
+ * process.c (rb_fork_ruby): call rb_fork_internal directly.
-Fri Jun 16 01:57:31 2000 Yukihiro Matsumoto <matz@netlab.co.jp>
+Sun Jun 10 20:19:40 2012 Tanaka Akira <akr@fsij.org>
- * eval.c (rb_thread_sleep_forever): pause(2) instead of sleep(3).
+ * process.c (rb_fork_ruby): new function.
+ (rb_f_fork): use rb_fork_ruby instead of rb_fork.
+ (rb_daemon): ditto.
-Thu Jun 15 10:46:36 2000 Yukihiro Matsumoto <matz@netlab.co.jp>
+ * io.c (pipe_open): use rb_fork_ruby instead of rb_fork.
- * string.c (rb_str_sub_bang): should probagate taintness from
- replacement string.
+ * internal.h (rb_fork_ruby): declared.
-Wed Jun 14 17:01:41 2000 Katsuyuki Komatsu <komatsu@sarion.co.jp>
+Sun Jun 10 18:58:16 2012 Akinori MUSHA <knu@iDaemons.org>
- * rubytest.rb: add CONFIG['EXEEXT'] to the executable file name.
+ * lib/net/http/response.rb: Remove a duplicated rdoc and leave a
+ pointer.
-Wed Jun 14 14:50:00 2000 Yukihiro Matsumoto <matz@netlab.co.jp>
+ * lib/net/http/responses.rb: Add RFC numbers to base on.
- * string.c (rb_f_sub): assign to $_ only if modification happens.
+Sun Jun 10 18:31:42 2012 Yuki Sonoda (Yugui) <yugui@yugui.jp>
- * string.c (rb_f_gsub): ditto.
+ * configure.in (RUBY_NACL): Warns if $PATH does not contain the path
+ to NativeClient SDK. PATH variable redefinition in GNUmakefile does
+ not work for GNU make 3.81.
- * string.c (rb_f_chop): ditto.
+Sun Jun 10 17:54:36 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * string.c (rb_f_chomp): ditto.
+ * gc.h (IS_STACK_DIR_UPPER): utility macro.
- * io.c (io_reopen): preserve file position by ftell/fseek, if io
- is a seekable.
+ * thread_pthread.c (get_stack): seems stack size does not include
+ guard size on Mac OS X.
- * eval.c (method_arity): wrong arity number for the methods with
- optional arguments.
+ * thread_pthread.c (ruby_init_stack): adjust stack size for offset of
+ addr from the bottom.
- * time.c (make_time_t): opposite timezone shift (should be negative).
+Sun Jun 10 15:49:47 2012 Tanaka Akira <akr@fsij.org>
-Wed Jun 14 14:07:38 2000 WATANABE Hirofumi <eban@os.rim.or.jp>
+ * process.c (retry_fork): call after_fork except in a child process.
+ (rb_fork_internal): restrict after_fork call condition.
- * io.c: typo(ig/if).
+Sun Jun 10 14:19:33 2012 NARUSE, Yui <naruse@ruby-lang.org>
- * re.c: typo(re/reg). add rb_reg_check().
+ * configure.in: NetBSD 6 adds libexecinfo but it only works on amd64.
+ http://www.mail-archive.com/source-changes-full@netbsd.org/msg38729.html
- * time.c: remove unneeded declare(daylight, timezone).
+Sun Jun 10 12:43:23 2012 Tanaka Akira <akr@fsij.org>
- * configure.in: add include <time.h> when daylight checking.
+ * process.c (rb_f_exec): call rb_exec_async_signal_safe except on
+ Mac OS X. cf. the comment in before_exec_non_async_signal_safe.
-Wed Jun 14 11:36:52 2000 WATANABE Hirofumi <eban@os.rim.or.jp>
+Sun Jun 10 12:15:18 2012 Tanaka Akira <akr@fsij.org>
- * marshal.c (r_object): modified for symbols.
+ * io.c (popen_exec): don't call rb_thread_atfork_before_exec. use
+ rb_exec_async_signal_safe instead of rb_exec_err.
+ (pipe_open): use rb_fork_async_signal_safe instead of rb_fork_err.
- * marshal.c (w_object): ditto.
+Sun Jun 10 11:44:57 2012 Tanaka Akira <akr@fsij.org>
-Wed Jun 14 10:04:58 2000 Yukihiro Matsumoto <matz@netlab.co.jp>
+ * process.c (rb_fork_internal): call after_fork only unless
+ chfunc_is_async_signal_safe.
- * re.c (rb_memcmp): should compare according to ruby_ignorecase.
+Sun Jun 10 11:33:01 2012 Martin Bosslet <Martin.Bosslet@googlemail.com>
- * string.c (rb_str_cmp): use rb_memcmp.
+ * ext/openssl/ossl_pkey_ec.c
+ test/openssl/test_pkey_ec.rb: Add support for EC_POINT_mul.
+ Patch provided by Sambasiva Suda. Thanks!
+ [ruby-core:44408][ruby-trunk - Feature #6310]
- * string.c (rb_str_index): ditto.
+Sun Jun 10 10:48:15 2012 Martin Bosslet <Martin.Bosslet@googlemail.com>
- * string.c (rb_str_rindex): ditto.
+ * lib/openssl/ssl.rb: Use a simple random number to generate the
+ session id. MD5, as was used before, causes problems when
+ using a FIPS version of OpenSSL. Issue was found by Jared
+ Jennings, thank you!
+ [ruby-trunk - Bug #6137]
- * string.c (rb_str_each_line): ditto.
+Sun Jun 10 10:27:34 2012 Martin Bosslet <Martin.Bosslet@googlemail.com>
-Wed Jun 14 04:58:53 2000 Dave Thomas <dave@thomases.com>
+ * NEWS: Add note about the new private key export behavior.
- * io.c (rb_io_set_lineno): should have returned VALUE, not
- integer.
+Sun Jun 10 10:24:51 2012 Tanaka Akira <akr@fsij.org>
-Wed Jun 14 09:29:42 2000 Yukihiro Matsumoto <matz@netlab.co.jp>
+ * process.c (rb_exec_async_signal_safe): exported.
- * string.c (rb_str_dup): dup should always propagate taintness.
+ * ext/pty/extconf.rb: modify $INCFLAGS to include internal.h
-Wed Jun 14 00:50:14 2000 Wakou Aoyama <wakou@fsinet.or.jp>
+ * ext/pty/pty.c: include internal.h.
+ (chfunc): don't call rb_thread_atfork_before_exec. use
+ rb_exec_async_signal_safe instead of rb_f_exec.
+ (establishShell): set up earg. use rb_fork_async_signal_safe
+ instead of rb_fork_err.
- * lib/cgi.rb: read_multipart(): if no content body then raise EOFError.
+ * internal.h (rb_exec_async_signal_safe): declared.
+ (rb_fork_async_signal_safe): declared.
-Tue Jun 13 11:46:17 2000 Yukihiro Matsumoto <matz@netlab.co.jp>
+Sun Jun 10 10:21:37 2012 Martin Bosslet <Martin.Bosslet@googlemail.com>
- * process.c (proc_setsid): try implement it using setpgrp() and
- ioctl(fd, TIOCNOTTY, NULL).
+ * ext/openssl/ossl.c
+ ext/openssl/ossl_pkey_rsa.c
+ ext/openssl/ossl_pkey_dsa.c
+ ext/openssl/ossl_pkey_ec.c: Forbid export passwords that are less
+ than four characters long, as OpenSSL itself does not allow this.
+ Issue found by Eric Hodel.
+ * ext/openssl/ossl_pkey_ec.c: Add export as an alias of to_pem,
+ following the PKey interface contract.
+ * test/openssl/test_pkey_dsa.rb
+ test/openssl/test_pkey_rsa.rb
+ test/openssl/test_pkey_ec.rb: Add tests that assert correct
+ behaviour when dealing with passwords that are less than four
+ characters long.
+ [ruby-core: 42281][ruby-trunk - Bug #5951]
- * re.c (rb_reg_prepare_re): magic variable $= should affect regex
- pattern match.
+Sun Jun 10 10:14:26 2012 Tanaka Akira <akr@fsij.org>
- * time.c (make_time_t): use tm.tm_gmtoff if possible.
+ * process.c (rb_f_exec): use rb_exec_arg_prepare.
- * time.c (time_zone): use tm.tm_zone if available.
+Sun Jun 10 06:43:51 2012 Tanaka Akira <akr@fsij.org>
-Tue Jun 13 01:50:57 2000 Minero Aoki <aamine@dp.u-netsurf.ne.jp>
+ * process.c: split after_exec into async-signal-safe part and rest.
+ (after_exec_async_signal_safe): extracted from after_exec.
+ (after_exec_non_async_signal_safe): ditto.
+ (after_exec): call them.
+ (rb_exec_async_signal_safe): call after_exec_async_signal_safe.
+ (rb_exec_err): call after_exec_non_async_signal_safe instead of
+ after_exec.
- * lib/net/protocol.rb, smtp.rb, pop.rb, http.rb: 1.1.22.
+Sun Jun 10 06:21:10 2012 Martin Bosslet <Martin.Bosslet@googlemail.com>
- * lib/net/http.rb: HTTPResponse#body returns body.
+ * NEWS: document new features of Ruby OpenSSL.
-Mon Jun 12 23:41:54 2000 WATANABE Hirofumi <eban@os.rim.or.jp>
+Sun Jun 10 03:09:41 2012 Martin Bosslet <Martin.Bosslet@googlemail.com>
- * configure.in (daylight): avoid GCC optimization.
+ * ext/openssl/ossl.c: Fix error in example. Patch by David Albert.
-Mon Jun 12 19:02:27 2000 WATANABE Hirofumi <eban@os.rim.or.jp>
+ Add/extend existing documentation. Examples now also cover RSA
+ signatures and PBKDF2.
+ [ruby-core: 45154][ruby-trunk - Bug #6475]
- * configure.in: cygwin has strange timezone.
- * time.c (time_zone): use tzname and daylight.
+Sun Jun 10 01:41:45 2012 Martin Bosslet <Martin.Bosslet@googlemail.com>
-Sat Jun 10 23:10:32 2000 Yukihiro Matsumoto <matz@netlab.co.jp>
+ * ext/openssl/ossl_ssl.c: Introduce SSLContext#renegotiation_cb and
+ remove SSLContext#disable_client_renegotiation and related
+ functionality introduced in r35797. The new callback approach
+ gives clients maximum flexibility to decide on their own what to
+ do on renegotiation attempts.
+ Add documentation for SSL module and SSLError.
+ * test/openssl/test_ssl.rb: Add a test for
+ SSLContext#renegotiation_cb.
- * io.c (rb_io_seek): whence is optional, default is SEEK_SET.
+Sun Jun 10 01:37:18 2012 Tanaka Akira <akr@fsij.org>
-Fri Jun 9 17:00:29 2000 Minero Aoki <aamine@dp.u-netsurf.ne.jp>
+ * process.c (rb_fork_internal): initialize exc.
- * lib/net/protocol.rb, smtp.rb, pop.rb, http.rb: 1.1.21.
+Sun Jun 10 00:19:25 2012 Tanaka Akira <akr@fsij.org>
- * lib/net/http.rb: exception is raised with response object.
+ * process.c: don't use non async-signal-safe functions in a child
+ process before exec, for invoking a command.
+ (rb_exec_atfork): call rb_exec_async_signal_safe only.
+ (retry_fork): take chfunc_is_async_signal_safe argument. call
+ before_fork and after_fork only unless chfunc_is_async_signal_safe.
+ (send_child_error): take chfunc_is_async_signal_safe argument.
+ send an exception only unless chfunc_is_async_signal_safe.
+ (recv_child_error): take chfunc_is_async_signal_safe argument.
+ receive an exception only unless chfunc_is_async_signal_safe.
+ (rb_fork_internal): renamed from rb_fork_err and take
+ chfunc_is_async_signal_safe argument.
+ use rb_protect only unless chfunc_is_async_signal_safe.
+ (rb_fork_err): call rb_fork_internal with false as
+ chfunc_is_async_signal_safe.
+ (rb_fork_async_signal_safe): call rb_fork_internal with true as
+ chfunc_is_async_signal_safe.
+ (rb_spawn_process): call rb_fork_async_signal_safe instead of
+ rb_fork_err.
-Fri Jun 9 15:11:35 2000 Yukihiro Matsumoto <matz@netlab.co.jp>
+Sat Jun 9 23:57:03 2012 Tanaka Akira <akr@fsij.org>
- * time.c (make_time_t): supports daylight saving time.
+ * process.c (rb_fork_err): rewrite a complex "if" statement.
- * eval.c (rb_thread_safe_level): should retrieve current $SAFE
- value if a thread is the current thread.
+Sat Jun 9 23:44:29 2012 Tanaka Akira <akr@fsij.org>
-Thu Jun 8 14:25:45 2000 Hiroshi Igarashi <iga@ruby-lang.org>
+ * process.c (before_exec_async_signal_safe): extracted from
+ before_exec.
+ (before_exec_non_async_signal_safe): ditto.
+ (before_exec): call before_exec_async_signal_safe and
+ before_exec_non_async_signal_safe.
+ (rb_exec_async_signal_safe): call before_exec_async_signal_safe.
+ (rb_exec_err): call before_exec_non_async_signal_safe instead of
+ before_exec.
- * lib/mkmf.rb: add target `distclean' in Makefile for extlib.
- target `clean' doesn't remove Makefile.
+Sat Jun 9 23:36:53 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Thu Jun 8 13:34:03 2000 Dave Thomas <dave@thomases.com>
+ * iseq.c (iseq_load, insn_operand_intern, rb_iseq_disasm)
+ (rb_iseq_parameters): use rb_id2str() instead of rb_id2name() to
+ keep encoding.
- * numeric.c: add nan?, infinite?, and finite? to Float
-
-Thu Jun 8 00:31:04 2000 WATANABE Hirofumi <eban@os.rim.or.jp>
+ * string.c (rb_str_symname_p): new function that checks if the string
+ is valid as a symbol name. split from sym_inspect().
- * regex.h: export re_mbctab properly on cygwin.
+Sat Jun 9 22:27:05 2012 Tanaka Akira <akr@fsij.org>
- * dln.c: use dlopen instead of LoadLibrary on cygwin.
+ * process.c (retry_fork): rewrite a complex "for" statement by
+ simple statements.
-Thu Jun 8 13:41:34 2000 Tadayoshi Funaba <tadf@kt.rim.or.jp>
+Sat Jun 9 21:50:04 2012 Tanaka Akira <akr@fsij.org>
- * file.c (rb_file_s_basename): might dump core.
+ * process.c (retry_fork): extracted from rb_fork_err.
+ (send_child_error): ditto.
+ (recv_child_error): ditto.
-Tue Jun 6 03:29:12 2000 Yukihiro Matsumoto <matz@netlab.co.jp>
+Sat Jun 9 17:21:48 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * dir.c (dir_foreach): now returns nil for consistency.
+ * iseq.c (iseq_load): type is a symbol, and invalid as ID in common.
- * bignum.c (bigdivmod): modulo by small numbers was wrong.
+Sat Jun 9 10:57:14 2012 Tanaka Akira <akr@fsij.org>
-Mon Jun 5 00:18:08 2000 WATANABE Hirofumi <eban@os.rim.or.jp>
+ * process.c (rb_exec_async_signal_safe): extracted from rb_exec_err.
- * bignum.c: avoid conflict with USHORT on mingw32.
+Sat Jun 9 09:31:07 2012 Tanaka Akira <akr@fsij.org>
-Mon Jun 5 00:13:35 2000 WATANABE Hirofumi <eban@os.rim.or.jp>
+ * process.c: simplified because close_others option is always
+ enabled by default.
+ (rb_f_exec): don't need to set the option.
+ (rb_exec_arg_prepare): don't need to set the option. don't need
+ default_close_others argument.
+ (rb_spawn_internal): don't need to give default_close_others
+ argument for rb_exec_arg_prepare. don't need default_close_others
+ argument.
+ (rb_spawn_err): don't need to give default_close_others
+ argument for rb_spawn_internal.
+ (rb_spawn): don't need to give default_close_others
+ argument for rb_spawn_internal.
+ (rb_f_system): don't need to give default_close_others argument for
+ rb_spawn_internal.
+ (rb_f_spawn): don't need to give default_close_others argument for
+ rb_exec_arg_prepare.
- * eval.c (rb_thread_schedule): =/== typo.
+Sat Jun 9 09:00:58 2012 Tanaka Akira <akr@fsij.org>
-Sun Jun 4 03:17:36 2000 Wakou Aoyama <wakou@fsinet.or.jp>
+ * process.c (rb_proc_exec): call before_exec() here addition to
+ rb_exec_err.
- * lib/cgi.rb: improve: CGI::pretty()
+Sat Jun 9 08:30:52 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Sun Jun 4 02:01:10 2000 WATANABE Hirofumi <eban@os.rim.or.jp>
+ * thread_pthread.c (ruby_init_stack): use stack info if possible.
- * lib/mkmf.rb: do not need to add -L$(topdir) in --enable-shared case.
+Sat Jun 9 08:21:32 2012 Eric Hodel <drbrain@segment7.net>
-Sat Jun 3 13:50:06 2000 Yukihiro Matsumoto <matz@netlab.co.jp>
+ * README.EXT (prepare extconf.rb): Added note to see MakeMakefile for
+ documentation of extconf.rb functions. Patch by Zachary Scott.
+ [ruby-trunk - Feature #6522]
+ * README.EXT (Appendix C): Removed in favor of MakeMakefile.
+ Patch by Zachary Scott.
+ * lib/mkmf.rb: Merged documentation from README.EXT Appendix C. Patch
+ by Zachary Scott.
- * parse.y (rb_id2name): should support constant attrset
- identifiers.
+Sat Jun 9 08:16:47 2012 Eric Hodel <drbrain@segment7.net>
- * bignum.c (rb_big_eq): Bignum#== should not raise exception.
+ * doc/re.rdoc: Completed wording in the description of the =~ operator.
+ [ruby-trunk - Bug #6529]
-Fri Jun 2 11:24:48 2000 Yukihiro Matsumoto <matz@netlab.co.jp>
+Sat Jun 9 08:09:38 2012 Eric Hodel <drbrain@segment7.net>
- * io.c (rb_io_popen): open with a block returns the value from the
- block. old behavior was back.
+ * string.c (rb_str_start_with): Removed "p" from start_with? examples
+ to match other String method examples. [ruby-trunk - Bug #6553]
+ * string.c (rb_str_end_with): Updated end_with? to use code markup
+ instead of italic.
-Fri Jun 2 00:42:31 2000 Yukihiro Matsumoto <matz@netlab.co.jp>
+Sat Jun 9 07:56:03 2012 Eric Hodel <drbrain@segment7.net>
+ * lib/benchmark.rb: Updated formatting of Benchmark documentation for
+ consistency. [ruby-trunk - Bug #6533]
- * eval.c (rb_thread_cleanup): should clear priority for thread
- termination.
+Sat Jun 9 07:46:26 2012 Eric Hodel <drbrain@segment7.net>
-Thu Jun 01 22:39:41 2000 Minero Aoki <aamine@dp.u-netsurf.ne.jp>
+ * lib/delegate.rb: Added documentation for Delegator#!. Patch by
+ Zachary Scott. [ruby-trunk - Feature #6534]
- * lib/net/protocol.rb, smtp.rb, pop.rb, http.rb: 1.1.20.
+Sat Jun 9 07:39:50 2012 Eric Hodel <drbrain@segment7.net>
- * lib/net/http.rb: wrongly closed the socket twice
- when no Content-Length: was given.
+ * lib/net/http/responses.rb: Add RFC 6585 response codes. Patch by
+ Sangil Jung. [ruby-trunk - Feature #6480]
+ * lib/net/http/response.rb: ditto
+ * lib/net/http.rb: ditto
+ * lib/webrick/httpstatus.rb: ditto
-Thu Jun 1 00:59:15 2000 Yukihiro Matsumoto <matz@netlab.co.jp>
+Sat Jun 9 01:24:28 2012 Tanaka Akira <akr@fsij.org>
- * eval.c (rb_yield_0): convert Qundef to [].
+ * process.c (rb_exec_err): before_exec() call moved from proc_exec_cmd
+ and proc_exec_sh.
+ (rb_proc_exec): ditto.
-Wed May 31 20:45:59 2000 Dave Thomas <Dave@Thomases.com>
+Sat Jun 9 01:11:07 2012 Tanaka Akira <akr@fsij.org>
- * string.c (rb_str_slice_bang): wrong argument number.
+ * include/ruby/intern.h (rb_exec_arg_init): declaration changed to
+ return a value.
-Wed May 31 12:37:04 2000 Yukihiro Matsumoto <matz@netlab.co.jp>
+ * process.c (rb_exec_arg_init): return a value.
- * eval.c (rb_exec_end_proc): print error message from END procs.
+Fri Jun 8 23:44:14 2012 Tanaka Akira <akr@fsij.org>
-Wed May 31 04:06:41 2000 Wakou Aoyama <wakou@fsinet.or.jp>
+ * process.c: don't check the availability of FD_CLOEXEC. It should
+ be available if fork() is available.
- * lib/cgi.rb: change: CGI#out() if "HEAD" == REQUEST_METHOD then
- output only HTTP header.
+ * io.c: ditto.
-Wed May 31 01:54:21 2000 Yukihiro Matsumoto <matz@netlab.co.jp>
+Fri Jun 8 22:39:32 2012 Tanaka Akira <akr@fsij.org>
- * eval.c (rb_thread_schedule): set main_thread->status to
- THREAD_TO_KILL, before raising deadlock error.
+ * process.c (rb_fork_err): revert r35955. The condition needs !chfunc
+ to close ep[0] and ep[1]. The catched exception is re-raised
+ immediately after that if status is not NULL.
- * eval.c (rb_thread_deadlock): if curr_thread == main_thread, do
- not call rb_thread_restore_context()
+Fri Jun 8 19:43:33 2012 Tanaka Akira <akr@fsij.org>
-Tue May 30 23:33:41 2000 Katsuyuki Komatsu <komatsu@sarion.co.jp>
+ * process.c (rb_exec_err): after_exec() call moved from proc_exec_cmd
+ and proc_exec_sh.
+ (rb_proc_exec): ditto.
- * lib/mkmf.rb (create_makefile): add $(TARGET).ilk and *.pdb
- to cleanup files for mswin32.
+Fri Jun 8 19:00:59 2012 Tanaka Akira <akr@fsij.org>
-Mon May 29 10:41:10 2000 Nobuyoshi Nakada <nobu.nakada@nifty.ne.jp>
+ * process.c (ARGV_COUNT): unused macro removed.
+ (ARGV_SIZE): ditto.
+ (ALLOC_ARGV): ditto.
+ (ALLOC_ARGV_WITH_STR): ditto.
- * file.c (rb_file_s_basename): should propagate taintness.
+Fri Jun 8 16:19:33 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Sun May 28 21:37:13 2000 WATANABE Hirofumi <eban@os.rim.or.jp>
+ * test/runner.rb (src_testdir): expand real path so that
+ TestGem#test_self_find_files does not fail by aliased load path when
+ srcdir contains a symbolic link.
- * eval.c: bug fix: DLEXT2.
+ * tool/runruby.rb (srcdir): ditto.
-Sun May 28 19:21:43 2000 WATANABE Hirofumi <eban@os.rim.or.jp>
+Fri Jun 8 12:04:39 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * win32/win32.c: use ruby's glob.
+ * process.c (rb_fork_err): error state in the child process is prior
+ to exceptions in proc_syswait().
- * dir.c: "glob" exported and renamed to "rb_glob".
+ * process.c (rb_fork_err): determine status on errors.
- * ruby.h: ditto.
+ * ext/pty/pty.c (establishShell): reraise exception if something
+ raised during sleep.
- * main.c: turn off command line mingw32's globbing.
-
-Wed May 25 22:25:13 2000 WATANABE Hirofumi <eban@os.rim.or.jp>
-
- * ext/extmk.rb.in: use "ftools" instead of "rm -f".
-
- * lib/mkmf.rb: ditto.
+ * ext/pty/pty.c (establishShell): now needs status to protect from
+ exceptions in rb_fork_err().
-Thu May 25 22:01:32 2000 Katsuyuki Komatsu <komatsu@sarion.co.jp>
+Thu Jun 7 22:13:05 2012 Tanaka Akira <akr@fsij.org>
- * defines.h: mswin32: remove obsolete USHORT definition.
+ * process.c (rb_fork_err): Fix the condition to use rb_protect.
- * re.h: mswin32: use EXTERN instead of extern.
+Thu Jun 7 20:29:12 2012 Tanaka Akira <akr@fsij.org>
- * regex.h: mswin32: export re_mbctab properly.
+ * include/ruby/intern.h: rb_exec_arg and related stuff moved back from
+ internal.h
- * win32/ruby.def: add ruby_ignorecase and regex.c's exports.
+Thu Jun 07 15:53:03 2012 Koichi Sasada <ko1@atdot.net>
-Thu May 25 21:28:44 2000 Minero Aoki <aamine@dp.u-netsurf.ne.jp>
+ * .gdbinit: add function `trace_machine_instructions' to trace
+ in native machine assemble.
+ See https://bugs.ruby-lang.org/projects/ruby-trunk/wiki/MachineInstructionsTraceWithGDB
+ for more details.
- * re.c (rb_reg_expr_str): escape un-printable character.
+Wed Jun 6 21:31:21 2012 Tanaka Akira <akr@fsij.org>
-Thu May 25 01:35:15 2000 Yukihiro Matsumoto <matz@netlab.co.jp>
+ * process.c (proc_exec_cmd) renamed from proc_exec_v.
+ (proc_exec_sh): renamed from rb_proc_exec_e.
+ (proc_spawn_cmd_internal): renamed from proc_spawn_v.
+ (proc_spawn_cmd): renamed from proc_spawn_n.
+ (proc_spawn_sh): renamed from proc_spawn.
- * parse.y (tokadd_escape): forgot to add `\x' to hexadecimal
- escape sequences.
+Wed Jun 6 21:18:47 2012 NAKAMURA Usaku <usa@ruby-lang.org>
- * object.c (rb_obj_dup): dup for normal object (T_OBJECT) copies
- instance variables only.
+ * process.c (try_with_sh): please take care of the macro defined by
+ you.
-Wed May 24 23:49:47 2000 Yukihiro Matsumoto <matz@netlab.co.jp>
+Wed Jun 6 20:45:08 2012 Tanaka Akira <akr@fsij.org>
- * object.c (rb_mod_initialize): should provide initialize.
+ * process.c (proc_exec_v): don't call dln_find_exe_r here because it
+ is not async-signal-safe and proc_exec_v is called in a child
+ process.
+ command_abspath field of rb_exec_arg.
+ (rb_exec_fillarg): call dln_find_exe_r and set command_abspath.
+ (rb_exec_err): Give the absolute path of the invoking command for
+ proc_exec_v, instead of the command name.
-Wed May 24 23:17:50 2000 Katsuyuki Komatsu <komatsu@sarion.co.jp>
+ * internal.h: add command_abspath field for rb_exec_arg.
- * win32/Makefile: remove unnecessary mv and rm command call.
+Wed Jun 6 20:08:01 2012 Tanaka Akira <akr@fsij.org>
-Wed May 24 21:01:04 2000 Katsuyuki Komatsu <komatsu@sarion.co.jp>
+ * process.c (try_with_sh): take envp argument.
+ (exec_with_sh): ditto. use it for execve.
+ (proc_exec_v): provide envp for try_with_sh.
- * ext/pty/pty.c: use "" instead of <> to include ruby.h and rubyio.h
- for BeOS (PowerPC).
+Wed Jun 6 13:25:04 2012 NAKAMURA Usaku <usa@ruby-lang.org>
- * file.c (rb_find_file): should check dln_find_file() result.
+ * win32/win32.c, include/ruby/win32.h (rb_w32_wrap_io_handle): new API.
+ this API wraps an I/O handle (HANDLE or SOCKET) and returns fd.
+ the second parameter should be combination of O_*, for example,
+ O_RDWR | O_BINARY | O_NOINHERIT.
- * win32/ruby.def: add rb_block_given_p.
+ * win32/win32.c, include/ruby/win32.h (rb_w32_unwrap_io_handle): new
+ API. this API unwraps an I/O handle and close the fd (not closes
+ the handle itself).
-Wed May 24 16:32:45 2000 Yukihiro Matsumoto <matz@netlab.co.jp>
+ [Feature #4906] [ruby-core:37227]
- * io.c (rb_io_popen): popen does not take 3rd argument anymore.
+Wed Jun 6 13:18:26 2012 NAKAMURA Usaku <usa@ruby-lang.org>
- * re.c (rb_reg_desc): re may be zero, check before dereferencing.
+ * win32/win32.c (rb_w32_close): of course, console handle is not socket.
-Wed May 24 16:03:06 2000 Wakou Aoyama <wakou@fsinet.or.jp>
+Wed Jun 6 12:37:43 2012 NAKAMURA Usaku <usa@ruby-lang.org>
- * lib/cgi.rb: bug fix: CGI::escape(), CGI::Cookie::new()
+ * process.c (rb_run_exec_options_err): allocate a temporary buffer for
+ run_exec_dup2() for restoring fds on non-fork environments.
- * lib/net/telnet.rb: improve: binmode(), telnetmode() interface
+Wed Jun 6 09:45:21 2012 NAKAMURA Usaku <usa@ruby-lang.org>
-Wed May 24 13:12:31 2000 Yukihiro Matsumoto <matz@netlab.co.jp>
+ * test/dl/test_c_{struct_entry,union_entity}.rb: sorry, typos.
- * misc/ruby-mode.el (ruby-parse-region): support `while .. do'
- etc. But corresponding keywords must be at the beginning of
- line.
+Wed Jun 6 05:27:54 2012 Tanaka Akira <akr@fsij.org>
-Tue May 23 23:50:12 2000 Yukihiro Matsumoto <matz@netlab.co.jp>
+ * process.c (rb_exec_fillarg): check use_shell field before accessing
+ a union field.
- * re.c (rb_reg_initialize_m): wrong kcode value.
+Wed Jun 6 04:58:44 2012 Tanaka Akira <akr@fsij.org>
- * re.c (rb_reg_s_new): forgot to initialize re->ptr.
+ * process.c (rb_spawn_process): prog variable is not used for Unix.
-Tue May 23 08:36:24 2000 Yukihiro Matsumoto <matz@netlab.co.jp>
+Wed Jun 6 00:20:37 2012 Tanaka Akira <akr@fsij.org>
- * regex.c (re_compile_pattern): forgot to restore old option
- status by (?ix-ix).
+ * internal.h (rb_exec_arg_init): change return type to void.
- * regex.c (re_compile_fastmap): anychar may match newline if
- RE_OPTION_MULTILINE or RE_OPTION_POSIXLINE is set.
+ * process.c (rb_exec_arg_init): don't return a value.
+ (rb_exec_arg_prepare): ditto.
+ (rb_spawn_process): don't take the prog argument. extract the
+ information from earg.
+ (rb_spawn_internal): follow rb_spawn_process change.
+ (rb_f_spawn): ditto.
-Mon May 22 22:45:06 2000 Minero Aoki <aamine@dp.u-netsurf.ne.jp>
+ * io.c (pipe_open): don't take the prog argument. extract the
+ information from eargp.
+ (pipe_open_v): follow pipe_open change.
+ (pipe_open_s): ditto.
- * lib/net/protocol.rb, smtp.rb, pop.rb, http.rb: 1.1.19.
+Tue Jun 5 23:51:33 2012 Tanaka Akira <akr@fsij.org>
- * lib/net/http.rb: do not use Regexp "p" option.
+ * internal.h (rb_exec_arg): use union to represent command invocation
+ with/without shell.
-Mon May 22 21:56:43 2000 Nobuyoshi Nakada <nobu.nakada@nifty.ne.jp>
+ * process.c: follow the rb_exec_arg change.
- * struct.c (rb_struct_getmember): should use ID2SYM, not INT2NUM.
+ * io.c (pipe_open): ditto.
-Mon May 22 15:07:37 2000 Yukihiro Matsumoto <matz@netlab.co.jp>
+Tue Jun 5 22:28:46 2012 Tanaka Akira <akr@fsij.org>
- * file.c (rb_find_file): should check if the file really exists.
+ * internal.h: rb_exec_arg and related stuff moved from intern.h
-Mon May 22 09:08:12 2000 Yukihiro Matsumoto <matz@netlab.co.jp>
+ * include/ruby/intern.h (rb_proc_exec_n): removed.
- * io.c (rb_io_popen): _exit(0) after processing block under the
- child process.
+Tue Jun 5 21:57:22 2012 Tanaka Akira <akr@fsij.org>
- * io.c (rb_io_popen): flush stdout/stderr before subprocess
- termination.
+ * process.c (rb_exec_arg_fixup): allocate a temporary buffer for
+ run_exec_dup2 here because it should be async-signal-safe.
+ (run_exec_dup2): use the temporary buffer.
+ (run_exec_dup2_tmpbuf_size): new function.
- * eval.c (rb_check_safe_str): insert rb_secure(4); operation
- requires untainted string should be prohibited in level 4.
+ * include/ruby/intern.h (rb_exec_arg): add dup2_tmpbuf field.
-Sun May 21 21:17:00 2000 WATANABE Hirofumi <eban@os.rim.or.jp>
+Tue Jun 5 20:13:15 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * configure.in: add Setup.dj for djgpp cross-compiling.
+ * object.c (rb_obj_init_copy): should check if trusted too.
- * Setup.dj: add readline.
+Tue Jun 5 19:59:13 2012 Tanaka Akira <akr@fsij.org>
- * instruby.rb: copy win32/win32.h to archlibdir on mingw32.
+ * process.c (strtok): declaration removed because it is not used.
-Sun May 21 20:58:08 2000 Katsuyuki Komatsu <komatsu@sarion.co.jp>
+Tue Jun 5 19:33:51 2012 Tanaka Akira <akr@fsij.org>
- * pack.c: fix OFF16 and OFF32 definitions for Alpha and IRIX64.
+ * process.c (proc_spawn): don't detect simple command line here
+ because rb_exec_fillarg already did.
-Sun May 21 17:31:37 2000 WATANABE Hirofumi <eban@os.rim.or.jp>
+Tue Jun 5 19:21:10 2012 Tanaka Akira <akr@fsij.org>
- * instruby.rb: support "make install" for cross-compiling.
+ * process.c (rb_exec_fillarg): bail out a loop eagerly.
- * ext/extmk.rb.in: ditto.
+Tue Jun 5 19:15:14 2012 Tanaka Akira <akr@fsij.org>
-Sun May 21 14:22:49 2000 WATANABE Hirofumi <eban@os.rim.or.jp>
+ * process.c: add comments about async-signal-safe.
- * Makefile.in: rename prep.rb to fake.rb.
+ * io.c: ditto.
- * configure.in: ditto.
+Tue Jun 5 09:25:10 2012 Eric Hodel <drbrain@segment7.net>
-Sat May 20 23:29:14 2000 Yukihiro Matsumoto <matz@netlab.co.jp>
+ * io.c: Edited documentation for IO and File open and new and
+ Kernel#open for consistency and clarity.
- * dir.c (dir_s_new): does not take block; "open" does.
+Mon Jun 4 21:53:56 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * io.c (rb_io_s_new): ditto.
+ * win32/win32.c (rb_w32_sysinit): let the system not display the
+ critical-error-handler message box and the Windows Error Reporting
+ dialog. [ruby-core:45389] [Bug #6535]
-Fri May 19 07:44:26 2000 Yukihiro Matsumoto <matz@netlab.co.jp>
+Mon Jun 4 19:36:25 2012 Tanaka Akira <akr@fsij.org>
- * dir.c (dir_s_open): Dir#open does not returns closed Dir if a
- block is given to the method.
+ * process.c (rb_exec_fillarg): allocate one more element before
+ beginning in argv_str for try_with_sh.
- * re.c (rb_reg_initialize_m): Regexp::new calls initialize now.
+ * internal.h (ARGVSTR2ARGC): adjust for the above change.
+ (ARGVSTR2ARGV): ditto.
- * string.c (Init_String): String#delete_at removed.
+Mon Jun 4 19:17:06 2012 Tanaka Akira <akr@fsij.org>
- * string.c (rb_str_aset_m): should have checked argc != 2.
+ * internal.h (ARGVSTR2ARGC): defined.
+ (ARGVSTR2ARGV): defined.
- * eval.c (rb_thread_schedule): select(2) was called too many.
+ * process.c (proc_exec_v): use ARGVSTR2ARGV.
+ (rb_spawn_process): use ARGVSTR2ARGC and ARGVSTR2ARGV.
- * regex.c (re_compile_pattern): a bug in (?m) support. Pointed
- out by Dave Thomas <Dave@thomases.com>.
+ * io.c (pipe_open): use ARGVSTR2ARGV.
-Thu May 18 23:55:26 2000 Katsuyuki Komatsu <komatsu@sarion.co.jp>
+Mon Jun 4 16:13:00 2012 Koichi Sasada <ko1@atdot.net>
- * dln.c (search_undef): st_lookup()'s 3rd parameter should be
- a pointer of the variable which has the same size and alignment
- as `char *'.
+ * vm_insnhelper.h: remove magical code "lfp[0] & 0x02".
+ Current VM doesn't use this bit.
- * marshal.c (w_symbol, w_object): ditto.
+ * vm_core.h (RUBY_VM_GET_BLOCK_PTR): added.
- * parse.y (rb_intern): ditto.
+ * eval.c (rb_block_given_p): use RUBY_VM_GET_BLOCK_PTR().
-Thu May 18 18:00:35 2000 Minero Aoki <aamine@dp.u-netsurf.ne.jp>
+ * vm_eval.c (rb_f_block_given_p): ditto.
- * lib/net/protocol.rb, smtp.rb, pop.rb, http.rb: 1.1.18.
+Mon Jun 4 15:39:33 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * lib/net/protocol.rb: Net::Version was removed.
+ * win32/win32.c (constat_apply): apply VT100 functions.
+ [ruby-core:44958] [Feature #6418]
- * lib/net/smtp.rb: use Socket.gethostname to get local host name.
+ * win32/win32.c (constat_parse): parse some VT100 escape sequence.
-Thu May 18 13:34:57 2000 Yukihiro Matsumoto <matz@netlab.co.jp>
+Mon Jun 4 14:06:12 2012 NAKAMURA Usaku <usa@ruby-lang.org>
- * ext/socket/socket.c (ruby_connect): should not have replaced
- thread_write_select() by rb_thread_fd_writable().
+ * process.c (rb_exec_err): should preserve errno.
-Thu May 18 09:01:25 2000 Katsuyuki Komatsu <komatsu@sarion.co.jp>
+Mon Jun 4 13:10:11 2012 NAKAMURA Usaku <usa@ruby-lang.org>
- * configure.in, ext/extmk.rb.in, lib/mkmf.rb: remove BeOS R3 support.
- Make a shared library (libruby.so) only if the --enable-shared
- option is specified.
+ * test/dl/test_c_{struct_entry,union_entity}.rb: broken require.
- * instruby.rb: no longer use libruby.so.LIB and import.h.
+Mon Jun 4 12:01:21 2012 Koichi Sasada <ko1@atdot.net>
- * io.c: fix READ_DATA_PENDING definition for BeOS (PowerPC).
+ * test/ruby/test_backtrace.rb: fix test.
+ Windows path includes `:' character.
-Wed May 17 14:14:23 2000 Yukihiro Matsumoto <matz@netlab.co.jp>
+Mon Jun 4 11:42:39 2012 Koichi Sasada <ko1@atdot.net>
- * re.c (rb_reg_new_1): use /m instead of /p.
+ * vm_core.h (rb_location_t): fix type and field name.
+ (1) rename rb_location_t to rb_iseq_location_t.
+ (2) rename field names of rb_iseq_location_t to adjust
+ RubyVM::Backtrace::Location methods.
+ (2-1) filename -> path
+ (2-2) filepath -> absolute_path
+ (2-3) basename -> base_label
+ (2-4) name -> label
+ (3) rename filed name rb_iseq_location_t#line_no to
+ rb_iseq_location_t#first_lineno to clear purpose of this field.
+ (4) The field names rb_binding_t#(filename|line_no) are also renamed
+ to rb_binding_t#(path|first_lineno).
-Wed May 17 02:22:03 2000 Yukihiro Matsumoto <matz@netlab.co.jp>
+ * compile.c: apply above changes.
- * eval.c (rb_thread_polling): wait 0.06 second to let other
- processes run.
+ * iseq.c: ditto.
- * process.c (rb_waitpid): avoid busy wait using rb_thread_polling.
+ * proc.c: ditto.
- * file.c (rb_thread_flock): ditto.
+ * vm*.c: ditto.
- * parse.y (expr): avoid calling value_expr() twice.
+Mon Jun 4 11:40:28 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Wed May 17 00:45:57 2000 WATANABE Hirofumi <eban@os.rim.or.jp>
+ * marshal.c (r_object0): also load TYPE_USRMARSHAL, TYPE_DATA using
+ compatible loader.
- * io.c (rb_io_binmode): should check PLATFORMs, not O_BINARY, sigh...
+Mon Jun 4 11:33:42 2012 NAKAMURA Usaku <usa@ruby-lang.org>
-Wed May 17 00:40:15 2000 Katsuyuki Komatsu <komatsu@sarion.co.jp>
+ * process.c (rb_run_exec_options_err): restore save_env() call for
+ non-fork environments.
- * win32/config.h: add DLEXT2, now DLEXT on mswin32 is "so".
+ * process.c (rb_exec_err): restore environments after the failure of
+ exec to fix [ruby-core:44093] [Bug #6249] on non-fork environments
- * win32/config.status: ditto.
+Mon Jun 4 10:42:04 2012 NAKAMURA Usaku <usa@ruby-lang.org>
- * win32/ruby.def: add symbol "rb_big_divmod".
+ * io.c (pipe_open): follow up changes in r35889.
-Tue May 16 19:45:32 2000 Katsuyuki Komatsu <komatsu@sarion.co.jp>
+ * process.c (proc_spawn_n): now uses char ** instead of VALUE *.
- * intern.h: use EXTERN instead of extern.
+ * process.c (rb_spawn_process): prog is now VALUE of String, not char *.
- * win32/ruby.def: add rb_defout, rb_stdout, ruby_errinfo,
- ruby_sourceline, ruby_sourcefile to work with eruby
- reported by Hiroshi Saito <HiroshiSaito@pob.org>.
- Export both ruby_xmalloc and xmalloc etc.
+Mon Jun 4 06:12:43 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Tue May 16 17:00:05 2000 Masaki Fukushima <fukusima@goto.info.waseda.ac.jp>
+ * marshal.c (r_object0): remove old warning for _alloc.
- * eval.c (rb_thread_select): should check whether fds are null.
+Mon Jun 4 04:24:06 2012 Tadayoshi Funaba <tadf@dotrb.org>
-Tue May 16 11:51:31 2000 Yukihiro Matsumoto <matz@netlab.co.jp>
+ * marshal.c: experimental test aborted.
+ * complex.c: ditto.
+ * rational.c: ditto.
+ * include/ruby/intern.h: ditto.
- * io.c (pipe_open): synchronize subprocess stdout/stderr.
+Mon Jun 4 00:45:18 2012 Tanaka Akira <akr@fsij.org>
-Mon May 15 15:38:09 2000 Yukihiro Matsumoto <matz@netlab.co.jp>
+ * process.c (rb_spawn_process): fix for Windows. not tested.
- * ruby.h: exported symbols should be for xmalloc etc. are now
- prefixed by 'ruby_', e.g. ruby_xmalloc().
+Mon Jun 4 00:11:51 2012 Tanaka Akira <akr@fsij.org>
- * eval.c (rb_thread_select): remove busy wait for select.
+ * process.c (rb_proc_exec_e): don't use ISSPACE(). \f, \r and \v
+ are not word separator in Bourne shell.
- * dir.c (glob): trailing path may be null, e.g. glob("**").
+Sun Jun 3 23:47:30 2012 Tanaka Akira <akr@fsij.org>
-Mon May 15 14:48:41 2000 Nobuyoshi Nakada <nobu.nakada@nifty.ne.jp>
+ * include/ruby/intern.h (rb_exec_arg): remove argc and argv fields.
+ add use_shell, argv_str and argv_buf fields.
- * io.c (rb_io_pid): new method; returns nil if no process attached
- to the IO.
+ * process.c (rb_proc_exec_e): don't split shell command line arguments
+ here to avoid memory allocation in a child process.
+ (rb_exec_fillarg): split shell command line arguments here.
+ (proc_exec_v): takes argv_str argument instead of argv.
+ (rb_proc_exec_ne): removed.
+ (rb_proc_exec_n): removed.
+ (rb_run_exec_options_err): don't initialize the removed fields.
+ (rb_exec_err): don't initialize the removed fields.
+ call proc_exec_v directly instead of rb_proc_exec_ne.
+ (rb_spawn_process): use use_shell field.
-Mon May 15 01:18:20 2000 Yukihiro Matsumoto <matz@netlab.co.jp>
+Sun Jun 3 21:53:00 2012 NARUSE, Yui <naruse@ruby-lang.org>
- * io.c (rb_io_s_popen): _exit after Proc execution.
+ * GPL: update text of GPLv2. [ruby-core:44488] [Bug #6328]
+ http://www.gnu.org/licenses/gpl-2.0.txt
-Sun May 14 18:05:59 2000 WATANABE Hirofumi <eban@os.rim.or.jp>
+Sun Jun 3 21:22:52 2012 Tanaka Akira <akr@fsij.org>
- * Makefile.in: missing/nt.c -> win32/win32.c
+ * process.c (rb_exec_getargs): remove rb_exec_arg argument.
- * configure.in: bug fix; static linking on mingw32.
+Sun Jun 3 21:14:26 2012 Tadayoshi Funaba <tadf@dotrb.org>
- * cygwin/GNUmakefile.in: remove VPATH.
+ * marshal.c: calls directly rb_{Complex,Rational}_marshal_load().
+ But now disabled. [experimental]
+ * complex.c: followed the above.
+ * rational.c: ditto.
+ * include/ruby/intern.h: ditto.
- * ext/extmk.rb.in: Makefile set binmode with mingw32 on cygwin32.
+Sun Jun 3 21:18:17 2012 Tanaka Akira <akr@fsij.org>
- * lib/mkmf.rb: ditto.
+ * process.c (rb_check_argv): use rb_str_new_frozen instead of
+ rb_str_new4.
- * win32/config.h: undef HAVE_SYS_FILE_H.
+Sun Jun 3 20:10:52 2012 Tanaka Akira <akr@fsij.org>
-Sun May 14 02:02:48 2000 WATANABE Hirofumi <eban@os.rim.or.jp>
+ * process.c (rb_proc_exec_e): extended version of rb_proc_exec() to
+ call execle().
+ (rb_proc_exec): use rb_proc_exec_e().
+ (rb_exec_err): use rb_proc_exec_e().
- * lib/irb/ruby-lex.rb: '/' should be escaped in character class.
+Sun Jun 3 19:47:18 2012 NARUSE, Yui <naruse@ruby-lang.org>
-Sun May 14 00:54:43 2000 WATANABE Hirofumi <eban@os.rim.or.jp>
+ * thread.c (vm_living_thread_num): suppress a warning.
- * configure.in, ...: support mingw32.
+Sun Jun 3 17:23:52 2012 Tanaka Akira <akr@fsij.org>
- * defines.h: ditto. undef EXTERN for tcl/tk on cygwin.
+ * use execve() to preserve environment variables when exec method is
+ failed. [ruby-core:44093] [ruby-trunk - Bug #6249]
- * ext/*/extconf.rb: replace PLATFORM with RUBY_PLATFORM.
+ * include/ruby/intern.h (rb_exec_arg): add envp_str and envp_buf field
+ to store envp of execve().
- * ext/socket/sockport.h: define IN_MULTICAST for missing IN_MULTICAST.
+ * process.c (proc_exec_v): takes envp_str as an argument and use it
+ for execve().
+ (rb_proc_exec_ne): extended version of rb_proc_exec_n().
+ (rb_proc_exec_n): use rb_proc_exec_ne().
+ (rb_proc_exec): follow proc_exec_v() change.
+ (fill_envp_buf_i): new function.
+ (rb_exec_arg_fixup): set up envp_str and envp_buf.
+ (save_env_i): removed.
+ (save_env): removed.
+ (rb_run_exec_options_err): don't modify environment variables.
+ (rb_exec_err): use rb_proc_exec_ne().
- * ext/tcltklib/tcltklib.c: remove declaration of rb_argv0.
+Sun Jun 3 16:33:58 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * file.c: should check S_IXGRP, S_ISGID, not NT.
+ * marshal.c: revert r35879 "now marshal_{load|dump} are external."
- * io.c (rb_io_binmode): should check _IOBIN, O_BINARY, not PLATFORMs.
+ * complex.c (nucomp_marshal__{dump,load}): should use rb_marshal_{dump,load}.
-Sat May 13 14:21:15 2000 Koji Arai <JCA02266@nifty.ne.jp>
+ * rational.c (nurat_marshal__{dump,load}): ditto.
- * io.c (rb_io_s_popen): should check whether a block is given.
+Sun Jun 3 14:13:58 2012 Tadayoshi Funaba <tadf@dotrb.org>
-Fri May 12 17:33:44 2000 Yukihiro Matsumoto <matz@netlab.co.jp>
+ * ext/date/date_core.c: checks whether the object is frozen or not.
- * regex.c (re_compile_pattern): charset_not should not exclude
- newline from matching set.
+Sun Jun 3 14:00:51 2012 Tadayoshi Funaba <tadf@dotrb.org>
-Thu May 11 22:51:05 2000 Ryunosuke Ohshima <ryu@jaist.ac.jp>
+ * complex.c: wrote Complex#_dump and Complex::load. But now
+ disabled (due to compatibility) [experimental].
- * pack.c (pack_pack): Bignum support.
+ * rational.c: wrote Rational#_dump and Rational::load. ditto.
- * pack.c (pack_unpack): ditto.
+Sun Jun 3 10:23:32 2012 Tadayoshi Funaba <tadf@dotrb.org>
-Thu May 11 21:19:29 2000 Hiroshi Igarashi <iga@ruby-lang.org>
+ * complex.c (nucomp_marshal_load): [ruby-core:45394]
+ * rational.c (nurat_marshal_load): ditto.
- * intern.h: add missing declarations of ruby API functions.
+Sun Jun 3 03:15:46 2012 NARUSE, Yui <naruse@ruby-lang.org>
- * ruby.h: fix function name in declarations.
+ * regparse.c (onig_number_of_names): suppress a warning.
-Thu May 11 22:29:25 2000 Katsuyuki Komatsu <komatsu@sarion.co.jp>
+Sun Jun 3 01:36:52 2012 Koichi Sasada <ko1@atdot.net>
- * ext/md5/depend: add $(topdir)/config.h dependency to md5c.o.
+ * vm_backtrace.c: change names.
+ (1) Class name: RubyVM::FrameInfo -> RubyVM::Backtrace::Location.
+ (2) Method name: RubyVM::FrameInfo.caller ->
+ Kernel.caller_locations.
+ (3) Instance methods of
+ RubyVM::FrameInfo (RubyVM::Backtrace::Location)
+ (3-1) name -> label
+ (3-2) basename -> base_label (basename is confusing with
+ File.basename)
+ (3-3) line_no -> lineno (We have already similar name
+ File#lineno, commented by kou [ruby-dev:45686]).
+ (3-4) filename -> path.
+ (3-5) filepath -> absolute_path.
+ (3-5) iseq -> removed (we will make other APIs to access iseq
+ and other information of frame for debugging).
- * ext/md5/extconf.rb: new file to add -DHAVE_CONFIG_H flag for Alpha.
+ * test/ruby/test_backtrace.rb: apply above changes.
+ And apply comment from kou [ruby-dev:45686].
-Thu May 11 10:55:52 2000 Ryunosuke Ohshima <ryu@jaist.ac.jp>
+Sun Jun 3 00:49:11 2012 Koichi Sasada <ko1@atdot.net>
- * pack.c (pack_pack): packing BER compressed integer by `w'.
+ * common.mk: fix to build vm_backtrace.c only itself (vm_backtrace.c
+ is no longer included from vm.c). I hope this separation reduce
+ compile time of vm.c.
- * pack.c (pack_unpack): unpacking BER.
+ * internal.h: ditto.
-Thu May 11 00:37:55 2000 Yukihiro Matsumoto <matz@netlab.co.jp>
+ * vm.c, vm_core.h, vm_dump.c, vm_eval.c: ditto.
- * parse.y (parse_regx): remove in_brack.
+ * vm_eval.c: some functions (callee, etc) moved to vm_backtrace.c.
-Wed May 10 12:51:18 2000 Yukihiro Matsumoto <matz@netlab.co.jp>
+Sun Jun 3 00:20:53 2012 Koichi Sasada <ko1@atdot.net>
- * ruby.c (proc_options): move adding RUBYLIB and "." to the load
- path after #! line parsing.
+ * vm_backtrace.c: added. Separate backtrace related functions to
+ this file.
- * parse.y (parse_regx): should parse backslash escape like `\c['
- here to avoid causing `unterminated regexp' error.
+ * vm.c, common.mk: ditto.
-Wed May 10 00:19:53 2000 Katsuyuki Komatsu <komatsu@sarion.co.jp>
+Sat Jun 2 18:09:02 2012 Akinori MUSHA <knu@iDaemons.org>
- * MANIFEST, beos/GNUmakefile.in, configure.in: no longer need
- beos/GNUmakefile.in to support BeOS R4.5.2 (Intel) as a result
- of eban's Makefile.in change.
+ * lib/ipaddr.rb: Inhibit zero-filled octets in an IPv4 address in
+ all platforms. [ruby-dev:45671]
- * io.c: NOFILE is already defined on BeOS R4.5 (Intel) or later.
+ * lib/ipaddr.rb: Allow the x:x:x:x:x:x:d.d.d.d form not limited to
+ IPv4 mapped/compatible addresses. This change also makes it
+ possible for the parser to understand IPv4 mapped and compatible
+ IPv6 addresses in non-compressed form.
- * lib/matrix.rb: remove debug print.
+ * lib/ipaddr.rb: Stop exposing IPSocket.valid*? methods which were
+ only usable on non-IPv6-ready platforms.
- * regex.c: don't use nested comment.
+Sat Jun 2 16:59:00 2012 NARUSE, Yui <naruse@ruby-lang.org>
-Tue May 9 17:08:43 2000 Yukihiro Matsumoto <matz@netlab.co.jp>
+ * string.c (rb_enc_cr_str_buf_cat): don't reset coderange as unknown.
+ the condition 'ptr_a8 && str_cr != ENC_CODERANGE_7BIT' means not
+ unknown, str is also ASCII-8BIT because str_encindex == ptr_encindex,
+ and nont (str_cr == ENC_CODERANGE_UNKNOWN) and
+ str_cr != ENC_CODERANGE_7BIT means str_cr is valid because ASCII-8BIT
+ can't be broken. [ruby-dev:45688] [Bug #6509]
- * eval.c (massign): no longer convert nil into empty array.
+Sat Jun 2 07:04:48 2012 Eric Hodel <drbrain@segment7.net>
- * io.c (rb_io_s_popen): optional 3rd argument to give proc, which
- will be executed in spawned child process.
+ * doc/re.rdoc (Performance): Replaced incorrect example of reducing
+ backtracking through anchoring with reduced backtracking through a
+ range. [ruby-trunk - Bug #6525]
-Mon May 8 23:47:39 2000 Katsuyuki Komatsu <komatsu@sarion.co.jp>
+Sat Jun 2 06:34:15 2012 Eric Hodel <drbrain@segment7.net>
- * eval.c (rb_callcc): prev & next should be initialized to zero.
+ * doc/re.rdoc (Performance): Removed useless sample output from final
+ performance example and switched from #match to #=~ for consistency.
+ [ruby-trunk - Bug #6524]
-Mon May 8 23:17:36 2000 Yukihiro Matsumoto <matz@netlab.co.jp>
+Fri Jun 1 09:30:53 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * dln.c (dln_init): remove possible buffer overrun. This is
- suggested by Aleksi Niemela <aleksi.niemela@cinnober.com>.
+ * object.c (class_or_module_required): extract check for class or
+ module.
- * dln.c (init_funcname): ditto.
+Fri Jun 1 08:50:47 2012 Eric Hodel <drbrain@segment7.net>
-Sat May 6 23:35:47 2000 Yukihiro Matsumoto <matz@netlab.co.jp>
+ * array.c: Updated Array documentation formatting. Patch by Zachary
+ Scott. [ruby-trunk - Feature #6517]
- * parse.y (lhs): should allow `obj.Attr = 5' type expression.
+Fri Jun 1 06:57:10 2012 Eric Hodel <drbrain@segment7.net>
-Sat May 6 15:46:08 2000 WATANABE Hirofumi <eban@os.rim.or.jp>
+ * ext/dl/lib/dl/struct.rb (DL::CStructEntity#set_ctypes): Refactored
+ #set_ctypes using newer ruby features to simplify its implementation.
+ * test/dl/test_c_struct_entry.rb (class DL): Test to verify
+ refactoring.
- * ext/socket/extconf.rb: add a new configure option to force use
- of the WIDE Project's getaddrinfo(): --enbale-wide-getaddrinfo.
+Fri Jun 1 06:40:25 2012 Eric Hodel <drbrain@segment7.net>
-Fri May 5 21:19:22 2000 MOROHOSHI Akihiko <moro@remus.dti.ne.jp>
+ * object.c (Init_Object): Restored Kernel documentation based on
+ Pickaxe book documentation. Patch by Zachary Scott.
+ [ruby-trunk - Feature #6521]
- * parse.y (yylex): allow '$1foo' and such.
+Fri Jun 1 06:29:42 2012 Eric Hodel <drbrain@segment7.net>
-Fri May 5 17:57:24 2000 Minero Aoki <aamine@dp.u-netsurf.ne.jp>
+ * object.c (rb_equal): Let Object be a link in #=== documentation.
+ Patch by Zachary Scott. [ruby-trunk - Feature #6518]
- * lib/net/protocol.rb, smtp.rb, pop.rb, http.rb: 1.1.17.
+Thu May 31 09:27:06 2012 Eric Hodel <drbrain@segment7.net>
- * lib/net/http.rb: write also port number in Host: field.
+ * ext/dl/lib/dl/struct.rb (DL::CStructEntity::size): Refactored ::size
+ to remove unused variables and simplify using newer ruby features.
+ * test/dl/test_c_struct_entry.rb: Test to validate refactoring
- * lib/net/http.rb: see Proxy-Connection: to decide socket connection.
+Thu May 31 08:40:34 2012 Eric Hodel <drbrain@segment7.net>
-Fri May 5 03:25:15 2000 Yukihiro Matsumoto <matz@netlab.co.jp>
+ * ext/dl/lib/dl/struct.rb (DL::CUnionEntity#set_ctypes): Refactored
+ #set_types to reuse DL::CUnionEntity::size
+ * test/dl/test_c_union_entity.rb: Added test
- * regex.c (re_compile_fastmap): charset_not for multibyte
- characters excluded too many characters.
+Thu May 31 08:20:14 2012 Eric Hodel <drbrain@segment7.net>
-Tue May 2 13:23:43 2000 Yukihiro Matsumoto <matz@netlab.co.jp>
+ * ext/dl/lib/dl/struct.rb (DL::CUnionEntity::size): Fixed ::size to
+ return the size of the union.
+ * test/dl/test_c_union_entity.rb: Test for DL::CUnionEntity::size
- * eval.c (rb_thread_schedule): little bit more impartial context
- switching.
+Thu May 31 07:45:43 2012 Eric Hodel <drbrain@segment7.net>
-Tue May 2 09:50:03 2000 Katsuyuki Komatsu <komatsu@sarion.co.jp>
+ * ext/dl: Added documentation. Patch by Vincent Batts.
+ [ruby-trunk - Bug #6496]
- * configure.in: add DLDLIBS to set platform specific library
- for extensions.
+Wed May 30 16:30:00 2012 Kenta Murata <mrkn@cookpad.com>
- * ext/extmk.rb.in: use @DLDLIBS@ instead of RUBY_PLATFORM choice.
+ * ext/bigdecimal/lib/bigdecimal/jacobian.rb,
+ ext/bigdecimal/lib/bigdecimal/newton.rb:
+ fix documentation comments.
+ Patch by alperakgun from github.com/shyouhei/ruby/pull/8
- * lib/mkmf.rb: use CONFIG["DLDLIBS"] instead of RUBY_PLATFORM choice.
+Wed May 30 16:20:00 2012 Kenta Murata <mrkn@cookpad.com>
- * config_s.dj: add @DLDLIBS@.
+ * ext/bigdecimal/lib/bigdecimal/jacobian.rb (Jacobian#dfdxi):
+ fix jacobian to get stuck in an infinite loop when a solution is not
+ found due to forget to increment nRetry counter.
+ Patch by alperakgun from github.com/shyouhei/ruby/pull/8
- * win32/config.status: ditto.
+Wed May 30 10:58:31 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * win32/ruby.def: regular maintenance.
+ * time.c (utc_offset_arg): utc offset can be precision in seconds.
+ e.g. old Europe/Lisbon (c.f. [ruby-dev:40066])
-Mon May 1 23:42:44 2000 WATANABE Hirofumi <eban@os.rim.or.jp>
+Wed May 30 06:20:29 2012 Eric Hodel <drbrain@segment7.net>
- * configure.in, eval.c: add DLEXT2. now DLEXT on Cygwin is "so".
+ * error.c (exc_set_backtrace): Updated documentation to indicate
+ set_backtrace allows a string as well as an array of strings.
+ [ruby-trunk - Bug #6501]
- * defines.h: use dllimport, dllexport for Cygwin 1.1.x.
+Tue May 29 17:28:20 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * ruby.h: ditto.
-
- * cygwin/GNUmakefile.in: ditto.
+ * strftime.c (rb_strftime_with_timespec): support GNU extension triple
+ colons modifier. [EXPERIMENTAL]
- * ext/Win32API/Win32API.c: directly "call" in asm statement for
- gcc 2.95.x or newer.
+ * strftime.c (rb_strftime_with_timespec): check conversion with locale
+ modifier.
-Sat Apr 29 04:58:12 2000 Nobuyoshi Nakada <nobu.nakada@nifty.ne.jp>
+ * strftime.c (rb_strftime_with_timespec): colons are valid only for
+ 'z' and must come just before it.
- * array.c (rb_ary_unshift_m): performance improvement.
+Mon May 28 16:56:55 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Fri Apr 28 00:19:22 2000 Nobuyoshi Nakada <nobu.nakada@nifty.ne.jp>
+ * lib/test/unit.rb (Test::Unit::Runner#_prepare_run): StatusLineOutput
+ needs job_status to be :replace.
- * array.c (rb_ary_unshift_m): takes items to push.
+Mon May 28 13:35:33 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Wed Apr 26 15:23:02 2000 Yukihiro Matsumoto <matz@netlab.co.jp>
+ * common.mk (do-install-*): fix dependencies. based on the patch by
+ nagachika at [ruby-dev:45683]. [Bug #6506]
- * string.c (rb_str_succ): insert carrying character just before
- the leftmost alpha numeric character.
+Mon May 28 12:03:04 2012 Narihiro Nakamura <authornari@gmail.com>
- * string.c (rb_str_succ): proper behavior for "".succ and "\377".succ.
+ * gc.c (obj_free): doesn't free a method table if it doesn't
+ exist. [ruby-dev:44436]
+ * test/ruby/test_gc.rb (class TestGc): added the test case for
+ this issue.
- * string.c (rb_str_succ): use realloc and memmove.
+Sun May 27 23:37:48 2012 Koichi Sasada <ko1@atdot.net>
-Tue Apr 25 18:28:45 2000 Minero Aoki <aamine@dp.u-netsurf.ne.jp>
+ * benchmark/bm_vm1_lvar_init.rb: added.
+ This benchmark measures a initialize time of non-used variable.
- * lib/net/protocol.rb, smtp.rb, pop.rb, http.rb: 1.1.16.
+ * benchmark/bm_vm1_lvar_set.rb: added.
+ This benchmark measures a local variables initialization time.
- * lib/net/smtp.rb: add SMTP AUTH
+ * benchmark/bm_vm2_bigarray.rb: added.
+ This benchmark mesures a big array literal creation time.
-Tue Apr 25 14:30:13 2000 Yukihiro Matsumoto <matz@netlab.co.jp>
+ * benchmark/bm_vm2_bighash.rb: added.
+ This benchmark mesures a big hash literal creation time.
- * io.c (rb_io_gets_internal): shortcut when rs == rb_default_rs.
+ * benchmark/bm*: change notation "i=0" to "i = 0".
-Sat Apr 22 23:14:41 2000 SHIROYAMA Takayuki <psi@fortune.nest.or.jp>
+Sun May 27 13:33:26 2012 Koichi Sasada <ko1@atdot.net>
- * configure.in: MacOS X support.
+ * benchmark/driver.rb: fix to continue benchmarks when
+ an error is occurred.
-Sat Apr 22 16:37:10 2000 Minero Aoki <aamine@dp.u-netsurf.ne.jp>
+Sun May 27 11:27:50 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * lib/net/protocol.rb, smtp.rb, pop.rb, http.rb: 1.1.15.
+ * lib/test/unit.rb (Test::Unit::Runner#_prepare_run): fix operator
+ precedence, so that platform and TERM should be counted.
- * lib/net/http.rb: closing socket by watching both
- user header and server response
+Sun May 27 10:02:33 2012 Tadayoshi Funaba <tadf@dotrb.org>
-Fri Apr 21 21:44:34 2000 WATANABE Hirofumi <eban@os.rim.or.jp>
+ * ext/date/date_strftime.c: allows %Ok and %Ol.
- * io.c (rb_io_s_pipe): should set FMODE_SYNC.
+Sun May 27 09:29:20 2012 Tadayoshi Funaba <tadf@dotrb.org>
-Thu Apr 20 16:59:22 2000 Nobuyoshi Nakada <nobu.nakada@nifty.ne.jp>
+ * ext/date/date_core.c: modified doc.
- * eval.c (massign): `*lvalue = false' should assign `[false]' to
- lvalue.
+Sat May 26 19:04:34 2012 Tadayoshi Funaba <tadf@dotrb.org>
-Wed Apr 19 08:35:08 2000 Yukihiro Matsumoto <matz@netlab.co.jp>
+ * ext/date/date_core.c: added description.
- * class.c (rb_singleton_class): generate singleton class for
- special constants: nil, true, false.
+Sat May 26 18:14:57 2012 Tadayoshi Funaba <tadf@dotrb.org>
-Wed Apr 19 02:09:30 2000 Yukihiro Matsumoto <matz@netlab.co.jp>
+ * ext/date/date_strftime.c: reduced the code.
- * class.c (rb_singleton_class): singleton method for nil, true,
- false is possible now.
+Sat May 26 18:08:59 2012 Tadayoshi Funaba <tadf@dotrb.org>
- * eval.c (rb_eval): ditto.
+ * time.c: modified doc.
+ * ext/date/date_core.c: ditto.
-Tue Apr 18 18:54:25 2000 Minero Aoki <aamine@dp.u-netsurf.ne.jp>
+Sat May 26 17:05:45 2012 Koichi Sasada <ko1@atdot.net>
- * lib/net/protocol.rb, smtp.rb, pop.rb, http.rb: 1.1.14.
+ * vm.c (backtrace_*): change type of lev and n from size_t to int.
+ Also set type of rb_backtrace_t#backtrace_size to int.
+ A patch from nobu.
- * lib/net/http.rb: new method HTTP#head2.
+ * vm_eval.c: ditto.
- * lib/net/http.rb: get2/post2 does not raise exceptions.
+Sat May 26 16:26:30 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Mon Apr 17 15:16:31 2000 Yukihiro Matsumoto <matz@netlab.co.jp>
+ * file.c (realpath_rec): UNC prefix does not end with path separator,
+ so new separator is needed after it.
- * io.c (rb_io_close): to detect some exceptional status, writable
- IO should be flushed before close;
+Sat May 26 15:29:22 2012 Koichi Sasada <ko1@atdot.net>
-Sat Apr 15 18:29:00 2000 Yukihiro Matsumoto <matz@netlab.co.jp>
+ * test/ruby/test_backtrace.rb (test_caller_lev):
+ decrease recursion size.
- * array.c (rb_ary_collect_bang): Array#filter renamed.
+Sat May 26 13:50:48 2012 Koichi Sasada <ko1@atdot.net>
-Fri Apr 14 19:47:11 2000 Minero Aoki <aamine@dp.u-netsurf.ne.jp>
+ * NEWS: add Kernel#caller's second argument.
- * lib/net/protocol.rb, smtp.rb, pop.rb, http.rb: 1.1.13.
+Sat May 26 13:40:29 2012 Koichi Sasada <ko1@atdot.net>
- * lib/net/pop.rb: accept illegal timestamp
+ * vm.c (RubyVM::FrameInfo): add a class to access each frame
+ information. You don't need to parse strings from caller().
+ FrameInfo has the following methods:
+ FrameInfo#name: method name, class name, etc with decorations.
+ FrameInfo#basename: name without decorations.
+ FrameInfo#line_no: line number.
+ FrameInfo#filename: file name.
+ FrameInfo#filepath: full filepath.
+ FrameInfo#iseq: iseq if it is iseq frame (defined by ruby script)
+ FrameInfo#to_s: return caller() method style string.
+ RubyVM::FrameInfo.caller(n, lev) returns array of FrameInfo objects.
+ The name "RubyVM::FrameInfo.caller" is long and ambiguous (it is
+ confusing with Kernel::caller() method), we need to change the name
+ before Ruby 2.0 release. Good names or comments are welcome.
- * lib/net/http.rb: when body was chunked, does not set Content-Length:
+ * test/ruby/test_backtrace.rb: add a test for above change.
-Tue Apr 11 21:14:42 2000 Katsuyuki Komatsu <komatsu@sarion.co.jp>
+Sat May 26 12:18:09 2012 Koichi Sasada <ko1@atdot.net>
- * config_s.dj: add @sitedir@.
- * configure.in: add --with-sitedir=DIR option.
- * instruby.rb: use CONFIG["sitedir"].
- * lib/mkmf.rb: support 'make site-install'.
- * win32/config.status: add @sitedir@.
+ * vm.c (frame_info_to_str): add `break'.
-Tue Apr 11 16:25:15 2000 Yukihiro Matsumoto <matz@netlab.co.jp>
+ * vm.c (backtrace_object): remove lev and n parameter.
+ backtrace_object always returns all of backtrace information.
- * bignum.c (rb_big_2comp): unnecessary lvalue cast removed.
+ * vm.c (rb_backtrace_to_str_ary): fix to use backtrace_object().
+ This change improve performance of caller(lev, n).
-Tue Apr 11 02:25:53 2000 Yukihiro Matsumoto <matz@netlab.co.jp>
+ * benchmark/bm_vm3_backtrace.rb: added to check above improvement.
+ FYI: measurement on my laptop, 1.9.3p229 needs 5.125 sec,
+ and current trunk only needs 0.299sec.
- * hash.c (env_fetch): new method.
+Sat May 26 11:05:09 2012 Koichi Sasada <ko1@atdot.net>
- * marshal.c (marshal_dump): accepts depth = nil for unlimited depth.
+ * vm.c (rb_frame_info_t): keep previous ISEQ frame info for CFUNC
+ frame info. And fix to cache a calculated line_no of ISEQ frame
+ info.
-Sun Apr 9 20:49:19 2000 Dave Thomas <Dave@Thomases.com>
+Sat May 26 09:54:53 2012 Martin Bosslet <Martin.Bosslet@googlemail.com>
- * parse.y (str_extend): Allow class variables to be expanded.
+ * ext/openssl/ossl_ssl.c: Allow disabling client-side renegotiation.
+ * test/openssl/test_ssl.rb: Simple tests for this.
-Fri Apr 7 02:03:54 2000 Yukihiro Matsumoto <matz@netlab.co.jp>
+ Client-side renegotiation is still considered problematic, even
+ when used in the context of secure renegotiation (RI, RFC 5746).
+ The changes allow users to either completely disable client
+ renegotiation on the server, or to specify a maximum number of
+ handshakes allowed in total. The number of total handshakes is
+ counted in a callback set as SSL_set_info_callback. If the
+ maximum number of handshakes is exceeded an error will be raised
+ We do not support renegotiation in the OpenSSL extension, therefore
+ this feature can only be tested externally.
+ The feature is opt-in, the default setting will be to allow
+ unlimited client renegotiation, as was the case before.
- * error.c (rb_sys_fail): escape non-printable characters.
+Fri May 25 23:38:58 2012 Martin Bosslet <Martin.Bosslet@googlemail.com>
-Thu Apr 6 20:10:47 2000 Katsuyuki Komatsu <komatsu@sarion.co.jp>
+ * test/openssl/test_ssl.rb: Clarify the intention of errors to be
+ expected. Two errors are possible when connection is refused due
+ to a protocol version that was explicitly disallowed,
+ OpenSSL::SSL::SSLError or Errno::ECONNRESET, depending on the
+ OpenSSL version in use.
- * ext/extmk.rb.in (create_makefile): BeOS --program-suffix support.
- * lib/mkmf.rb (create_makefile): ditto.
+Fri May 25 22:19:40 2012 Martin Bosslet <Martin.Bosslet@googlemail.com>
-Thu Apr 6 09:55:26 2000 Katsuyuki Komatsu <komatsu@sarion.co.jp>
+ * ext/openssl/ossl_ssl.c: Revert r35583
+ * test/openssl/test_ssl.rb: Handle ECONNRESET in code instead to avoid
+ the test failing in Ruby CI [1]
- * error.c (rb_sys_fail): need rb_exc_new2() call on BeOS.
+ [1] http://u64.rubyci.org/~chkbuild/ruby-trunk/log/20120507T190102Z.log.html.gz#test-all
-Mon Apr 3 17:22:27 2000 Yukihiro Matsumoto <matz@netlab.co.jp>
+Fri May 25 19:51:36 2012 Koichi Sasada <ko1@atdot.net>
- * io.c (rb_io_reopen): support tempfile.
+ * vm_eval.c (rb_f_caller): caller() method accepts second optional
+ argument `n' which specify how many frames should return.
+ For example, `caller(0, 1)' returns only one frame information
+ which calls caller() method. If there are less than n frame
+ information, then all frame information are returned. If n is 0,
+ then always return [].
+ This fix is part of [ruby-dev:42345] [Ruby 1.9-Feature#3917].
+ However, performance and features are not enough.
+ RDoc is also not available.
- * eval.c (catch_i): should supply argument.
+ * test/ruby/test_backtrace.rb: add a test for above.
-Sat Apr 1 22:50:28 2000 Yukihiro Matsumoto <matz@netlab.co.jp>
+Fri May 25 17:05:07 2012 Koichi Sasada <ko1@atdot.net>
- * marshal.c (r_object): wrong symbol restoration.
+ * vm.c (oldbt_init, vm_backtrace_str_ary): arg->data should
+ be initialized before calling `backtrace_each()'.
-Sat Apr 1 21:30:53 2000 WATANABE Hirofumi <eban@os.rim.or.jp>
+Fri May 25 16:11:27 2012 NAKAMURA Usaku <usa@ruby-lang.org>
- * io.c(rb_io_printf, rb_f_printf): should use rb_io_write.
+ * trunk/ext/-test-/printf/printf.c: change function names because of
+ conflict with msvcrt. fixed build error of mswin.
-Sat Apr 1 00:16:05 2000 Yukihiro Matsumoto <matz@netlab.co.jp>
+Fri May 25 10:52:52 2012 Koichi Sasada <ko1@atdot.net>
- * gc.c (rb_gc_call_finalizer_at_exit): should be clear flags
- before calling finalizers.
+ * vm.c: refactoring backtrace related functions.
+ (1) unify similar functions (rb_backtrace_each() and
+ backtrace_object()). backtrace_each() is a unified function.
+ variation:
+ a) backtrace_object(): create backtrace object.
+ b) vm_backtrace_str_ary(): create bt as an array of string.
+ c) vm_backtrace_print(): print backtrace to specified file.
+ d) rb_backtrace_print_as_bugreport(): print backtrace on
+ bugreport style.
+ (2) remove rb_backtrace_each(). Use backtrace_each() instead.
+ (3) change the type of lev parameter to size_t.
+ a) lev == 0 means current frame (exception, etc use it).
+ b) lev == 1 means upper frame (caller(0) use it).
- * eval.c (specific_eval): can be called without SecurityError, if
- $SAFE >= 4.
+ * vm_core.h, vm_dump.c, vm_eval.c: ditto.
- * object.c (sym_inspect): inspect gives ":sym", to_s gives "sym".
+ * vm.c (backtrace_object(), vm_backtrace_str_ary()): fix to return a
+ correct size of caller(lev) array.
+ Let n be a "caller(0).size" then ln as caller(lev).size should be
+ (n - lev). However, the previous implementation returns a wrong
+ size array (ln > n - lev). [ruby-dev:45673]
-Fri Mar 31 22:07:04 2000 Minero Aoki <aamine@dp.u-netsurf.ne.jp>
+ * test/ruby/test_backtrace.rb: add tests for backtrace.
- * lib/net/protocol.rb, smtp.rb, pop.rb, http.rb: 1.1.12.
+Fri May 25 08:51:39 2012 Eric Hodel <drbrain@segment7.net>
- * lib/net/protocol.rb: update Net::Protocol::Proxy#connect
+ * enum.c (enum_count): Enumerable#count no longer uses #size when
+ counting elements. Patch by Nobuhiro IMAI. [ruby-trunk - Bug #6473]
- * lib/net/protocol.rb: ReplyCode is not a class
+Fri May 25 01:15:39 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * lib/net/http.rb: header value format was change:
- values do not include header name
+ * sprintf.c (ruby__sfvextra): [EXPERIMENTAL] use inspect instead of
+ to_s if plus flag is given.
- * lib/net/http.rb: header is not a Hash, but HTTPResponse
+ * vsnprintf.c (BSD_vfprintf): pass sign flag.
-Thu Mar 30 12:19:44 2000 Katsuyuki Komatsu <komatsu@sarion.co.jp>
+Fri May 25 00:37:22 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * enum.c (enum_find): rb_eval_cmd() should be called with array.
+ * test/rubygems/test_gem_indexer.rb (setup, teardown): save @tempdir
+ to remove it properly. [Bug #5348]
-Tue Mar 28 13:57:05 2000 Clemens Hintze <c.hintze@gmx.net>
+Thu May 24 23:36:51 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * ext/dbm/dbm.c (fdbm_invert): should return new hash.
+ * vsnprintf.c (BSD_vfprintf): [EXPERIMENTAL] object representation in
+ rb_enc_vsprintf(). [Feature #5896]
- * ext/gdbm/gdbm.c (fgdbm_invert): ditto.
+Thu May 24 15:33:01 2012 Koichi Sasada <ko1@atdot.net>
-Tue Mar 28 00:58:03 2000 Minero Aoki <aamine@dp.u-netsurf.ne.jp>
+ * vm_method.c (rb_method_defined_by): removed.
+ nobu pointed out that rb_method_basic_definition_p() is enough
+ for last commit.
- * lib/net/protocol.rb, smtp.rb, pop.rb, http.rb: 1.1.11.
+ * error.c, eval_error.c: change for above.
- * lib/net/protocol.rb, smtp.rb, pop.rb, http.rb: does not
- dispatch any commands while dispatching command.
+Thu May 24 14:30:13 2012 Koichi Sasada <ko1@atdot.net>
- * lib/net/protocol.rb: failed to get error class of
- inherited ReplyCode
+ * vm.c: add RubyVM::Backtrace object (btobj).
+ Backtrace information contains an array consists of location
+ information for each frames by string.
+ RubyVM::Backtrace object is lightweight backtrace information,
+ which contains complete information to generate traditional style
+ backtrace (an array of strings) with faster generation.
+ If someone accesses to backtrace information via
+ Exception#backtrace, then convert a RubyVM::Backtrace object to
+ traditional style backtrace.
+ This change causes incompatibility on marshal dumped binary
+ of Exception. If you have any trouble on it, please tell us
+ before Ruby 2.0 release.
+ Note that RubyVM::Backtrace object should not expose Ruby level.
- * lib/net/http.rb: change feature of "get2", "post2"
+ * error.c, eval.c, vm_eval.c: ditto.
-Mon Mar 27 01:34:58 2000 Minero Aoki <aamine@dp.u-netsurf.ne.jp>
+ * internal.h: ditto.
- * lib/net/protocol.rb, smtp.rb, pop.rb, http.rb: 1.1.10.
+ * eval_error.c: fix to skip "set_backtrace" method invocation in
+ creating an exception object if it call a normal set_backtrace
+ method (defined by core).
- * lib/net/http.rb: return value of 'head' was wrong.
+ * test/ruby/test_settracefunc.rb: fix for above change.
-Sun Mar 26 17:47:35 2000 Minero Aoki <aamine@dp.u-netsurf.ne.jp>
+ * vm_method.c (rb_method_defined_by): added. This function
+ checks that the given object responds with the given method
+ by the given cfunc.
- * lib/net/protocol.rb, smtp.rb, pop.rb, http.rb: 1.1.9.
+ * benchmark/bm_vm2_raise1.rb, benchmark/bm_vm2_raise2.rb:
+ add to measure exception creation speed. raise1 create
+ exception objects from shallow stack frame. raise2 create
+ exception objects from deep stack frame.
- * lib/net/smtp.rb: SMTP#do_ready wrongly took no arguments
+Thu May 24 12:07:46 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Sat Mar 25 23:21:10 2000 Yukihiro Matsumoto <matz@netlab.co.jp>
+ * io.c (io_strip_bom): check EOF. [Bug #6487][ruby-core:45203]
- * marshal.c (w_object): symbols should be converted to ID before
- dumping out.
+Wed May 23 22:06:14 2012 NARUSE, Yui <naruse@ruby-lang.org>
-Fri Mar 24 18:26:51 2000 Yukihiro Matsumoto <matz@netlab.co.jp>
+ * lib/net/http/header.rb (Net::HTTPHeader#range): fix broken parser of
+ HTTP Range request. Old one can't parse invalid specs and multiple
+ specs correctly.
- * file.c (test_check): should have checked exact number of arguments.
+Wed May 23 10:18:54 2012 NAKAMURA Usaku <usa@ruby-lang.org>
-Fri Mar 24 21:02:11 2000 Koji Arai <JCA02266@nifty.ne.jp>
+ * win32/win32.c (finish_overlapped_socket, overlapped_socket_io):
+ replace ECONNABORTED to EPIPE in send, sendto and sendmsg to improve
+ BSD socket compatibility. this change removes a failure on the test
+ of net/ftp.
- * signal.c (trap): should treat some symbols as the signal.
+Wed May 23 05:35:58 2012 Eric Hodel <drbrain@segment7.net>
-Fri Mar 24 06:58:03 2000 Minero Aoki <aamine@dp.u-netsurf.ne.jp>
+ * lib/net/http.rb: Broke up Net::HTTP into individual files.
+ [ruby-trunk - Feature #6435]
+ * lib/net/http/backward.rb: ditto.
+ * lib/net/http/response.rb: ditto.
+ * lib/net/http/exceptions.rb: ditto.
+ * lib/net/http/responses.rb: ditto.
+ * lib/net/http/generic_request.rb: ditto.
+ * lib/net/http/header.rb: ditto.
+ * lib/net/http/request.rb: ditto.
+ * lib/net/http/proxy_delta.rb: ditto.
+ * lib/net/http/requests.rb: ditto.
- * lib/net/protocol.rb, smtp.rb, pop.rb, http.rb: 1.1.8.
+Wed May 23 05:15:11 2012 Eric Hodel <drbrain@segment7.net>
- * lib/net/http.rb: post, get2, post2, get_body
+ * class.c (rb_mod_init_copy): Clear the cached inspect string of a
+ dup'd anonymous module or class. [ruby-trunk - Bug #6454]
+ * test/ruby/test_module.rb (class TestModule): ditto
- * lib/net/protocol.rb, smtp.rb, pop.rb, http.rb: separate
- Command/Socket documentation.
+Tue May 22 16:49:15 2012 Koichi Sasada <ko1@atdot.net>
-Thu Mar 23 02:26:14 2000 Yukihiro Matsumoto <matz@netlab.co.jp>
+ * vm_core.h: add a data type rb_location_t to store iseq location
+ information.
+ rb_location_t#filename, filepath, name and line_no was moved from
+ rb_iseq_t. rb_location_t#basename is a new field which is
+ similar to `name' field without any decoration.
+ `name' field contains some decoration such as `block in foo'.
+ `basename' only contains `foo'.
+ rb_iseq_t contains memory object of rb_location_t.
- * io.c (rb_io_fptr_finalize): fptr may be null.
+ * iseq.c: setup rb_location_t for each rb_iseq_t memory objects.
- * io.c (rb_io_s_new): now calls `initialize'.
+ * compile.c, proc.c, vm.c, vm_dump.c, vm_eval.c, vm_insnhelper.c,
+ vm_method.c: support about it.
- * io.c (rb_io_initialize): actual open done in this method.
+Tue May 22 00:45:05 2012 Yusuke Endoh <mame@tsg.ne.jp>
- * io.c (rb_file_initialize): ditto.
+ * struct.c (rb_struct_members): Refactoring. As Struct#members had
+ returned an array of String, the old code was needed to convert
+ Symbols to Strings. But it is almost unnecessary because the
+ method now returns an array of Symbols. A patch by Masaki
+ Matsushita <glass.saga at gmail dot com> [Feature #6218]
+ [ruby-dev:45451]
- * eval.c (rb_eval): class variables in singleton class definition
- is now handled properly (I hope).
+Mon May 21 19:20:25 2012 NARUSE, Yui <naruse@ruby-lang.org>
-Wed Mar 22 21:49:36 2000 Minero Aoki <aamine@dp.u-netsurf.ne.jp>
+ * lib/net/ftp.rb (Net::FTP#retrbinary): close only if conn is not nil
+ because transfercmd may fail and return nil.
- * st.c (st_delete_safe): skip already deleted entry.
+ * lib/net/ftp.rb (Net::FTP#retrlines): ditto.
- * hash.c (rb_hash_delete): modify brace miss.
+Mon May 21 15:10:28 2012 Akinori MUSHA <knu@iDaemons.org>
-Wed Mar 22 08:53:58 2000 Yukihiro Matsumoto <matz@netlab.co.jp>
+ * ext/syslog/syslog.c: Classify constants and macros into several
+ sub-modules. (Syslog::Priority, Syslog::Level, Syslog::Option
+ and Syslog::Macros)
- * eval.c (exec_under): do not push cbase if ruby_cbase == under.
+ * ext/syslog/syslog.c (mSyslog_inspect): Use rb_sprintf().
- * node.h (NEW_CREF0): preserve cbase nesting.
+ * ext/syslog/syslog.c (mSyslog_inspect): Make sure self is a
+ module before calling rb_class2name().
-Tue Mar 21 12:57:50 2000 Yukihiro Matsumoto <matz@netlab.co.jp>
+Mon May 21 12:44:11 2012 URABE Shyouhei <shyouhei@ruby-lang.org>
- * object.c (rb_class_s_new): Class::new should call `inherited'.
+ * .travis.yml (install): It seems tcl/tk is skipped in Travis
+ CI. Trying to fix the situation.
-Sat Mar 18 12:36:09 2000 Nobuyoshi Nakada <nobu.nokada@softhome.net>
+Mon May 21 12:11:25 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * eval.c (rb_backtrace, make_backtrace): removed unused variable
- `lev'.
+ * enc/depend (ENCOBJS): add dependencies.
- * eval.c (rb_attr): calls `method_added' at attribute definition.
+ * enc/make_encmake.rb (target_encodings): extract dependencies.
- * eval.c (rb_mod_modfunc): calls `singleton_method_added' while
- `module_function'.
+Mon May 21 11:26:17 2012 NARUSE, Yui <naruse@ruby-lang.org>
- * eval.c (rb_eval): parameter to `method_added' and
- `singleton_method_added' is Symbol.
+ * lib/net/ftp.rb (Net::FTP#transfercmd): rescue shutdown.
- * eval.c (Init_eval): caches IDs for `method_added' and
- `singleton_method_added'.
+Sun May 20 23:00:11 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Sat Mar 18 11:25:10 2000 Yukihiro Matsumoto <matz@netlab.co.jp>
+ * ext/extmk.rb (extmake): reopen $stdout to NULL, since setting
+ $stdout cannot affect child processes.
- * parse.y (rescue): allows `rescue Error in foo'. experimental.
- which is better this or preparing alias `exception' for `$!'?
+Sun May 20 21:36:39 2012 NARUSE, Yui <naruse@ruby-lang.org>
-Fri Mar 17 15:02:45 2000 Yukihiro Matsumoto <matz@netlab.co.jp>
+ * enc/shift_jis.c (code_to_mbclen): return
+ ONIGERR_INVALID_CODE_POINT_VALUE if the code is invalid.
- * variable.c (rb_autoload_id): defining new autoload should be
- prohibited for $SAFE > 4.
+ * string.c (tr_next): increment character until the code
+ is a valid character. [ruby-dev:45652] [Bug #6450]
- * variable.c (rb_autoload_load): autoload should be possible for
- $SAFE > 4.
+Sun May 20 12:25:10 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * eval.c (call_trace_func): should handle T_ICLASS properly.
+ * Makefile.in (LIBRUBY_SO): link EXTSOLIBS too.
-Fri Mar 17 14:34:30 2000 Yukihiro Matsumoto <matz@netlab.co.jp>
+ * ext/extmk.rb (mf.macro): use EXTSOLIBS instead of SOLIBS to get rid
+ of discard libraries needed by default. [Bug #6462]
- * string.c (str_gsub): forgot to initialize str->orig.
+Sat May 19 19:04:38 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Fri Mar 17 01:24:59 2000 Dave Thomas <Dave@thomases.com>
+ * ext/extmk.rb (command_output): ENCOBJS is needed for all linked
+ ruby, if --disable-shared and --with-static-linked-ext.
- * string.c (rb_str_clone): forgot to copy str->orig if STR_NO_ORIG
- is set by Array#pack.
+ * ext/extmk.rb (command_output): dmyext is needed as DLDOBJS if no
+ static linked extensions.
-Wed Mar 15 21:25:04 2000 Minero Aoki <aamine@dp.u-netsurf.ne.jp>
+ * Makefile.in, common.mk (PROGRAM): no extension libraries.
- * array.c (rb_ary_join): 'result' is always duplicated
- before concat string.
+ * common.mk (build-ext): pass macros for libruby.so.
-Wed Mar 15 17:26:05 2000 Yukihiro Matsumoto <matz@netlab.co.jp>
+ * ext/extmk.rb (command_output): link extension libraries and encoding
+ libraries into libruby.so, not ruby executable.
- * hash.c (rb_hash_s_create): unexpected recursive call removed.
- this bug was found by Satoshi Nojo <nojo@t-samukawa.or.jp>.
+ * ext/extmk.rb (command_output): fold long macro lines.
-Wed Mar 15 13:12:39 2000 Yukihiro Matsumoto <matz@netlab.co.jp>
+ * Makefile.in (LIBEXT): add macro.
- * eval.c (Init_Thread): Thread.join removed finally.
+ * configure.in (ENCOBJS, EXTOBJS): use LIBEXT, not hardcoded suffix.
- * string.c (rb_str_chomp_bang): forgot to call rb_str_modify().
+ * Makefile.in (LIBRUBY_A): fix typo. re-applying r35242.
-Mon Mar 13 16:12:13 2000 Yukihiro Matsumoto <matz@netlab.co.jp>
+Sat May 19 04:46:53 2012 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
- * eval.c (block_pass): distinguish real orphan block and still
- on-stack block passed by block argument.
+ * ext/openssl/extconf.rb: Use Logging::message instead of message.
+ * ext/zlib/extconf.rb: ditto.
-Mon Mar 13 00:20:25 2000 Yukihiro Matsumoto <matz@netlab.co.jp>
+Fri May 18 18:13:44 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * parse.y (f_norm_arg): proper error message when constant comes
- in formal argument list. this message is suggested by Muvaw
- Pnazte <bugathlon@yahoo.com>.
+ * lib/mkmf.rb (MakeMakefile#configuration): keep space at end of
+ OUTFLAG and COUTFLAG. [ruby-dev:45650]
- * eval.c (rb_f_raise): proper error message when the first
- argument is not an exception class/object.
+Fri May 18 17:39:42 2012 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
- * string.c (rb_str_dup): dup now postpone buffer copy as long as
- possible. performance improved by lazy copying.
+ * thread_pthread.c (rb_thread_create_timer_thread): Added error
+ check when failing fcntl(). [Bug #6147] [ruby-dev:45364]
-Sun Mar 12 13:58:52 2000 Koji Arai <JCA02266@nifty.ne.jp>
+Fri May 18 17:41:00 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * signal.c (rb_f_kill): should treat some symbols as the signal.
+ * ext/extmk.rb (extmake): link archives only, skip script only
+ extension libraries.
-Sat Mar 11 22:03:03 2000 Yukihiro Matsumoto <matz@netlab.co.jp>
+Fri May 18 17:25:33 2012 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
- * string.c (rb_str_gsub): performance tune by avoiding buffer copy.
+ * cont.c: bump up fiber machine stack size when running on 64bit
+ arch. [Bug #6344] [ruby-dev:45554]
- * eval.c (rb_f_missing): check if argv[0] is ID.
+Fri May 18 15:20:56 2012 NARUSE, Yui <naruse@ruby-lang.org>
-Sat Mar 11 15:49:41 2000 Tadayoshi Funaba <tadf@kt.rim.or.jp>
+ * lib/uri/generic.rb (URI::Generic.build): duplicate args before adding
+ new items. (don't change arguments)
- * struct.c (rb_struct_aref): struct aref by symbol.
+ * lib/uri/generic.rb (URI::Generic.build): use URI::Generic::COMPONENT
+ if this method is called from URI::Generic.
-Sat Mar 11 05:07:11 2000 Yukihiro Matsumoto <matz@netlab.co.jp>
+ * lib/uri/generic.rb (URI::Generic.build2): escape only if the item is
+ a String.
- * process.c (proc_setpriority): should return 0, not nil.
+ * lib/uri/generic.rb (URI::Generic.build2): use DEFAULT_PARSER because
+ it doesn't have parser method. [Bug #6420]
- * process.c (proc_setpgid): ditto.
+Fri May 18 15:54:07 2012 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
-Fri Mar 10 18:14:54 2000 Yukihiro Matsumoto <matz@netlab.co.jp>
+ * ext/zlib/extconf.rb: Use an exception instead of bare puts.
- * file.c (path_check_1): confusing buf and path. this bug found
- by <decoux@moulon.inra.fr>.
+Fri May 18 15:53:05 2012 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
-Fri Mar 10 09:37:49 2000 Katsuyuki Komatsu <komatsu@sarion.co.jp>
+ * ext/psych/extconf.rb: Use an exception instead of bare abort.
- * MANIFEST: add beos/GNUmakefile.in.
- * configure.in: support BeOS R4.5.2 (Intel).
- * beos/GNUmakefile.in: new file to support BeOS R4.5.2 (Intel).
+Fri May 18 15:51:32 2012 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
-Thu Mar 9 11:13:32 2000 Yukihiro Matsumoto <matz@netlab.co.jp>
+ * ext/fiddle/extconf.rb: Use an exception instead of bare abort.
- * regex.c (re_compile_fastmap): fixed embarrassing brace bug.
+Fri May 18 15:49:35 2012 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
-Thu Mar 9 01:36:32 2000 WATANABE Hirofumi <eban@os.rim.or.jp>
+ * ext/readline/extconf.rb: Use an exception instead of bare exit.
- * missing/flock.c: emulate missing flock() with fcntl().
+Fri May 18 15:38:11 2012 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
-Thu Mar 9 00:29:35 2000 Yukihiro Matsumoto <matz@netlab.co.jp>
+ * ext/ripper/extconf.rb: Use an exception instead of bare
+ Logging.message.
- * object.c (sym_to_s): returns ":sym".
+Fri May 18 15:23:06 2012 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
- * object.c (sym_id2name): separated from to_s; returns "sym".
+ * ext/openssl/extconf.rb: Clarify a message when hit Apple
+ OpenSSL issue.
-Wed Mar 8 19:16:19 2000 Minero Aoki <aamine@dp.u-netsurf.ne.jp>
+Fri May 18 15:14:32 2012 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
- * lib/net/protocol.rb, smtp.rb, pop.rb, http.rb: 1.1.7.
+ * ext/extmk.rb: Show a message when extconf.rb raised an exception.
+ * ext/openssl/extconf.rb: Use exception raising instead of message
+ and/or abort. We want to display error message to console _and_
+ logging into mkmf.log.
- * lib/net/http.rb (connecting): returns header
+Fri May 18 06:14:07 2012 Eric Hodel <drbrain@segment7.net>
-Wed Mar 8 02:08:43 2000 Yukihiro Matsumoto <matz@netlab.co.jp>
+ * ext/syslog/lib/syslog/logger.rb: Added Syslog::Logger which was
+ ported from the SyslogLogger gem. [ruby-trunk - Feature #5096]
+ * NEWS: ditto.
+ * test/syslog/test_syslog_logger.rb: ditto.
- * parse.y: escape expansion too early.
+Fri May 18 01:28:21 2012 Aaron Patterson <aaron@tenderlovemaking.com>
- * string.c (rb_f_scan): Kernel#scan added.
+ * ext/psych/parser.c (transcode_string): fix encoding index names.
+ Thanks markizko for reporting.
- * regex.c (re_compile_pattern): support \cX et al.
+Thu May 17 23:03:58 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Tue Mar 7 01:44:27 2000 Yukihiro Matsumoto <matz@netlab.co.jp>
+ * configure.in: fix function name to be checked, to initialize
+ rb_thread_cond_t properly.
- * io.c (set_stdin): simplified procedure, allows $stdin = DATA;
- experimental.
+ * thread_pthread.c (native_cond_initialize, native_cond_destroy):
+ fix macro name.
- * io.c (set_outfile): ditto.
+Thu May 17 12:53:07 2012 Yuki Yugui Sonoda <yugui@google.com>
- * re.c (Init_Regexp): new method Regexp#last_match added; it's an
- alternative for $~.
+ * thread.c, thread_pthread.c: Moved pthread-specific preprocessor
+ hacks to thread_pthread.c
- * configure.in (DEFAULT_KCODE): KCODE_NONE should be the default.
+Thu May 17 12:18:47 2012 Yuki Yugui Sonoda <yugui@google.com>
- * dir.c (dir_s_rmdir): should return 0 on success.
+ * io.c: Fix a mistake on merging the patch in the previous commit.
- * signal.c: remove CWGUSI support.
+Thu May 17 11:33:07 2012 Yuki Yugui Sonoda <yugui@google.com>
-Mon Mar 6 12:28:37 2000 Yukihiro Matsumoto <matz@netlab.co.jp>
+ Imports Ruby's port to NativeClient (a.k.a NaCl).
+ Patch by Google Inc. [ruby-core:45073].
- * marshal.c (w_symbol): support symbol object.
+ * configure.in (RUBY_NACL): New M4 func to configure variables for
+ NaCl.
+ (RUBY_NACL_CHECK_PEPPER_TYPES): New M4 func to check the old names
+ of Pepper interface types.
+ (BTESTRUBY): New variable to specify which ruby should be run on
+ "make btest". NaCl can run the built binary by sel_ldr, but it need
+ rbconfig.rb. So this variable is distinguished from $MINIRUBY.
- * util.c: make symbol as separated class.
+ * thread_pthread.c: Disabled some features on NaCl.
- * error.c (Init_Exception): new exception RangeError.
+ * io.c: ditto.
- * ext/socket/socket.c (ip_addrsetup): should check length of hostname.
+ * process.c: ditto.
- * ext/socket/socket.c (ip_addrsetup): check newline at the end of
- hostname. These fixes suggested by Muvaw Pnazte <bugathlon@yahoo.com>.
+ * signal.c: ditto.
-Sun Mar 5 20:35:45 2000 WATANABE Hirofumi <eban@os.rim.or.jp>
+ * file.c: ditto.
- * ext/Win32API/Win32API.c (Win32API_initialize): should call
- LoadLibrary() everytime and should assign the hdll to Win32API
- object(protect the hdll from GC).
+ * missing/flock.c: ditto.
-Sun Mar 5 18:49:06 2000 Nakada.Nobuyoshi <nobu.nokada@softhome.net>
+ * nacl/pepper_main.c: An example implementation of Pepper application
+ that embeds Ruby.
- * misc/ruby-mode.el (ruby-parse-region): not treat method `begin'
- and `end' as reserved words.
+ * nacl/example.html: An example of web page that uses the Pepper
+ application.
- * misc/ruby-mode.el (ruby-font-lock-docs): ignore after `=begin'
- and `=end'.
+ * nacl/nacl-config.rb: Detects variants of NaCl SDK.
- * misc/ruby-mode.el (ruby-font-lock-keywords, hilit-set-mode-patterns):
- added `yield' to keywords.
+ * nacl/GNUmakefile.in: Makefile template for NaCl specific build
+ process.
- * misc/ruby-mode.el (ruby-font-lock-keywords, hilit-set-mode-patterns):
- matches keywords at end of buffer.
+ * nacl/package.rb: script for packaging a NaCl-Ruby embedding
+ application.
-Sun Mar 5 18:08:53 2000 Minero Aoki <aamine@dp.u-netsurf.ne.jp>
+ * nacl/reate_nmf.rb: Wrapper script of create_nmf.py
- * lib/net/protocol.rb, smtp.rb, pop.rb, http.rb: 1.1.6.
+ * dln.c (dln_load): Added a hack to call on NaCl.
- * lib/net/http.rb: allow to omit 'start'
+ * util.c (ruby_getcwd): Path to the current directory is not available
+ on NaCl.
-Tue Feb 29 01:08:26 2000 Yukihiro Matsumoto <matz@netlab.co.jp>
+Thu May 17 10:54:58 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * range.c (range_initialize): initialization done in `initialize';
- `initialize' should not be called more than once.
+ * ext/tk/extconf.rb: add -l options to $libs not $LDFLAGS,
+ to be passed to EXTLIBS in exts.mk.
- * object.c (Init_Object): default `initialize' should take zero
- argument.
+ * enc/encinit.c.erb: use %-lines to adjust indent in the generated file.
- * time.c (time_s_new): call `initialize' in Time::new.
+ * lib/mkmf.rb (MakeMakefile#have_framework): combine -framework option
+ and its argument with an equal sign not to be separated in merge_libs.
-Sat Feb 26 22:39:31 2000 EGUCHI Osamu <eguchi@shizuokanet.ne.jp>
+ * ext/tk/extconf.rb: ditto.
- * string.c (rb_str_times): fix String#* with huge string.
+ * ext/extmk.rb: EXTLDFLAGS also needs to be passed.
-Sat Feb 26 00:14:59 2000 Yukihiro Matsumoto <matz@netlab.co.jp>
+Wed May 16 15:44:22 2012 Yuki Yugui Sonoda <yugui@google.com>
- * dir.c (dir_s_new): call `initialize' in Dir::new.
+ * configure.in: Fix an unbalanced quote.
-Fri Feb 25 23:01:49 2000 Katsuyuki Komatsu <komatsu@sarion.co.jp>
+Wed May 16 15:43:10 2012 NAKAMURA Usaku <usa@ruby-lang.org>
- * ruby.h: export ruby_safe_level by EXTERN for mswin32.
- * win32/ruby.def: regular maintenance.
+ * ext/extmk.rb (exts.mk): use double quotes instead of single quotes
+ for commandline because it's not recognized as quotes on Windows.
-Fri Feb 25 22:12:46 2000 Yukihiro Matsumoto <matz@netlab.co.jp>
+Wed May 16 15:15:55 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * io.c (rb_io_reopen): IO#reopen should accept path as well.
+ * configure.in (LD): enclose with single quotes but not double quotes
+ not to expand command substitution.
- * string.c (rb_str_s_new): call `initialize' in String::new.
+Wed May 16 14:19:51 2012 Yuki Yugui Sonoda <yugui@google.com>
- * hash.c (rb_hash_s_new): call `initialize' in Hash::new.
+ Supports static linking of extensions and encodings again.
+ Fixes --with-static-linked-ext.
- * array.c (rb_ary_s_new): call `initialize' in Array::new.
+ Patch by Google Inc. [ruby-core:45073].
-Fri Feb 25 12:50:20 2000 Yukihiro Matsumoto <matz@netlab.co.jp>
+ * Makefile.in (ENCOBJS, EXTOBJS): New variables to specify static
+ linked libraries. Also reintroduces extinit.o, introduces encinit.o
+ introduces encinit.o
- * eval.c (rb_thread_start_timer): interval changed to 10ms from 50ms.
+ * common.mk: Builds static libraries rather than shared objects if
+ specified.
-Fri Feb 25 06:42:26 2000 GOTOU YUUZOU <gotoyuzo@notwork.org>
+ * configure.in (LD): new substitution.
- * ext/socket/socket.c (ip_addrsetup): hostp should remain NULL if
- host is nil.
+ * enc/depend: Supports static linked libraries
+ (libencs, libenc, libtrans): New target.
-Thu Feb 24 16:53:47 2000 Yukihiro Matsumoto <matz@netlab.co.jp>
+ * enc/encinit.c.erb: new template to generate the initialization of
+ statically linked encodings.
- * eval.c (rb_thread_schedule): priority check for sleep expired
- threads needed.
+ * enc/make_encmake.rb (--module): new flag to specify whether static
+ or dynamic.
-Wed Feb 23 14:22:32 2000 Yukihiro Matsumoto <matz@netlab.co.jp>
+ * transcode_data.h (TRANS_INIT): New macro to get rid of the name
+ collision of encoding initializers and transcoder initializers.
- * array.c (rb_ary_join): forgot to initialize a local variable
- `taint'.
+ * ext/extmk.rb: Fixes the behavior on $extstatic is true.
-Tue Feb 22 07:40:55 2000 Yukihiro Matsumoto <matz@netlab.co.jp>
+ * lib/mkmf.rb (clean-static): new target to clean up static linked
+ libraries.
- * re.c (Init_Regexp): renamed to MatchData, old name MatchingData
- remain as alias.
+ * ruby.c (process_options): New initializes statically linked
+ encodings here.
-Tue Feb 22 00:20:21 2000 Minero Aoki <aamine@dp.u-netsurf.ne.jp>
+Wed May 16 14:30:43 2012 NAKAMURA Usaku <usa@ruby-lang.org>
- * lib/net/protocol.rb, smtp.rb, pop.rb, http.rb: 1.1.5.
+ * io.c: fixed a merge mistake of r33878, reported by nobu via IRC.
- * lib/net/session.rb: rename to protocol.rb
+Wed May 16 06:59:41 2012 Tadayoshi Funaba <tadf@dotrb.org>
- * lib/net/protocol.rb: ProtocolSocket -> Net::Socket
+ * ext/date/date_strftime.c: should also be aware of flags on
+ complex specifier.
- * lib/net/protocol.rb: Net::Socket#write, write_pendstr
- can take block
+Wed May 16 05:11:29 2012 Aaron Patterson <aaron@tenderlovemaking.com>
- * lib/net/smtp.rb: new methods SMTP#ready SMTPCommand#write_mail
+ * ext/psych/lib/psych/visitors/to_ruby.rb: fix a bug with string
+ subclass dumping and loading.
- * lib/net/pop.rb: POPMail#pop can take block
+ * test/psych/test_array.rb: pertinent tests
-Sat Feb 19 23:58:51 2000 Yukihiro Matsumoto <matz@netlab.co.jp>
+ * test/psych/test_string.rb: ditto
- * regex.c (re_match): pop_loop should not pop at forward jump.
+Wed May 16 01:31:21 2012 Aaron Patterson <aaron@tenderlovemaking.com>
-Fri Feb 18 17:15:40 2000 Yukihiro Matsumoto <matz@netlab.co.jp>
+ * ext/psych/lib/psych/visitors/to_ruby.rb: convert omap tagged maps to
+ Psych::Omap objects rather than hashes. [Bug #6425]
- * eval.c (method_clone): method objects are now clonable.
+ * test/psych/test_omap.rb: pertinent test.
-Fri Feb 18 00:27:34 2000 Yukihiro Matsumoto <matz@netlab.co.jp>
+Wed May 16 01:15:45 2012 Aaron Patterson <aaron@tenderlovemaking.com>
- * variable.c (rb_shared_variable_declare): shared variable (aka
- class/module variable) introduced. prefix `@@'. experimental.
+ * ext/psych/lib/psych/visitors/yaml_tree.rb: keep a reference to
+ custom coders so that GC does not impact dumped yaml reference ids.
- * class.c (rb_scan_args): new format char '&'.
+Tue May 15 23:59:48 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Thu Feb 17 19:09:05 2000 Katsuyuki Komatsu <komatsu@sarion.co.jp>
+ * lib/test/unit.rb (Test::Unit::Options#setup_options): add --color option.
- * win32/win32.c (mypopen): don't close handle if it is not assigned.
- * win32/win32.c (my_open_osfhandle): support O_NOINHERIT flag.
- * win32/win32.c (win32_getcwd): rename getcwd to win32_getcwd
- in order to avoid using the C/C++ runtime DLL's getcwd.
- Use CharNext() to process directory name.
- * win32/win32.h: map getcwd to win32_getcwd.
+ * lib/test/unit.rb (Test::Unit::Runner#_prepare_run): defer color code
+ initialization to regard --color option.
-Wed Feb 16 00:32:49 2000 Yukihiro Matsumoto <matz@netlab.co.jp>
+Mon May 14 16:28:36 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * eval.c (method_arity): nd_rest is -1 for no rest argument.
+ * parse.y (f_arglist): should reset lexical states after empty
+ argument list with no parenthesis as well as parenthesized list,
+ so that reserved name method definition work. [ruby-dev:45626]
+ [Bug #6403]
- * process.c (proc_waitpid): returns nil when waitpid(2) returns 0.
+Mon May 14 00:14:24 2012 CHIKANAGA Tomoyuki <nagachika@ruby-lang.org>
-Tue Feb 15 01:47:00 2000 Yukihiro Matsumoto <matz@netlab.co.jp>
+ * enumerator.c (lazy_take_func, lazy_take): multiple calls of
+ force/to_a method to Enumerator::Lazy#take should return same
+ results. [ruby-dev:45634] [Bug #6428]
- * process.c (rb_f_waitpid): pid_t should be signed.
+ * test/ruby/test_lazy_enumerator.rb (test_take_recycle): add test for
+ above.
-Mon Feb 14 13:59:01 2000 Yukihiro Matsumoto <matz@netlab.co.jp>
+Sun May 13 23:38:31 2012 CHIKANAGA Tomoyuki <nagachika@ruby-lang.org>
- * parse.y (yylex): yylex yields wrong tokens for `:foo=~expr'.
+ * test/ruby/test_io.rb (test_flush_in_finalizer1): don't use IO.for_fd
+ to close IO objects. it create IO object with already closed fd, and
+ cause occasional Errno::EBADF in following tests. [ruby-core:45020]
+ [Bug #6228]
- * ruby.c (load_file): exit if reading file is empty.
+Sun May 13 23:32:16 2012 CHIKANAGA Tomoyuki <nagachika@ruby-lang.org>
-Mon Feb 14 03:34:52 2000 Yukihiro Matsumoto <matz@netlab.co.jp>
+ * test/ruby/test_io.rb (TestIO): revert r35631. it broke the intent of
+ test_flush_in_finalizer1. [ruby-core:43951] [Bug #6228]
- * parse.y (yylex): `foo.bar=1' should be <foo><.><bar><=><1>,
- not <foo><.><bar=><1>.
+Sun May 13 22:46:36 2012 Tanaka Akira <akr@fsij.org>
- * eval.c (rb_thread_restore_context): process according to
- RESTORE_* is moved after longjmp().
+ * ext/etc/etc.c (passwd_ensure): move endpwent() call from
+ passwd_iterate to close /etc/passwd on exception.
+ (group_ensure): move endgrent() call from group_iterate to close
+ /etc/group on exception.
- * eval.c (thread_switch): new function to process RESTORE_*.
+Sun May 13 18:10:43 2012 Tadayoshi Funaba <tadf@dotrb.org>
-Sun Feb 13 16:19:49 2000 WATANABE Hirofumi <eban@os.rim.or.jp>
+ * ext/date/date_strftime.c: removed unused code and changed the style.
- * ruby.c (require_libraries): don't access freed memory.
+Sun May 13 17:37:56 2012 Tadayoshi Funaba <tadf@dotrb.org>
- * ruby.c (add_modules): ditto.
+ * ext/date/date_strftime.c: refactored.
-Fri Feb 11 12:06:22 2000 Yukihiro Matsumoto <matz@netlab.co.jp>
+Sun May 13 06:40:12 2012 Luis Lavena <luislavena@gmail.com>
- * parse.y (parse_quotedwords): %w() need to split not only by mere
- spaces, but by all whitespaces.
+ * test/ruby/test_io.rb (class TestIO): Disable GC during IO tests to
+ avoid file descriptors being GC'ed. Suggestion by Tomoyuki Chikanaga
+ [ruby-core:43951][Bug #6228]
-Thu Feb 10 02:12:04 2000 Yukihiro Matsumoto <matz@netlab.co.jp>
+Sat May 12 07:00:16 2012 Eric Hodel <drbrain@segment7.net>
- * string.c (rb_str_index_m): did not support negative offset.
+ * ext/sdbm/init.c: Added documentation. Patch by Justin Collins,
+ cleanup by Zachary Scott. [ruby-trunk - #6410]
-Wed Feb 9 21:54:26 2000 Katsuyuki Komatsu <komatsu@sarion.co.jp>
+Sat May 12 06:02:03 2012 Eric Hodel <drbrain@segment7.net>
- * ext/socket/getaddrinfo.c: gcc --traditional support.
- Rearrange headers to work AC_C_CONST.
- * ext/socket/getnameinfo.c: ditto.
- * ext/socket/socket.c: mswin32: use double instead of long long.
+ * lib/fileutils.rb (cp_r): Fixed cp_r example. Patch by TJ Koblentz
+ from pull request #114. [ruby-trunk - Bug #6411]
-Wed Feb 9 16:30:41 2000 Yukihiro Matsumoto <matz@netlab.co.jp>
+Sat May 12 05:23:06 2012 NARUSE, Yui <naruse@ruby-lang.org>
- * numeric.c (num_coerce): should return [y, x].
+ * thread.c (rb_threadptr_execute_interrupts_common):
+ test_signal_requiring of test/ruby/test_signal.rb fail if the sub
+ process is killed on waiting IO in lex_io_gets in rb_load_file in
+ rb_load_internal in require.
+ This is because
+ (1) the process receive the killing signal in
+ rb_thread_io_blocking_region in rb_read_internal in lex_io_gets.
+ (2) set th->errinfo as INT2FIX(TAG_FATAL) at
+ rb_threadptr_execute_interrupts_common.
+ (3) escape rb_load_file in rb_load_internal and jump to EXEC_TAG()
+ without set loaded as TRUE.
+ (4) call first rb_exc_raise(GET_THREAD()->errinfo); because loaded
+ is FALSE as above. this errinfo should be an exception object
+ but this is INT2FIX(TAG_FATAL).
+ Don't call first rb_exc_raise if GET_THREAD()->errinfo is Fixnum.
-Wed Feb 9 11:07:30 2000 Yukihiro Matsumoto <matz@netlab.co.jp>
+Fri May 11 14:23:11 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * ruby.c (ruby_prog_init): loadpath structure changed.
+ * parse.y (primary): begin/end block should be isolated from outside.
+ [ruby-dev:45631][Bug #6419]
-Tue Feb 8 02:07:33 2000 Yukihiro Matsumoto <matz@netlab.co.jp>
+Fri May 11 14:09:47 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * regex.c (re_search): optimize for \G at top.
+ * ext/bigdecimal/bigdecimal.c (PUSH): to prevent VALUE from GC,
+ must not cast it to unsigned long, which may be shorter than
+ VALUE, and the result can be mere garbage.
- * regex.c (re_compile_pattern): \G introduced.
+Fri May 11 09:51:07 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * regex.c (re_match): ditto.
+ * lib/test/unit.rb (Test::Unit::Runner#failed): no unnecessary
+ newlines if no reports to be displayed.
- * string.c (str_sub_bang): old behavior restored: bang method
- returns nil if string not changed.
+Thu May 10 10:55:35 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * regex.c (re_compile_pattern): support independent subexpression
- `(?>pattern)'.
+ * test/minitest/test_minitest_mock.rb: Correct requiring path to
+ metametameta.rb.
- * regex.c (re_match): ditto.
+ * test/minitest/test_minitest_unit.rb: Correct requiring path to
+ metametameta.rb.
-Mon Feb 7 15:51:08 2000 Yukihiro Matsumoto <matz@netlab.co.jp>
+Thu May 10 10:18:10 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * regex.c (re_match): now understands interrupts under Ruby.
+ * parse.y (lex_state_name): returns name for lex_state_e, for debug
+ use.
-Mon Feb 7 07:51:52 2000 Yukihiro Matsumoto <matz@netlab.co.jp>
+Wed May 9 16:36:01 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * array.c (rb_ary_uniq_bang): always return an Array.
+ * lib/mkmf.rb (MakeMakefile#pkg_config): check if libs resulted from
+ pkg-config works actually.
- * array.c (rb_ary_compact_bang): ditto.
+Wed May 9 16:01:38 2012 Shugo Maeda <shugo@ruby-lang.org>
- * array.c (rb_ary_flatten_bang): ditto.
+ * lib/net/imap.rb (decode_utf7, encode_utf7): refactored by
+ Nobuyoshi Nakada, to use String#encode.
- * hash.c (rb_hash_reject): returns a Hash, not an Array.
+Wed May 9 13:26:25 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * hash.c (env_reject): ditto.
+ * test/rubygems/test_gem_remote_fetcher.rb: skip OpenSSL dependent
+ tests if not available.
-Fri Feb 4 10:20:25 2000 Yukihiro Matsumoto <matz@netlab.co.jp>
+Wed May 9 08:09:38 2012 Ryan Davis <ryand-ruby@zenspider.com>
- * string.c (scan_once): scan now leaves information about the last
- successful pattern match in $&.
+ * lib/minitest/*: Imported minitest 3.0.0 (r7435)
+ * test/minitest/*: ditto
+ * test/rubygems/*: Imported fixes for buggy use of assert_match
+ and deprecated assert_block
+ UNBUNCH YOUR PANTIES. THE TESTS DO NOT RUN CLEAN ON OSX.
- * io.c (rb_io_close): should not check closed IO.
+Wed May 9 06:28:59 2012 Eric Hodel <drbrain@segment7.net>
-Fri Feb 4 05:44:01 2000 Kentaro Inagaki <inagaki@tg.rim.or.jp>
+ * re.c (rb_reg_equal): Removed incorrect example for Regexp#== with
+ "n" option. [ruby-talk - Bug #6415]
- * ext/socket/socket.c (s_recv): TRAP_BEG after retry entry.
+Wed May 9 06:23:33 2012 Tadayoshi Funaba <tadf@dotrb.org>
-Wed Feb 2 22:33:45 2000 Nobuyoshi Nakada <nobu.nakada@nifty.ne.jp>
+ * ext/date/date_core.c: reverted.
- * eval.c (rb_thread_start): receives argument from outside, like
- `Thread::start(1,2,3){|a,b,c| ... }'.
+Wed May 9 04:31:26 2012 Masatoshi SEKI <m_seki@mva.biglobe.ne.jp>
-Wed Feb 2 22:14:40 2000 Yukihiro Matsumoto <matz@netlab.co.jp>
+ * lib/rinda/ring.rb (lookup_ring_any): fix Rinda::RingFinger.primary
+ hungs forever. [ruby-talk:395364]
- * re.c (rb_reg_regsub): should check regs->num_regs.
+Tue May 8 21:09:00 2012 Hiroshi Shirosaki <h.shirosaki@gmail.com>
- * re.c (rb_reg_search): remove matchcache, use static struct
- re_register instead.
+ * include/ruby/win32.h (FD_SET): change function to macro.
+ To avoid buffer overflow when smaller FD_SETSIZE is used in ext
+ libraries.
- * re.c (match_getter): avoid cloning match data.
+ * win32/win32.c (rb_w32_fdset): this function is not used anymore.
+ But we leave this for compatibility.
-Wed Feb 2 17:12:15 2000 Dave Thomas <Dave@Thomases.com>
+ * win32/win32.c (rb_w32_select_with_thread): fix SEGV when smaller
+ FD_SETSIZE is used in ext libraries. Dereference of fd_set pointer
+ causes SEGV.
- * samples/eval.rb: Rescue new ScriptError exception
+ * test/-ext-/win32/test_fd_setsize.rb(TestFdSetSize): add tests for
+ above.
+ * ext/-test-/win32/fd_setsize/depend: ditto.
+ * ext/-test-/win32/fd_setsize/extconf.rb: ditto.
+ * ext/-test-/win32/fd_setsize/fd_setsize.c: ditto.
-Wed Feb 2 02:06:07 2000 Yukihiro Matsumoto <matz@netlab.co.jp>
+ [ruby-core:44588] [Bug #6352]
- * string.c (str_gsub_bang): gsub! now leaves information about the
- last successful pattern match in $&.
+Tue May 8 20:44:46 2012 Hiroshi Shirosaki <h.shirosaki@gmail.com>
-Mon Jan 31 15:24:58 2000 Yukihiro Matsumoto <matz@netlab.co.jp>
+ * io.c (io_unread): fix IO#pos with mode 'r' bug on Windows.
+ If the end of reading buffer is CR, io_unread() needs to unread one
+ more byte.
+ [ruby-core:44874] [Bug #6401]
- * string.c (str_sub_bang): bang method returns string always.
- experimental.
+ * test/ruby/test_io_m17n.rb (TestIO_M17N#test_pos_with_buffer_end_cr):
+ add a test for above.
-Sun Jan 30 17:58:09 2000 WATANABE Hirofumi <eban@os.rim.or.jp>
+Tue May 8 13:38:17 2012 Ayumu AIZAWA <ayumu.aizawa@gmail.com>
- * eval.c: arrange to use setitimer(2) for BOW, DJGPP
+ * ext/date/date_core.c: improving introduction in Date/DateTime
+ documentation. patched by Daniel Kaufman via Github.
+ https://github.com/ruby/ruby/pull/110
- * defines.h: ditto. use random(3) on cygwin b20.1.
+Tue May 8 13:36:02 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Sun Jan 30 17:20:16 2000 WATANABE Hirofumi <eban@os.rim.or.jp>
+ * configure.in (POSTLINK): default to : command to get rid of flag
+ only command, since BSD make does not work with it.
- * eval.c: use getrlimit(2) on DJGPP.
+Tue May 8 13:35:10 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Thu Jan 27 01:27:10 2000 GOTO Kentaro <gotoken@math.sci.hokudai.ac.jp>
+ * lib/test/unit.rb (MiniTest#run_test): remove exact trace and get rid
+ of IndexError, which could caused by modified $@ sometimes.
- * dir.c (glob): glob pattern "/*" did not match.
+Tue May 8 11:21:27 2012 NAKAMURA Usaku <usa@ruby-lang.org>
-Wed Jan 26 22:30:47 2000 Shigeo Kobayashi <shigeo@tinyforest.gr.jp>
+ * test/minitest/metametameta.rb (MetaMetaMetaTestCase#assert_report):
+ support drive letter on Windows. yes, the original code is metameta.
- * numeric.c (flo_modulo): wrong result for negative modulo.
+Tue May 8 08:54:48 2012 Eric Hodel <drbrain@segment7.net>
-Wed Jan 26 02:01:57 2000 Yukihiro Matsumoto <matz@netlab.co.jp>
+ * lib/abbrev.rb: Fixed typo in abbrev pattern documentation. Based on
+ patch by Mark Rushakoff. [ruby-trunk - #6346]
- * file.c (test_c): should use S_ISCHR.
+Tue May 8 07:44:18 2012 NARUSE, Yui <naruse@ruby-lang.org>
- * file.c (rb_stat_c): ditto.
+ * ext/openssl/ossl_ssl.c (ossl_start_ssl): remove useless rb_sys_fail
+ before ossl_raise. this cause a test failure on Linux.
+ http://u64.rubyci.org/~chkbuild/ruby-trunk/log/20120507T190102Z.log.html.gz
- * string.c (rb_str_each_line): should propagate tainting.
+Tue May 8 05:35:18 2012 Eric Hodel <drbrain@segment7.net>
-Tue Jan 25 04:01:34 2000 Yukihiro Matsumoto <matz@netlab.co.jp>
+ * object.c (Init_Object): Added reference to variable.c where
+ public_constant and private_constant documentation lives. [#6381]
- * object.c (rb_obj_freeze): all objects made freezable.
+Tue May 8 04:47:44 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Tue Jan 25 00:37:01 2000 WATANABE Hirofumi <eban@os.rim.or.jp>
+ * lib/test/unit.rb (Test::Unit::Runner#output): prefer local output to
+ get rid of unexpected side effect in test/minitest/metametameta.rb.
- * configure.in: use AC_CHECK_TOOL for cross compiling.
+ * lib/test/unit.rb (MiniTest#run_test): show the running test in $0.
-Mon Jan 24 19:01:54 2000 Nobuyoshi Nakada <nobu.nakada@nifty.ne.jp>
+ * lib/test/unit.rb (Test::Unit::StatusLineOutput): new class to output
+ in status line.
- * array.c (rb_protect_inspect): should be checked by id of
- objects; not by object themselves.
+ * test/testunit/test_hideskip.rb (TestHideSkip#test_hideskip):
+ MiniTest#puke now reports Skipped messages only if verbose mode.
-Mon Jan 24 18:48:08 2000 Minero Aoki <aamine@dp.u-netsurf.ne.jp>
+ * test/testunit/test_sorting.rb (TestTestUnitSorting#test_sorting):
+ ditto.
- * eval.c (rb_eval): too many warnings; warned on every method
- overriding. should be on method discarding.
+ * lib/test/unit.rb (Test::Unit::Runner#puke): modify only result and
+ drop useless reports, not override entirely.
-Mon Jan 24 02:56:44 2000 Yukihiro Matsumoto <matz@netlab.co.jp>
+ * bootstraptest/runner.rb (exec_test, show_progress): show rotators
+ and pass/fail counts.
- * parse.y (yylex): -2.abs should be `(-2).abs' to accomplish the
- principle of less surprise. `+2' too.
+ * sample/test.rb (PROGRESS): refine output.
- * eval.c (rb_eval): when defining class is already there, and
- superclass differ, throw away the old class.
+Tue May 8 02:34:26 2012 NARUSE, Yui <naruse@ruby-lang.org>
- * variable.c (rb_const_set): gives warning again on constant
- redefinition.
+ * lib/minitest/unit.rb (assert_match): refix of r35563.
+ r35563 breaks the intention of the original change.
+ https://github.com/seattlerb/minitest/commit/68858105b2eb11c85105ffac5f32b662c59397f3
+ * lib/minitest/unit.rb (refute_match): ditto.
- * error.c (Init_Exception): SyntaxError, NameError, LoadError and
- NotImplementError are subclasses of ScriptError<Exception, not
- StandardError. experimental.
+Mon May 7 21:19:17 2012 NARUSE, Yui <naruse@ruby-lang.org>
-Sat Jan 22 00:00:41 2000 Yukihiro Matsumoto <matz@netlab.co.jp>
+ * ext/json: Merge JSON 1.7.1.
+ https://github.com/flori/json/commit/e5b9a9465c1159fae533bca320d950b772bcb4ac
- * parse.y (parse_quotedwords): no longer use `String#split'.
- and enable space escape within quoted word list.
- e.g. %w(a\ b\ c abc) => ["a b c", "abc"].
+Mon May 07 22:54:22 2012 Martin Bosslet <Martin.Bosslet@googlemail.com>
- * string.c (rb_str_slice_bang): new method `slice!'.
+ * ext/openssl/ossl_ssl.c: add support for option flags
+ OpenSSL::SSL::OP_NO_TLSv1_1
+ OpenSSL::SSL::OP_NO_TLSv1_2
+ to allow blocking specific TLS versions. Thanks to Justin Guyett for
+ pointing this out to me.
+ * test/openssl/test_ssl.rb: add tests to assert correct behavior when
+ blocking certain versions of TLS/SSL both on server and client side.
+ Also refactored tests to reduce boilerplate code a little.
+ * test/openssl/utils.rb: rescue Errno::ECONNRESET for tests where
+ client rejects the connection because a forbidden protocol version
+ was used.
-Fri Jan 21 21:56:08 2000 Minero Aoki <aamine@dp.u-netsurf.ne.jp>
+Mon May 7 20:14:15 2012 Tanaka Akira <akr@fsij.org>
- * lib/net/session.rb, smtp.rb, pop.rb, http.rb: 1.1.4.
+ * lib/securerandom.rb (random_bytes): call to_int method for the
+ argument at first.
- * lib/net/http.rb: can receive messages which have
- no Content-Length:.
+Mon May 7 17:54:12 2012 NARUSE, Yui <naruse@ruby-lang.org>
-Fri Jan 21 16:15:59 2000 Yukihiro Matsumoto <matz@netlab.co.jp>
+ * lib/minitest/unit.rb (assert_match): replace matcher only if both
+ matcher and obj are String. fix r35541. [Bug #6405]
+ DON'T COMMIT IF YOU CAN'T RUN TEST.
+ FIX AS SOON AS POSSIBLE YOU BREAK TESTS.
+ patched by ayumin.
+ https://github.com/seattlerb/minitest/pull/124
- * eval.c (thgroup_s_new): new class ThreadGroup.
+ * lib/minitest/unit.rb (refute_match): ditto.
-Tue Jan 18 12:24:28 2000 Yukihiro Matsumoto <matz@netlab.co.jp>
+Mon May 7 13:41:00 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * struct.c (Init_Struct): remove Struct's own hash and eql?.
+ * Makefile.in (PROGRAM), configure.in (POSTLINK): sign built program
+ using RUBY_CODESIGN identity.
-Sat Jan 15 22:21:08 2000 Nobuyoshi Nakada <nobu.nakada@nifty.ne.jp>
+Mon May 7 13:03:55 2012 Shugo Maeda <shugo@ruby-lang.org>
- * eval.c (search_method): argument klass may be 0.
+ * lib/net/imap.rb (body_type_attachment): parse body type
+ "ATTACHMENT". [ruby-core:44849] [Bug #6397]
-Sat Jan 15 15:03:46 2000 Yukihiro Matsumoto <matz@netlab.co.jp>
+Mon May 7 10:49:36 2012 NARUSE, Yui <naruse@ruby-lang.org>
- * enum.c (enum_index): remove this method.
+ * ext/bigdecimal/bigdecimal.c (Init_bigdecimal): define IDs before
+ they are used. [ruby-core:44900] [Bug #6406]
- * enum.c: remove use of pointers to local variables. find,
- find_all, min, max, index, member?, each_with_index,
+Mon May 7 10:27:56 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * eval.c (massign): multiple assignment does not use to_a anymore.
- experimental.
+ * ext/digest/rmd160/rmd160.c (RMD160_Update): fix for huge data.
-Fri Jan 14 12:22:04 2000 Yukihiro Matsumoto <matz@netlab.co.jp>
+Mon May 7 10:23:04 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * string.c (rb_str_replace): use memmove instead of memcpy for
- overwrapping strings (e.g. a[1] = a).
+ * test/fileutils/fileasserts.rb: use assert_equal, assert_match, and so on.
-Thu Jan 13 11:12:40 2000 Yukihiro Matsumoto <matz@netlab.co.jp>
+ * test/ruby/enc/test_utf16.rb, test/ruby/enc/test_utf32.rb,
+ test/ruby/test_io_m17n.rb (assert_str_equal): ditto.
- * parse.y (arg_add): use new node, ARGSPUSH.
+ * test/rubygems/test_gem_remote_fetcher.rb
+ (assert_data_from_{server,proxy}): ditto.
-Mon Jan 10 18:32:28 2000 Koji Arai <JCA02266@nifty.ne.jp>
+ * test/test_pstore.rb (test_thread_safe): ditto.
- * marshal.c (w_object): forgot an argument to call w_ivar().
+Mon May 7 10:16:30 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Sun Jan 9 18:13:51 2000 Katsuyuki Komatsu <komatsu@sarion.co.jp>
+ * test/rubygems/test_gem_installer.rb (TestGemInstaller#test_dir): fix
+ argument order. expected value must come first.
- * random.c: first was not defined unless HAVE_RANDOM.
+Mon May 07 09:14:11 2012 Martin Bosslet <Martin.Bosslet@googlemail.com>
-Sat Jan 8 19:02:49 2000 Yukihiro Matsumoto <matz@netlab.co.jp>
+ * ext/openssl/ossl_ssl.c: support TLSv1.1 & TLSv1.2. Add
+ SSLContext#version to inspect the version that was negotiated for
+ a given connection.
+ * ext/openssl/extconf.rb: detect TLS 1.1 & 1.2 support.
+ * test/openssl/test_ssl.rb: add tests for TLS 1.1 & 1.2 given they
+ are supported by the native OpenSSL being used.
- * io.c (rb_io_sysread): raise IOError for buffered IO.
+Sun May 6 21:34:29 2012 NARUSE, Yui <naruse@ruby-lang.org>
- * ext/socket/socket.c (s_recv): ditto.
+ * io.c (io_encoding_set): suppress warnings. [ruby-dev:45627]
+ this tmp1 is not required after r35538.
-Fri Jan 7 00:59:29 2000 Masahiro Tomita <tommy@tmtm.org>
+ * addr2line.c: suppress warnings.
- * io.c (io_fread): TRAP_BEG/TRAP_END added around getc().
+Sun May 6 18:39:39 2012 Koichi Sasada <ko1@atdot.net>
-Thu Jan 6 00:39:54 2000 Yukihiro Matsumoto <matz@netlab.co.jp>
+ * compile.c (iseq_compile_each): remove unused variable `size'.
- * random.c (rb_f_rand): should be initialized unless srand is
- called before.
+Sun May 6 14:50:03 2012 Tanaka Akira <akr@fsij.org>
-Wed Jan 5 16:59:34 2000 Minero Aoki <aamine@dp.u-netsurf.ne.jp>
+ * lib/securerandom.rb: show actual read length in an error message.
- * lib/net/session.rb, smtp.rb, pop.rb, http.rb: 1.1.3.
+Sat May 5 06:43:10 2012 Ryan Davis <ryand-ruby@zenspider.com>
- * lib/net/session.rb: Session -> Protocol, ...
+ * lib/minitest/*: Imported minitest 2.12.1 (r7323)
+ * test/minitest/*: ditto
- * lib/net/http.rb: HTTPCommand implementation was changed.
+Sat May 5 01:47:33 2012 NARUSE, Yui <naruse@ruby-lang.org>
-Wed Jan 5 02:14:46 2000 EGUCHI Osamu <eguchi@shizuokanet.ne.jp>
+ * test/zlib/test_zlib.rb (test_inflate): add a test for Zlib.inflate.
+ patched by headius (Charles Nutter). [ruby-core:44859] [Bug #6398]
- * parse.y: Fix SEGV on empty parens with UMINUS or UPLUS.
+ * test/zlib/test_zlib.rb (test_deflate): add a test for Zlib.deflate.
-Tue Jan 4 22:25:54 2000 Yukihiro Matsumoto <matz@netlab.co.jp>
+Sat May 5 00:53:55 2012 NARUSE, Yui <naruse@ruby-lang.org>
- * parse.y (stmt): `() while cond' dumped core.
+ * io.c (parse_mode_enc): remove warnings 'Ignoring internal encoding'.
+ [ruby-core:44455] [Bug #6324]
-Tue Jan 4 06:04:14 2000 WATANABE Hirofumi <eban@os.rim.or.jp>
+ * io.c (io_encoding_set): ditto.
- * configure.in: modify for cross-compiling.
- use target_* instead of host_*.
- use AC_CANONICAL_TARGET.
+Fri May 4 07:19:02 2012 NARUSE, Yui <naruse@ruby-lang.org>
- * Makefile.in: ditto.
+ * lib/rdoc/parser.rb (RDoc.binary?): fix wrong regexp.
+ [ruby-core:44798] [Bug #6393]
- * cygwin/GNUmakefile.in: ditto.
+Fri May 4 01:33:20 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Sat Jan 1 13:26:14 2000 Yukihiro Matsumoto <matz@netlab.co.jp>
+ * lib/rdoc/parser.rb (RDoc.alias_extension): a real file is irrelevant
+ to aliasing. [ruby-core:44796][Bug #6392]
- * eval.c (rb_yield_0): force_recycle ruby_dyna_vars to gain
- performance.
+ * lib/rdoc/parser.rb (RDoc.zip?): non-existent file will not be a zip
+ file.
- * array.c (rb_ary_delete_at_m): takes same argument pattern with
- rb_ary_aref.
+ * lib/rdoc/parser.rb (RDoc.can_parse_by_name): accept aliased
+ extension file names.
-Sat Jan 1 10:12:26 2000 Nobuyoshi Nakada <nobu.nokada@softhome.net>
+ * lib/rdoc/parser.rb (RDoc.binary?): binary read data may have
+ incomplete multibyte sequence. [ruby-core:44798][Bug #6393]
- * ruby.h,util.c (rb_special_const_p): peep hole optimization.
+Wed May 2 23:55:51 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * ruby.h,util.c (rb_test_false_or_nil): removed.
+ * lib/test/unit.rb (Test::Unit::RequireFiles#non_options): expand
+ real path to get rid of loading same files via symlinks.
- * ruby.h (RTEST, SPECIAL_CONST_P): peep hole optimization.
+Wed May 2 23:26:04 2012 CHIKANAGA Tomoyuki <nagachika00@gmail.com>
- * ruby.h (FL_ABLE, FL_SET, FL_UNSET, FL_REVERSE): made expressions
- not statements.
+ * cont.c (rb_fiber_m_transfer): improve sample code in Fiber#transfer
+ documentation. emphasize the difference between transfer and resume.
- * ruby.h (OBJ_INFECT): newly added macro which copies taint from
- `s' to `x'.
+Wed May 2 23:21:20 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Sat Jan 1 02:04:18 2000 Yukihiro Matsumoto <matz@netlab.co.jp>
+ * parse.y (parser_yylex): allow spaces between lambda arrow and
+ parenthesis. [ruby-dev:45605][Feature #6390]
- * eval.c (rb_thread_safe_level): new method.
+Wed May 2 19:06:30 2012 Ayumu AIZAWA <ayumu.aizawa@gmail.com>
- * eval.c (rb_yield_0): recycle dyna_var_map to reduce object
- allocation.
+ * cont.c (rb_fiber_m_transfer): Improved Fiber documentation.
+ patched by Anuj Dutta. [ruby-core:44540][Bug #6343]
-Fri Dec 31 00:52:48 1999 Yukihiro Matsumoto <matz@netlab.co.jp>
+Wed May 2 13:06:37 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * eval.c: thread independent trace_func not needed.
+ * README, README.ja: reformatted using rdoc markup. based on the
+ patches by zzak (Zachary Scott) in [Feature #6388].
-Thu Dec 30 14:47:31 1999 akira yamada <akira@ruby-lang.org>
+ * README, README.ja: updated the author's mail address.
- * configure.in: specifies -soname in LIBRUBY_DLDFLAGS on linux
- platforms.
+Wed May 2 09:46:09 2012 Kouji Takao <kouji@takao7.net>
+
+ * ext/readline/readline.c (Readline.special_prefixes=)
+ (Readline.special_prefixes): new function. An original patch was
+ created by nagachika. [Feature #5784]
+
+Tue May 1 22:18:45 2012 Kouji Takao <kouji@takao7.net>
+
+ * ext/readline/readline.c (Readline.pre_input_hook)
+ (Readline.insert_text, Readline.redisplay): new function. An
+ original patch was created by nagachika. [Feature #5785]
+
+Tue May 1 15:46:48 2012 Koichi Sasada <ko1@atdot.net>
+
+ * common.mk: "$(Q)-..." doesn't work on nmake.
+
+Tue May 1 15:32:10 2012 Koichi Sasada <ko1@atdot.net>
+
+ * common.mk: replace '@' prefix to '$(Q)' to control build
+ process outputs.
+
+Tue May 1 14:17:59 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * ext/openssl/deprecation.rb (OpenSSL.check_func): check if header is
+ available for macro compatibility.
+
+Tue May 1 10:53:54 2012 NAKAMURA Usaku <usa@ruby-lang.org>
+
+ * test/ruby/test_settracefunc.rb: ignore traces from another threads
+ because Kernel.set_trace_func affects other threads.
+
+Tue May 1 06:04:14 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * ext/digest/sha2/sha2.c (REVERSE32): explicitly cast since unsigned
+ long may be larger than sha2_word32.
+
+ * ext/digest/sha2/sha2.c (SHA{256,512,384}_{Final,End}): should clear
+ whole content, not pointer size.
+
+ * ext/digest/*/extconf.rb: use pkg_config to use same library with
+ openssl. [ruby-core:44755][Bug #6379]
+
+ * ext/openssl/deprecation.rb: extract check for broken Apple OpenSSL.
+
+Tue May 1 05:02:30 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * configure.in (optflags): disable unsafe optimizations.
+ [ruby-core:44679][Bug #6370]
+
+Mon Apr 30 23:36:49 2012 Tanaka Akira <akr@fsij.org>
+
+ * lib/fileutils.rb (copy_metadata): use File.lchown and File.lchmod to
+ update meta data of symlinks.
+
+Mon Apr 30 23:05:53 2012 CHIKANAGA Tomoyuki <nagachika00@gmail.com>
+
+ * test/ruby/test_continuation.rb (tracing_with_set_trace_func): don't
+ call Continuation from other threads. [ruby-dev:45596] [Bug #6382]
+
+Mon Apr 30 20:10:04 2012 Tanaka Akira <akr@fsij.org>
+
+ * ext/zlib/extconf.rb: detect z_crc_t type which will be defined
+ since zlib-1.2.7.
+
+ * ext/zlib/zlib.c (rb_zlib_crc_table): use z_crc_t if available.
+
+Mon Apr 30 09:02:15 2012 Ayumu AIZAWA <ayumu.aizawa@gmail.com>
+
+ * ext/openssl/lib/openssl/ssl.rb: add hostname to "hostname does not
+ match server cert." error. patched by Wes Morgan via Github.
+ https://github.com/ruby/ruby/pull/122
+
+Mon Apr 30 04:43:53 2012 Aaron Patterson <aaron@tenderlovemaking.com>
+
+ * ext/psych/lib/psych/json/yaml_events.rb: implicit styles should not
+ be changeable for JSON events.
+
+Sun Apr 29 06:12:02 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * parse.y (assoc, parser_yylex): add syntax to splat keyword hash.
+ [ruby-core:44591][Feature #6353]
+
+ * compile.c (compile_array_): generate keyword splat insns.
+
+ * vm.c (m_core_hash_merge_kwd): merge keyword hash into intermediate
+ hash. leftward argument is prior currently.
+
+Sat Apr 28 18:39:40 2012 Koichi Sasada <ko1@atdot.net>
+
+ * vm_core.h (rb_thread_t#yielding): add a field.
+
+ * thread.c (rb_thread_schedule_limits): set th#yielding while
+ release GVL to yield CPU time.
+
+ * thread.c (timer_thread_function): skip timer interrupt when
+ th#yielding is true. This patch fixes r35480.
+
+ * thread.c (rb_threadptr_execute_interrupts_common): revert
+ a patch of r35480.
+
+ * ChangeLog: add an extended memo of r35480.
+ http://bugs.ruby-lang.org/projects/ruby-trunk/wiki/R35480_ExtendedMemo
+
+Fri Apr 27 12:34:23 2012 NAKAMURA Usaku <usa@ruby-lang.org>
+
+ * ext/dl/cfunc.c (rb_dlcfunc_call): should convert a Bignum value to
+ unsigned long long on Win64.
+ [ruby-core:44636][Bug #6364] reported by raylinn@gmail.com (ray linn)
+
+Fri Apr 27 10:58:17 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * test/readline/test_readline.rb (setup): avoid affected by user's
+ inputrc file. [ruby-dev:45584][Bug #6357]
+
+Fri Apr 27 01:45:05 2012 NARUSE, Yui <naruse@ruby-lang.org>
+
+ * thread.c (rb_threadptr_execute_interrupts_common):
+ handle timer_interrupt only on the first loop for the case to avoid
+ the infinite loop like following case:
+ * there is 2 Ruby threads (3 pthreads)
+ (1) main thread is waiting at gvl_yield:112 (native_cond_wait)
+ (2) sub thread works
+ (3) sub thread waits at gvl_yield:133 (native_mutex_unlock)
+ (4) main thread works
+ (5) main thread goes to gvl_acquire_common
+ (6) main thread call rb_wakeup_timer_thread
+ (7) timer thread set timer interrupt to the main thread
+ (8) main thread works
+ (9) main thread waits at gvl_acquire_common:64 (native_cond_wait)
+ (10) sub tread works
+ (11) set sub thread as the current thread
+ (12) run Ruby thread
+ (13) ...100ms
+ (14) sub thread goes to rb_threadptr_execute_interrupts_common
+ (15) sub thread call rb_thread_schedule_limits
+ (16) sub thread call gvl_release_common
+ (17) sub threads waits at gvl_yield:121 (native_cond_wait)
+ (18) main threads works
+ (19) main thread back to gvl_yield
+ (20) set main thread as the current thread
+ (21) main thread call gvl_yield
+ (22) main thread waits at gvl_yield:112 (native_cond_wait)
+ As described above, the main thread can't escape from
+ rb_threadptr_execute_interrupts_common.
+ See extended memo: http://bugs.ruby-lang.org/projects/ruby-trunk/wiki/R35480_ExtendedMemo
+
+Fri Apr 27 07:15:07 2012 Tanaka Akira <akr@fsij.org>
+
+ * ext/socket/socket.c (sock_s_pack_sockaddr_un): support the longest
+ path in sockaddr_un, really.
+ reported by nagachika.
+ http://d.hatena.ne.jp/nagachika/20120426/ruby_trunk_changes_35474_35476
+
+Thu Apr 26 12:28:06 2012 Tanaka Akira <akr@fsij.org>
+
+ * ext/socket/raddrinfo.c (init_unix_addrinfo): support the longest
+ path in sockaddr_un.
+ (inspect_sockaddr): ditto.
+ (addrinfo_mdump): ditto.
+ (addrinfo_mload): ditto.
+ (rsock_unixpath_str): new function.
+ (rsock_unixpath): removed.
+ (rsock_unixaddr): use rsock_unixpath_str.
+
+ * ext/socket/socket.c (sock_s_pack_sockaddr_un): support the longest
+ path in sockaddr_un.
+ (sock_s_unpack_sockaddr_un): ditto.
+ (sock_s_gethostbyaddr): unused variable removed.
+
+ * ext/socket/unixsocket.c (rsock_init_unixsock): support the longest
+ path in sockaddr_un.
+
+ * ext/socket/rubysocket.h (rsock_unixpath_str): declared.
+ (rsock_unixpath): removed.
+
+ * test/socket/test_unix.rb: comment out test_nul because abstract unix
+ sockets may contain NULs.
+
+Thu Apr 26 01:32:33 2012 CHIKANAGA Tomoyuki <nagachika00@gmail.com>
+
+ * test/optparse/test_summary.rb (test_summary_containing_space): add
+ test for r35467. OptionParser#to_a shouldn't split banner by spaces.
+
+Wed Apr 25 23:02:46 2012 Tanaka Akira <akr@fsij.org>
+
+ * ext/socket/raddrinfo.c (init_unix_addrinfo): refine error message
+ format.
+ (addrinfo_mload): show more information on "too long AF_UNIX path"
+ error.
+ (addrinfo_unix_path): ditto for "too short AF_UNIX address" and
+ "too long AF_UNIX address" error.
+
+Wed Apr 25 05:46:12 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * lib/optparse.rb (OptionParser#to_a): split for each lines.
+ [ruby-dev:45568][Bug #6348]
+
+Tue Apr 24 21:57:53 2012 Tanaka Akira <akr@fsij.org>
+
+ * ext/socket/raddrinfo.c (init_unix_addrinfo): show actual path length
+ when it is too long for Unix socket.
+
+ * ext/socket/unixsocket.c (rsock_init_unixsock): ditto.
+
+ * ext/socket/socket.c (sock_s_pack_sockaddr_un): ditto.
+
+Tue Apr 24 21:43:58 2012 Yusuke Endoh <mame@tsg.ne.jp>
+
+ * lib/net/smtp.rb (check_continue): raise an error with an explanatory
+ message. [ruby-core:35854] [Feature #4598]
+
+Tue Apr 24 21:11:31 2012 NARUSE, Yui <naruse@ruby-lang.org>
+
+ * lib/optparse.rb (OptionParser#to_a): should split by end-of-line,
+ and MUST TEST IT, MUST RUN THE TEST, MUST VERIFY BEFORE BACKPORT.
+ [ruby-dev:45568][Bug #6348]
+
+Tue Apr 24 19:59:31 2012 NAKAMURA Usaku <usa@ruby-lang.org>
+
+ * enc/euc_jp.c: added EUC-JP-2004 and its alias EUC-JISX0213.
+ [ruby-dev:45571] [Feature #6349]
+ Requested by Kyouhei Yanagita <yanagi@shakenbu.org>.
+
+ * enc/trans/japanese_euc.trans: ditto.
+
+ * enc/trans/JIS/JISX0213-[12]%UCS@{BMP,SIP}.src: JIS X 0213:2004 ->
+ Unicode mapping table from NetBSD.
+
+ * enc/trans/JIS/UCS@{BMP,SIP}%JISX0213-[12].src: Unicode -> JIS X
+ 0213:2004 mapping table from NetBSD.
+
+ * tool/transcode-tblgen.rb: added SIP support.
+
+ * test/ruby/test_transcode.rb: tests of above changes.
+
+Tue Apr 24 18:12:13 2012 Koichi Sasada <ko1@atdot.net>
+
+ * compile.c: fix to output warning when the same literals
+ are available as a condition of same case clause.
+ And remove information ('#n') because we can find duplicated
+ condition with explicit line numbers.
+ [ruby-core:38343] [Ruby 1.9 - Bug #5068]
+
+ * test/ruby/test_syntax.rb: add a test for above.
+
+Tue Apr 24 17:03:51 2012 NAKAMURA Usaku <usa@ruby-lang.org>
+
+ * win32/win32.c (waitpid): need to check the return value of
+ FindChildSlotByHandle() before passing poll_child_status().
+ this fixed a SEGV in test-all. reported by ko1 via IRC.
+
+Tue Apr 24 16:04:39 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * parse.y (parser_yylex): EXPR_BEG by keywords is a start point of
+ commands. [ruby-dev:45563][Bug #6347]
+
+ * parse.y (superclass): ditto for superclass.
+
+ * parse.y (parser_parse_string, parser_here_document): ditto for
+ string interpolation.
+
+ * parse.y (parser_yylex): ditto for singleton class.
+
+Tue Apr 24 15:51:41 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * lib/optparse.rb (OptionParser#to_a): should split by end-of-line
+ [ruby-dev:45568][Bug #6348]
+
+ * lib/optparse.rb (OptionParser#to_a): String#to_a is no longer
+ defined. [ruby-dev:45568][Bug #6348]
+
+Tue Apr 24 12:46:50 2012 Marc-Andre Lafortune <ruby-core@marc-andre.ca>
+
+ * hash.c, object.c, struct.c, lib/ostruct.rb: add to_h methods.
+ [Feature #6276]
+
+Tue Apr 24 10:54:34 2012 NAKAMURA Usaku <usa@ruby-lang.org>
+
+ * test/drb/drbtest.rb ({DRbCore,DRbAry}#teardown): cannot pass SIGTERM
+ to another process on Windows, so use SIGINT instead.
+
+Tue Apr 24 00:25:39 2012 Yusuke Endoh <mame@tsg.ne.jp>
-Thu Dec 30 10:51:27 1999 Yukihiro Matsumoto <matz@netlab.co.jp>
+ * thread.c (rb_check_deadlock): refine an error message of deadlock
+ detection. [ruby-core:44336] [Bug #6288]
- * array.c,io.c,hash,c,re.c,string.c: `_m' suffix instead of
- `_method' for wrapper functions to implement method,
- e.g. `rb_str_join_m()'.
+Tue Apr 24 00:14:42 2012 Yusuke Endoh <mame@tsg.ne.jp>
-Thu Dec 30 02:08:02 1999 Yukihiro Matsumoto <matz@netlab.co.jp>
+ * parse.y (primary): remove wrong "fixpos" that caused incorrect
+ source_location of blocks. [ruby-core:42232] [Bug #5930]
- * bignum.c (rb_cstr2inum): non-numeric format check added.
- currently it works only with base == 0 (i.e. Integer()).
+ * test/ruby/test_proc.rb: add a test for above.
- * bignum.c (rb_str2inum): now takes VALUE to 1st argument. null
- byte check added.
+Mon Apr 23 22:56:08 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * array.c (rb_ary_replace): unless replacement is an array,
- replacement shall be converted to array by `[replacement]', not
- by `replacement.to_a'.
+ * ext/iconv: deprecated. [Feature #6322]
- * array.c (rb_ary_plus): right operand must be an array.
+Mon Apr 23 22:07:00 2012 Tanaka Akira <akr@fsij.org>
- * array.c (rb_ary_concat): argument must be an array.
+ * test/socket/test_unix.rb (bound_unix_socket): make temporary
+ filename shorter for less possibility of Unix socket path over
+ 107 bytes when TMPDIR has long path.
-Mon Dec 27 12:35:47 1999 Katsuyuki Komatsu <komatsu@sarion.co.jp>
+Mon Apr 23 20:35:49 2012 NAKAMURA Usaku <usa@ruby-lang.org>
- * ext/socket/socket.c (sock_finalize): mswin32: fix socket handle leak.
+ * win32/win32.c (szInternalCmds, internal_match, internal_cmd_match):
+ get rid of a segmentation fault with GCC 4.7.0.
+ reported by raylinn@gmail.com (ray linn) at [ruby-core:44505]
+ [Bug #6333], and patched by mame.
- * win32/win32.c (myfdclose): ditto.
+ * test/ruby/test_system.rb (TestSystem#test_system): test for it.
-Sun Dec 26 23:15:13 1999 Katsuyuki Komatsu <komatsu@sarion.co.jp>
+Mon Apr 23 20:11:02 2012 Tanaka Akira <akr@fsij.org>
- * win32/win32.c (mypopen): raise catchable error instead of rb_fatal.
- * win32/win32.c (mypclose): fix process handle leak.
+ * lib/drb/ssl.rb: generate 1024 bits RSA key instead of 512 bits.
+ OpenSSL 1.0.1 rejects 512 bits RSA key for TLS1.2 with SHA512.
+ http://rt.openssl.org/Ticket/Display.html?id=2769&user=guest&pass=guest
+ reported by Bohuslav Kabrda.
+ [ruby-core:43844] [ruby-trunk - Bug #6221]
-Sun Dec 26 16:17:11 1999 Katsuyuki Komatsu <komatsu@sarion.co.jp>
+Mon Apr 23 19:54:33 2012 Tanaka Akira <akr@fsij.org>
- * ext/Win32API/Win32API.c (Win32API_initialize): use UINT2NUM
- instead of INT2NUM to set __dll__ and __proc__.
+ * test/drb/drbtest.rb: rescue Errno::ESRCH for Process.kill.
+ reported by NARUSE, Yui. [ruby-dev:45551]
-Sat Dec 25 00:08:59 1999 KANEKO Naoshi <wbs01621@mail.wbs.ne.jp>
+Mon Apr 23 14:16:45 2012 NARUSE, Yui <naruse@ruby-lang.org>
- * ext/Win32API/Win32API.c (Win32API_Call): remove 'dword ptr'
- from _asm.
+ * .gdbinit (rb_ps_vm): follow st_table's packing change.
-Fri Dec 24 10:26:47 1999 Koji Oda <oda@bsd1.qnes.nec.co.jp>
+Mon Apr 23 10:43:30 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * win32/win32.h: use "C++" linkage.
+ * configure.in: disable rubygems not to load rbconfig.rb before
+ fake.rb. [ruby-core:44492][Bug #6329]
-Fri Dec 24 02:00:57 1999 Yukihiro Matsumoto <matz@netlab.co.jp>
+Sun Apr 22 20:26:06 2012 Tanaka Akira <akr@fsij.org>
- * eval.c (THREAD_ALLOC): should initialize th->trace.
+ * lib/drb/extservm.rb (DRb::ExtServManager): don't use /bin/sh to
+ invoke service subprocess. mark detach threads for clean up.
-Fri Dec 24 00:43:39 1999 KANEKO Naoshi <wbs01621@mail.wbs.ne.jp>
+ * test/drb/drbtest.rb: clean up the service subprocess in teardown.
- * io.c (pipe_open): check for `fptr->f == NULL'.
- * win32/win32.c (mypopen): STDERR does not work during ` function.
+ * test/drb/test_drb.rb: set @service_name for teardown.
-Wed Dec 22 22:50:40 1999 Minero Aoki <aamine@dp.u-netsurf.ne.jp>
+ * test/drb/test_drbunix.rb: ditto.
- * lib/net/session.rb, smtp.rb, pop.rb, http.rb: 1.1.2.
+ * test/drb/test_drbssl.rb: ditto.
- * lib/net/http.rb: HTTP support is enhanced a little
+ [ruby-dev:45547]
- * lib/net/http.rb: support proxy
+Sun Apr 22 07:51:29 2012 Tanaka Akira <akr@fsij.org>
-Tue Dec 21 17:21:28 1999 Koji Oda <oda@bsd1.qnes.nec.co.jp>
+ * lib/drb/ssl.rb: close accepted TCP socket if SSL accept is failed.
+ [ruby-dev:45541]
- * ext/socket/socket.c (sock_finalize): mswin32: fix FILE* leak.
+Sat Apr 21 14:36:49 2012 Masatoshi SEKI <m_seki@mva.biglobe.ne.jp>
-Tue Dec 21 05:33:56 1999 Minero Aoki <aamine@dp.u-netsurf.ne.jp>
+ * test/rinda/test_rinda.rb: fix sticks on some tests problem
+ [Bug #6272]
- * lib/net/session.rb, smtp.rb, pop.rb, http.rb: 1.1.1.
+Fri Apr 20 12:24:04 2012 Eric Hodel <drbrain@segment7.net>
- * lib/net/http.rb: support HTTP chunk
+ * lib/rubygems/ssl_certs/AddTrustExternalCARoot.pem: Removed to avoid
+ conflict with ca-bundle.pem
+ * lib/rubygems/ssl_certs/VerisignClass3PublicPrimaryCertificationAuthority-G2.pem:
+ ditto.
+ * lib/rubygems/ssl_certs/Entrust_net-Secure-Server-Certification-Authority.pem:
+ ditto.
-Mon Dec 20 19:08:12 1999 Nobuyoshi Nakada <nobu.nakada@nifty.ne.jp>
+Fri Apr 20 08:07:06 2012 Eric Hodel <drbrain@segment7.net>
- * file.c (rb_file_s_expand_path): handle dir separator correctly.
+ * lib/rubygems: Update to RubyGems 1.8.23 which contains security
+ fixes:
-Sun Dec 19 22:56:31 1999 KANEKO Naoshi <wbs01621@mail.wbs.ne.jp>
+ RubyGems now disallows redirection from HTTPS to HTTP.
- * lib/find.rb: support dosish root directory.
- * win32/Makefile: ditto.
- * win32/config.status: ditto.
- * win32/win32.c (opendir): ditto.
- * win32/win32.c (opendir): use CharPrev() to get last character
- of the directory name.
+ RubyGems now verifies SSL connections.
-Sat Dec 18 03:00:01 1999 Yukihiro Matsumoto <matz@netlab.co.jp>
+ See https://github.com/rubygems/rubygems/blob/1.8/History.txt for
+ changes since 1.8.22.
+ * test/rubygems: ditto.
- * file.c (path_check_1): check should be done by absolute path.
+Thu Apr 19 16:33:53 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * marshal.c (r_ivar): should restore generic_ivar too.
+ * strftime.c (rb_strftime_with_timespec): fix carry-up bug and
+ overwrite '+' with '-' if negative offset less than a hour.
+ [ruby-core:44447][Bug #6323]
- * marshal.c (w_ivar): should dump generic_ivar too.
+Thu Apr 19 09:39:57 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Fri Dec 17 22:46:46 1999 Minero Aoki <aamine@dp.u-netsurf.ne.jp>
+ * ext/-test-/win32/dln/extconf.rb: need import library for ordinal
+ entry even on mingw. [ruby-core:44441][Bug #6320]
- * lib/net/session.rb, smtp.rb, pop.rb, http.rb: 1.1.0.
+Thu Apr 19 09:35:15 2012 Eric Hodel <drbrain@segment7.net>
- * lib/net/http.rb: test release
+ * random.c (random_init): Clarify that the default seed is
+ Random.new_seed, not zero. Based on patch by Roger Pack.
+ [ruby-trunk - Bug #6313]
+ * random.c (rb_f_srand): ditto.
- * lib/net/session.rb: support class swapping
+Thu Apr 19 08:59:02 2012 Eric Hodel <drbrain@segment7.net>
- * lib/net/session.rb: Socket#flush_rbuf
+ * ext/curses/curses.c (window_nodelay): Fixed call-seq of nodelay to
+ include the '='.
- * lib/net/session.rb: doquote -> Net.quote
+ Improved description window.nodelay=.
-Fri Dec 17 19:27:43 1999 IWAMURO Motonori <iwa@mmp.fujitsu.co.jp>
+Thu Apr 19 08:47:54 2012 Eric Hodel <drbrain@segment7.net>
- * eval.c (rb_load): should initialize ruby_frame->last_class.
+ * io.c (io_readpartial): Document the output buffer parameter is
+ overwritten with the read contents even when non-empty.
+ Patch by yu nobuoka. [ruby-trunk - Bug #6285]
+ * io.c (io_read_nonblock): ditto.
+ * io.c (io_read): ditto.
+ * io.c (rb_io_sysread): ditto.
+ * io.c (argf_read): ditto.
+ * io.c (argf_readpartial): ditto.
+ * ext/stringio/stringio.c (strio_read): ditto.
+ * test/ruby/test_argf.rb (class TestArgf): Add test for existing
+ behavior of read outbuf.
+ * test/ruby/test_io.rb (class TestIO): ditto.
+ * test/stringio/test_stringio.rb (class TestStringIO): ditto.
-Wed Dec 15 01:35:29 1999 Yukihiro Matsumoto <matz@netlab.co.jp>
+Wed Apr 18 22:58:55 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * ruby.c (proc_options): option to change directory changed to
- `-C' like tar.
+ * configure.in (DOT, DOXYGEN): use AC_CHECK_PROGS instead of
+ AC_CHECK_PROG which needs the third argument. [ruby-core:44433]
+ [Bug #6316]
- * ruby.c (proc_options): argv boundary check for `-X'.
+ * configure.in (PKG_CONFIG): fix condition to skip older version
+ of pkg-config. continue in backticks does not affect outside.
-Mon Dec 13 15:15:31 1999 Yukihiro Matsumoto <matz@netlab.co.jp>
+Wed Apr 18 13:59:40 2012 NAKAMURA Usaku <usa@ruby-lang.org>
- * regex.c (re_adjust_startpos): separate startpos adjustment
- because of major performance drawback.
+ * win32/file.c (INVALID_FILE_ATTRIBUTES): define for old SDK.
- * class.c (rb_singleton_class): tainted status of the singleton
- class must be synchronized with the object.
+Wed Apr 18 10:22:54 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * eval.c (rb_thread_schedule): implement thread priority.
+ * strftime.c (rb_strftime_with_timespec): add an interim digit for
+ the timezone offset which is less than an hour.
-Sat Dec 11 03:34:38 1999 Yukihiro Matsumoto <matz@netlab.co.jp>
+Wed Apr 18 09:58:29 2012 Eric Hodel <drbrain@segment7.net>
- * gc.c (mark_hashentry): key should be VALUE, not ID.
+ * lib/rubygems/version.rb: Fixed init_with warning by calling into
+ yaml_initialize (for syck) from psych's init_with
- * io.c (argf_eof): should check next_p too.
+Wed Apr 18 09:03:43 2012 Eric Hodel <drbrain@segment7.net>
-Thu Dec 9 18:09:13 1999 EGUCHI Osamu <eguchi@shizuokanet.ne.jp>
+ * lib/rubygems: Update to RubyGems 1.8.22 plus r33517 and r35337 which
+ were ported to the rubygems git repository.
- * error.c (exc_set_backtrace): forgot to declare a VALUE argument.
+ See https://github.com/rubygems/rubygems/blob/1.8/History.txt for
+ changes since 1.8.11.
-Thu Dec 9 14:19:31 1999 Yukihiro Matsumoto <matz@netlab.co.jp>
+ * test/rubygems: ditto.
- * object.c (rb_obj_taint): explicit tainting must be prohibited at
- level 4 to prevent polluting trusted object by untrusted code.
+Tue Apr 17 22:18:48 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * file.c: file operations (stat, lstat, chmod, chown, umask,
- truncate, flock) are prohibited in level 2 (was level 4).
+ * strftime.c (rb_strftime_with_timespec): fix padding of time zone
+ offset. [ruby-dev:43287][Bug #4458]
-Wed Dec 8 11:48:23 1999 Yukihiro Matsumoto <matz@netlab.co.jp>
+Tue Apr 17 13:11:14 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * eval.c (rb_f_require): prohibiting require() in the secure mode
- cause serious autoloading error.
+ * dln.c (rb_w32_check_imported): skip ordinal entries. based on a
+ patch by phasis68 (Heesob Park) at [ruby-core:44381].
+ [ruby-core:44371][Bug #6303]
- * variable.c (rb_obj_instance_variables): don't need to prohibit
- to get list of instance variable names of untainted objects.
+Mon Apr 16 18:22:14 2012 NARUSE, Yui <naruse@ruby-lang.org>
- * variable.c (rb_ivar_get): don't need to prohibit to get instance
- variables of untainted objects.
+ * spec/default.mspec: expand relative path for ruby_exe which uses
+ them with Dir.chdir; it breaks relative paths, for example
+ core/kernel/exec_spec.rb.
- * variable.c (rb_mod_remove_const): should prohibit constant
- removals too.
+Mon Apr 16 16:22:40 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Wed Dec 8 09:23:01 1999 Yukihiro Matsumoto <matz@netlab.co.jp>
+ * win32/win32.c (gmtime_r, localtime_r): POSIX compliant reentrant
+ versions.
- * eval.c (rb_eval): should try autoloading before defining
- class/module at the toplevel.
+ * configure.in (RUBY_MSVCRT_VERSION): define on mingw too.
-Tue Dec 7 22:15:30 1999 EGUCHI Osamu <eguchi@shizuokanet.ne.jp>
+ * win32/Makefile.sub (config.h): prefix RT_VER with RUBY and make
+ more descriptive to get rid of potential conflict.
+
+Mon Apr 16 15:19:39 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * configure.in (NO_RUBY_VENDOR_LIB): fix missing comma.
+
+Mon Apr 16 12:17:12 2012 Marc-Andre Lafortune <ruby-core@marc-andre.ca>
+
+ * lib/matrix.rb (hermitian?): Bug fix, patch by George Koehler
+ [Bug #6290] [rubyspec:4b9573d7613]
+
+Mon Apr 16 09:42:50 2012 NAKAMURA Usaku <usa@ruby-lang.org>
+
+ * lib/rubygems/remote_fetcher.rb (Gem::RemoteFetcher#download): should
+ use File.identical? to check the identity of the files.
+ this fixed an error of a test on Windows.
+
+Sat Apr 14 12:55:03 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * configure.in (UNREACHABLE): gcc 4.4 eliminates unreachable code
+ if -O3 is given.
+
+ * win32/win32.c (child_result): dropped colon.
+
+Sat Apr 14 10:45:18 2012 NARUSE, Yui <naruse@ruby-lang.org>
+
+ * lib/webrick/server.rb (WEBrick::GenericServer#start):
+ partially revert r35315.
+
+ * test/webrick/test_server.rb (test_start_exception):
+ received signal is delivered to the main thread, so it is needed to
+ emulate it. patched by Eric Hodel. [ruby-core:44348] [Feature #6236]
+
+Sat Apr 14 09:35:45 2012 Eric Hodel <drbrain@segment7.net>
+
+ * variable.c (trace_ev): Removed "not reached" comment as this line is
+ reached.
+ * variable.c (rb_obj_remove_instance_variable): Replaced "not reached"
+ comment with the UNREACHABLE macro.
+ * variable.c (rb_mod_const_missing): ditto.
+ * variable.c (rb_mod_remove_cvar): ditto.
+ * enum.c (first_i): ditto.
+ * string.c (rb_str_aref): ditto.
+ * string.c (str_byte_aref): ditto.
+ * string.c (rb_to_id): ditto.
+ * io.c (rb_io_fmode_modestr): ditto.
+ * io.c (rb_io_oflags_modestr): ditto.
+ * pack.c (num2i32): ditto.
+ * vm_eval.c (rb_method_missing): ditto.
+ * vm_eval.c (rb_f_throw): ditto.
+ * dir.c (dir_read): ditto.
+ * win32/win32.c (child_result): ditto.
+ * struct.c (rb_struct_getmember): ditto.
+ * struct.c (rb_struct_set): ditto.
+ * struct.c (rb_struct_aref_id): ditto.
+ * eval.c (rb_f_raise): ditto.
+ * process.c (rb_f_exit_bang): ditto.
+ * process.c (rb_f_exit): ditto.
+ * process.c (rb_f_abort): ditto.
+ * ext/-test-/iter/break.c (iter_break_value): ditto.
+ * ext/pty/pty.c (pty_check): ditto.
+ * ext/openssl/ossl_pkey.c (ossl_pkey_new): ditto.
+ * ext/readline/readline.c (rb_remove_history): ditto.
+ * ext/stringio/stringio.c (strio_unimpl): ditto.
+ * numeric.c (num_sadded): ditto.
+ * numeric.c (num_init_copy): ditto.
+ * numeric.c (rb_num2ll): ditto.
+ * numeric.c (rb_num2ull): ditto.
+ * vm_insnhelper.c (call_cfunc): ditto.
+ * ruby.c (opt_W_getter): ditto.
+ * bignum.c (rb_big_coerce): ditto.
+ * file.c (rb_f_test): ditto.
+
+Sat Apr 14 08:38:20 2012 Eric Hodel <drbrain@segment7.net>
+
+ * encoding.c (rb_enc_codepoint_len): Use UNREACHABLE to avoid "control
+ reaches end of non-void function" warnings. [ruby-trunk - Bug #6066]
+ * re.c (name_to_backref_number): ditto.
+ * object.c (rb_Float): ditto.
+ * io.c (io_readpartial): ditto.
+ * io.c (io_read_nonblock): ditto.
+ * pack.c (rb_uv_to_utf8): ditto.
+ * proc.c (rb_method_entry_arity): ditto.
+ * vm_method.c (rb_f_notimplement): ditto.
+ * struct.c (rb_struct_aset_id): ditto.
+ * class.c (rb_scan_args): ditto.
+ * process.c (rlimit_resource_type): ditto.
+ * process.c (rlimit_resource_value): ditto.
+ * process.c (p_uid_switch): ditto.
+ * process.c (p_gid_switch): ditto.
+ * ext/digest/digest.c (rb_digest_instance_update): ditto.
+ * ext/digest/digest.c (rb_digest_instance_finish): ditto.
+ * ext/digest/digest.c (rb_digest_instance_reset): ditto.
+ * ext/digest/digest.c (rb_digest_instance_block_length): ditto.
+ * ext/bigdecimal/bigdecimal.c (BigDecimalCmp): ditto.
+ * ext/dl/handle.c (rb_dlhandle_close): ditto.
+ * ext/tk/tcltklib.c (pending_exception_check0): ditto.
+ * ext/tk/tcltklib.c (pending_exception_check1): ditto.
+ * ext/tk/tcltklib.c (ip_cancel_eval_core): ditto.
+ * ext/tk/tcltklib.c (lib_get_reltype_name): ditto.
+ * ext/tk/tcltklib.c (create_dummy_encoding_for_tk_core): ditto.
+ * ext/tk/tkutil/tkutil.c (tk_hash_kv): ditto.
+ * ext/openssl/ossl_ssl.c (ossl_ssl_session_reused): ditto.
+ * ext/openssl/ossl_pkey_ec.c (ossl_ec_key_dsa_verify_asn1): ditto.
+ * ext/openssl/ossl_pkey_ec.c (ossl_ec_point_is_at_infinit): ditto.
+ * ext/openssl/ossl_pkey_ec.c (ossl_ec_point_is_on_curve): ditto.
+ * ext/fiddle/conversions.c (generic_to_value): ditto.
+ * ext/socket/raddrinfo.c (rsock_io_socket_addrinfo): ditto.
+ * ext/socket/socket.c (sock_s_getnameinfo): ditto.
+ * ext/ripper/eventids2.c (ripper_token2eventid): ditto.
+ * cont.c (return_fiber): ditto.
+ * dmydln.c (dln_load): ditto.
+ * vm_insnhelper.c (vm_search_normal_superclass): ditto.
+ * bignum.c (big_fdiv): ditto.
+ * marshal.c (r_symlink): ditto.
+ * marshal.c (r_symbol): ditto.
+
+Fri Apr 13 17:12:09 2012 NARUSE, Yui <naruse@ruby-lang.org>
+
+ * hash.c (inspect_i): keep string's coderange.
+
+Fri Apr 13 15:26:51 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * hash.c (rb_hash_aset, rb_hash_update, rb_hash_update_by): use
+ st_update() to reduce evaluation of hash values.
+
+Fri Apr 13 15:17:36 2012 NARUSE, Yui <naruse@ruby-lang.org>
+
+ * lib/webrick/server.rb (WEBrick::GenericServer#stop): fix r35303;
+ this method is to deny new connections, not shutdown yet.
+
+ * lib/webrick/server.rb (WEBrick::GenericServer#start):
+ re-raise exception only when the exception is Interrupt (^C).
+
+Thu Apr 12 19:51:45 2012 Tadayoshi Funaba <tadf@dotrb.org>
+
+ * ext/date/date_core.c: added some notes.
+
+Wed Apr 11 17:16:49 2012 Koichi Sasada <ko1@atdot.net>
+
+ * compile.c (compile_array, compile_array_):
+ Divide big array (or hash) literals into several blocks and
+ concatenate them. There was a problem that a big array (hash)
+ literal causes SystemStackError exception (stack overflow)
+ because VM push all contents of the literal onto VM stack to
+ make an array (or hash). To solve this issue, we make several
+ arrays (hashes) and concatenate them to make a big array (hash)
+ object. [ruby-dev:37701] [Bug #982]
+
+ * compile.c (iseq_compile_each, setup_args): use modified
+ compile_array.
+
+ * vm.c (m_core_hash_from_ary, m_core_hash_merge_ary,
+ m_core_hash_merge_ptr): added for above change.
+
+ * id.c (Init_id), parse.y: add core method ids.
+
+ * bootstraptest/test_literal.rb: add simple tests.
+
+ * bootstraptest/test_eval.rb: remove rescue clause to catch
+ SystemStackError exception.
+
+ * test/ruby/test_literal.rb: add tests to check no stack overflow.
+
+Thu Apr 12 07:10:37 2012 Eric Hodel <drbrain@segment7.net>
- * configure.in: Modified rb_cv_rshift_sign detect routine and
- more simple/fast RSHIFT() for hpux-10.x.
+ * lib/uri/generic.rb (module URI): URI now downcases the scheme to
+ follow RFC 2396 section 3.1. [ruby-trunk - Feature #4551]
+ * test/uri/test_generic.rb (class URI): Test for above
-Tue Dec 7 11:16:30 1999 Yukihiro Matsumoto <matz@netlab.co.jp>
+Thu Apr 12 06:15:44 2012 Eric Hodel <drbrain@segment7.net>
- * eval.c (Init_eval): calculate stack limit from rlimit where
- getrlimit(2) is available.
+ * lib/net/protocol.rb (module Net): Added ReadTimeout to match
+ OpenTimeout. ReadTimeout is now raised by rbuf_fill instead of
+ Timeout::Error to help users distinguish what type of timeout
+ occurred. [ruby-trunk - Feature #6088]
+ * lib/net/pop.rb (module Net): Updated documentation for ReadTimeout
+ and OpenTimeout.
+ * lib/net/http.rb (module Net): ditto
+ * lib/net/smtp.rb (module Net): ditto
+ * lib/net/telnet.rb (module Net): Net::ReadTimeout is now raised in
+ waitfor to match Net::Protocol.
+ * test/net/http/test_http.rb: Updated Timeout::Error expectation to
+ Net::ReadTimeout.
+ * test/net/ftp/test_ftp.rb: ditto
-Tue Dec 7 09:57:33 1999 Katsuyuki Komatsu <komatsu@sarion.co.jp>
+Thu Apr 12 05:27:01 2012 Eric Hodel <drbrain@segment7.net>
- * file.c (rb_file_ftype): should have removed mode_t.
+ * lib/webrick/server.rb (module WEBrick::GenericServer): A server
+ will now continue only when a StandardError subclass is raised. For
+ other exception types the error will be logged at the fatal level and
+ the server will safely stop. Based on a patch by Alex Young.
+ [ruby-trunk - Feature #6236]
+ * test/webrick/test_server.rb: Test for new exception handling
+ behavior. Join the server thread instead of busy-waiting for it to
+ shut down to remove race conditions.
-Mon Dec 6 15:55:30 1999 EGUCHI Osamu <eguchi@shizuokanet.ne.jp>
+Thu Apr 12 03:50:44 2012 NARUSE, Yui <naruse@ruby-lang.org>
- * numeric.c (fix_rshift): Fix -1 >> 32 returned 0 (should be -1).
+ * lib/test/unit.rb (Test::Unit:Runner::Worker#_run_suites):
+ call GC.start before running the test suites.
- * numeric.c (fix_rshift): Fix 1 >> -1 returned 0 (should be 2).
+Wed Apr 11 22:31:19 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Mon Dec 6 11:47:23 1999 Yukihiro Matsumoto <matz@netlab.co.jp>
+ * parse.y (rb_check_id_cstr): new function to check if ID is
+ registered with NUL-terminated C string.
- * sprintf.c (rb_f_sprintf): formatted string must be tainted if
- any of parameters is a tainted string.
+ * sprintf.c (rb_str_format): avoid inadvertent symbol creation.
- * file.c (rb_file_s_expand_path): expanded file path need not to
- be tainted always.
+Wed Apr 11 20:28:36 2012 Hiroshi Shirosaki <h.shirosaki@gmail.com>
-Sun Dec 5 20:25:29 1999 Katsuhiro Ueno <unnie@blue.sky.or.jp>
+ * io.c (rb_io_eof): use eof() instead of io_fillbuf(). It's because
+ io_unread() doesn't work properly when reading CRLF with read(length)
+ and mode 'r'.
+ [ruby-core:44189][Bug #6271]
- * eval.c (Init_Proc): simple typo.
+ * test/ruby/test_io_m17n.rb (TestIO_M17N#test_read_crlf_and_eof):
+ test for above.
- * gc.c (add_heap): sizeof(RVALUE*), not sizeof(RVALUE).
+Wed Apr 11 07:38:33 2012 Eric Hodel <drbrain@segment7.net>
-Sat Dec 4 01:40:22 1999 Yukihiro Matsumoto <matz@netlab.co.jp>
+ * ext/digest/sha2/lib/sha2.rb (Digest#block_length): Fixed method name
+ in documentation examples. Patch by naleski via
+ https://github.com/ruby/ruby/pull/115
- * regex.c (re_search): adjust startpos for multibyte match unless
- the first pattern is forced byte match.
+Wed Apr 11 07:33:13 2012 Eric Hodel <drbrain@segment7.net>
- * bignum.c (rb_big_rand): should not use rand/random where drand48
- may be available. RANDOM_NUMBER should be provided from outside.
+ * pack.c (pack_pack): Warn when an invalid character is found in the
+ format string when $VERBOSE is true. [ruby-trunk - Feature #5219]
+ * pack.c (pack_unpack): ditto
+ * test/ruby/test_pack.rb (class TestPack): Test for warnings on
+ invalid format characters.
-Fri Dec 3 09:54:59 1999 Yukihiro Matsumoto <matz@netlab.co.jp>
+Wed Apr 11 06:11:10 2012 Eric Hodel <drbrain@segment7.net>
- * ruby.c (moreswitches): there may be trailing garbage at #!
- line.
+ * string.c (rb_str_tr): Documented use of \ to escape characters.
+ [ruby-trunk - Bug #6161]
+ * string.c (rb_str_count): ditto
- * eval.c (rb_f_require): should check require 'feature.o' too.
+Wed Apr 11 05:14:51 2012 Eric Hodel <drbrain@segment7.net>
-Thu Dec 2 11:58:15 1999 Koji Arai <JCA02266@nifty.ne.jp>
+ * lib/abbrev.rb: Clarified that Abbrev.abbrev returns a Hash instead
+ of an Array. Patch by Andrei Bocan. [ruby-trunk - Bug #6107]
- * eval.c (rb_thread_loading): should maintain loading_tbl.
+Wed Apr 11 03:02:24 2012 Ayumu AIZAWA <ayumu.aizawa@gmail.com>
-Thu Dec 2 10:21:43 1999 Yukihiro Matsumoto <matz@netlab.co.jp>
+ * ext/ripper/lib/ripper/sexp.rb: fix spelling. patched by
+ Jonathan Hinkle via https://github.com/ruby/ruby/pull/116
- * eval.c (rb_thread_loading_done): wrong parameter to st_delete().
+Tue Apr 10 19:07:04 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Wed Dec 1 11:24:06 1999 Nobuyoshi Nakada <nobu.nakada@nifty.ne.jp>
+ * error.c (rb_enc_raise): new function to raise an exception with
+ the message in the given encoding. patched by now (Nikolai
+ Weibull) at [ruby-core:41160]. [Feature #5650]
- * ruby.c (process_sflag): process -s properly (should not force `--').
+Tue Apr 10 18:19:32 2012 NARUSE, Yui <naruse@ruby-lang.org>
-Wed Dec 1 09:47:33 1999 Kazunori NISHI <kazunori@swlab.csce.kyushu-u.ac.jp>
+ * lib/net/http.rb (Net::HTTP#send_request_with_body_stream):
+ use IO.copy_stream for requests using body_stream.
+ patched by Eric Wong. [ruby-core:40898] [Feature #5605]
- * string.c (rb_str_split_method): should increment end too.
+Tue Apr 10 16:53:21 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Tue Nov 30 18:00:45 1999 Yukihiro Matsumoto <matz@netlab.co.jp>
+ * thread_pthread.c: add prototype declarations for older Mac OS X.
+ [ruby-core:43376][Bug #6170]
- * marshal.c: MARSHAL_MINOR incremented; format version is 4.2.
+Tue Apr 10 15:35:21 2012 Koichi Sasada <ko1@atdot.net>
- * marshal.c (w_object): distinguish class and module.
+ * compile.c (iseq_set_sequence): show a hint if there are duplicated
+ "when" clauses. [ruby-core:41502] [ruby-trunk - Feature #5716]
- * marshal.c (w_object): save hash's default value.
+Tue Apr 10 09:57:00 2012 Eric Hodel <drbrain@segment7.net>
- * marshal.c (r_object): restore hash's default value.
+ * string.c (rb_str_split_m): Documented behavior of split on the empty
+ string. [ruby-trunk - Feature #3575]
-Tue Nov 30 01:46:18 1999 Yukihiro Matsumoto <matz@netlab.co.jp>
+Tue Apr 10 09:48:31 2012 Eric Hodel <drbrain@segment7.net>
- * re.c (rb_reg_source): generated source string must be tainted if
- regex is tainted.
+ * ext/zlib/zlib.c (rb_deflate_s_deflate): Fixed ruby example replacing
+ NO_FLUSH with FINISH. [ruby-trunk - Bug #6273]
- * file.c (rb_file_s_basename): basename should not be tainted
- unless the original path is tainted.
+Mon Apr 9 23:10:26 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * file.c (rb_file_s_dirname): ditto.
+ * win32/win32.c (isUNCRoot, winnt_stat): support long UNC.
+ [ruby-core:30623][Feature #3399]
-Mon Nov 29 20:42:13 1999 Nobuyoshi Nakada <nobu.nakada@nifty.ne.jp>
+Mon Apr 9 15:16:01 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * file.c (stat_new): Struct::Stat -> File::Stat; Stat is no longer
- a Struct.
+ * parse.y (string_content, parser_yylex): count brace nesting to
+ dispatch embexpr_end. [ruby-core:43775][Bug #6211]
-Mon Nov 29 15:28:52 1999 Yukihiro Matsumoto <matz@netlab.co.jp>
+Mon Apr 9 13:06:58 2012 Marc-Andre Lafortune <ruby-core@marc-andre.ca>
- * variable.c (rb_path2class): evaluated value from path should be
- module or class.
+ * hash.c (rb_hash_set_default_proc): Accept nil, patch by Run Paint
+ [Feature #4234]
-Fri Nov 26 18:12:49 1999 Yukihiro Matsumoto <matz@netlab.co.jp>
+ * test/ruby/test_hash.rb: test for above.
- * eval.c (rb_exec_end_proc): should remove only end_procs defined
- within load wrapper.
+Mon Apr 9 08:01:15 2012 Tadayoshi Funaba <tadf@dotrb.org>
- * eval.c (rb_load): save and restore ruby_wrapper around loading.
+ * ext/date/date_strftime.c: gets the value with range() consistently.
+ * ext/date/date_strftime.c (range): now just replaces the given item.
- * eval.c (rb_mark_end_proc): mark end procs registered by END{} or
- at_exit{}.
+Mon Apr 9 06:58:01 2012 Tadayoshi Funaba <tadf@dotrb.org>
- * eval.c (rb_set_end_proc): should not call rb_global_variable()
- on heap address; it crashed mod_ruby.
+ * complex.c (nucomp_expt): [ruby-core:44170].
-Mon Nov 22 14:07:24 1999 Koji Arai <JCA02266@nifty.ne.jp>
+Mon Apr 9 02:52:03 2012 NARUSE, Yui <naruse@ruby-lang.org>
- * ruby.c (proc_options): variable e_script should be visited by
- garbage collector.
+ * complex.c (nucomp_expt): the result of f_complex_new2 may be a fixnum
+ with mathn. [ruby-core:44170] [Bug #6267]
-Sat Nov 20 10:10:41 1999 Yukihiro Matsumoto <matz@netlab.co.jp>
+Sun Apr 8 22:46:01 2012 NARUSE, Yui <naruse@ruby-lang.org>
- * hash.c (inspect_i): value may be nil, check revised.
+ * ext/json/generator/generator.c (generate_json_bignum):
+ add RB_GC_GUARD.
+ http://fb.rubyci.org/~chkbuild/ruby-trunk/log/20120407T210301Z.diff.html.gz
-Fri Nov 19 18:06:21 1999 Yukihiro Matsumoto <matz@netlab.co.jp>
+Sun Apr 8 07:26:40 2012 NARUSE, Yui <naruse@ruby-lang.org>
- * dir.c (glob): recursive wildcard match by `**' ala zsh.
+ * lib/webrick/utils.rb (WEBrick::Utils::TimeoutHandler): get keys
+ and fetch values from it to prevent @timeout_info's error
+ "can't add a new key into hash during iteration".
-Fri Nov 19 11:44:26 1999 EGUCHI Osamu <eguchi@shizuokanet.ne.jp>
+Sun Apr 8 06:51:57 2012 NARUSE, Yui <naruse@ruby-lang.org>
- * variable.c: was returning void value.
+ * io.c (io_unread): cast as long the value for extra_max.
+ [ruby-core:44137] [Bug #6257]
-Fri Nov 19 03:57:22 1999 Nobuyoshi Nakada <nobu.nakada@nifty.ne.jp>
+Sun Apr 8 06:46:48 2012 NARUSE, Yui <naruse@ruby-lang.org>
- * file.c: add methods Stat struct class to reduce stat(2).
+ * lib/webrick/httpresponse.rb (WEBrick::HTTPResponse#send_body_io):
+ use readpartial to get data even if the response is streaming data and
+ each data is smaller than @buffer_size.
+ patched by yu nobuoka. [ruby-dev:45471] [Bug #6230]
-Thu Nov 18 16:18:27 1999 Yukihiro Matsumoto <matz@netlab.co.jp>
+Sat Apr 7 22:35:36 2012 Hiroshi Shirosaki <h.shirosaki@gmail.com>
- * lib/pstore.rb: mutual lock by flock(2).
+ * include/ruby/win32.h (rb_w32_aspawn_flags): add the declaration of
+ new function.
-Thu Nov 18 11:44:13 1999 Masahiro Tomita <tommy@tmtm.org>
+ * process.c (enum): add EXEC_OPTION_PGROUP and move the position
+ above for the usage in proc_spawn_n().
- * io.c (read_all): should check bytes too.
+ * process.c (proc_spawn_n): add an argument to pass new option
+ `new_pgroup`. The option specifies CREATE_NEW_PROCESS_GROUP flag to
+ CreateProcessW(). This flag is necessary for the usage of
+ Process.kill on the subprocess on Windows.
-Wed Nov 17 02:40:40 1999 Yukihiro Matsumoto <matz@netlab.co.jp>
+ * process.c (rb_exec_arg_addopt): ditto.
- * io.c (Init_IO): $defout (alias of $>) added.
+ * process.c (rb_spawn_process): ditto.
-Tue Nov 16 09:47:14 1999 Yukihiro Matsumoto <matz@netlab.co.jp>
+ * process.c (documentation for rb_f_spawn): add documentation for new
+ option `new_pgroup` of spawn.
- * lib/pstore.rb: add mutual lock using symlink.
+ * test/ruby/test_process.rb (TestProcess#test_execopts_new_pgroup):
+ add tests for option `new_pgroup`.
-Mon Nov 15 16:50:34 1999 Yukihiro Matsumoto <matz@netlab.co.jp>
+ * test/ruby/test_thread.rb
+ (TestThreadGroup#test_thread_timer_and_interrupt):
+ add option `new_pgroup: true` to spawn on Windows. It's needed for
+ Process.kill on a subprocess.
- * enum.c (enum_grep): non matching grep returns an empty array, no
- longer returns nil.
+ * win32/win32.c (CreateChild): add an argument to pass
+ dwCreationFlags of CreateProcessW().
- * enum.c (enum_grep): grep with block returns collection of
- evaluated values of block over matched elements.
+ * win32/win32.c (rb_w32_spawn): ditto.
-Mon Nov 15 04:50:33 1999 Koji Arai <JCA02266@nifty.ne.jp>
+ * win32/win32.c (rb_w32_aspawn_flags): add new function to pass
+ dwCreationFlags.
- * re.c (rb_reg_source): should not call rb_reg_expr_str()
- everytime.
+ * win32/win32.c (rb_w32_aspawn): refactor to move the content to
+ rb_w32_aspawn_flags().
+ [ruby-core:43245][Bug #6131]
-Sat Nov 13 07:34:18 1999 Yukihiro Matsumoto <matz@netlab.co.jp>
+Sat Apr 7 22:32:00 2012 Hiroshi Shirosaki <h.shirosaki@gmail.com>
- * variable.c (rb_mod_constants): traverse superclasses to collect
- constants.
+ * test/ruby/test_thread.rb
+ (TestThreadGroup#test_thread_timer_and_interrupt): skip on Windows.
+ Process.kill cannot kill a subprocess if CREATE_NEW_PROCESS_GROUP
+ flag is not specified in a call to CreateProcessW().
- * eval.c (assign): modified for shared variables.
+ * win32/win32.c (CreateChild): revert the usage of
+ CREATE_NEW_PROCESS_GROUP flag for compatibility.
+ [ruby-core:43245][Bug #6131]
- * eval.c (rb_eval): search nested scope, then superclasses to
- assign shared variables within methods.
+Sat Apr 7 10:28:40 2012 Aaron Patterson <aaron@tenderlovemaking.com>
- * eval.c (rb_eval): remove warnings from constants modification,
- because they are no longer constants.
+ * ext/psych/lib/psych.rb: bumping up psych version to match release.
+ * ext/psych/psych.gemspec: ditto
- * parse.y (node_assign): modified for shared variables.
+Sat Apr 7 02:07:00 2012 Aaron Patterson <aaron@tenderlovemaking.com>
- * parse.y (assignable): allow constant assignment in methods;
- constants should be called `shared variable'.
+ * ext/psych/parser.c: fall back to any encoding if the external
+ encoding is wrong. [ruby-core:44163]
+ * test/psych/test_encoding.rb: fix test
-Fri Nov 12 23:52:19 1999 Katsuyuki Komatsu <komatsu@sarion.co.jp>
+Fri Apr 6 16:24:24 2012 Martin Duerst <duerst@it.aoyama.ac.jp>
- * process.c (rb_f_system): argument check for NT, __EMX__, DJGPP.
+ * struct.c (documentation for rb_struct_members_m):
+ fix 'array of strings' to 'array of symbols'
+ [ruby-core:44152][Bug #6264]
-Wed Nov 10 21:54:11 1999 EGUCHI Osamu <eguchi@shizuokanet.ne.jp>
+Fri Apr 6 14:27:04 2012 Kazuhiro NISHIYAMA <zn@mbf.nifty.com>
- * hash.c (rb_any_cmp): Fixed return without value.
+ * Makefile.in ($(LIBRUBY_A)): fix typo.
-Wed Nov 10 17:57:06 1999 Yukihiro Matsumoto <matz@netlab.co.jp>
+Thu Apr 5 13:26:15 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * sprintf.c: incorporate <yasuf@big.or.jp>'s sprintf patch at
- [ruby-dev:7754].
+ * missing/alloca.c (xmalloc, xfree): use ruby version, not
+ depending on RUBY_LIB_PREFIX. [ruby-dev:45492][Bug #6255]
-Wed Nov 10 08:28:53 1999 Yukihiro Matsumoto <matz@netlab.co.jp>
+Wed Apr 4 13:06:39 2012 NARUSE, Yui <naruse@ruby-lang.org>
- * eval.c (rb_call0): supply class parameter for each invocation.
+ * lib/ftp/ftp.rb (Net::FTP#close): restore original read_timeout.
-Tue Nov 9 13:21:04 1999 EGUCHI Osamu <eguchi@shizuokanet.ne.jp>
+Wed Apr 4 10:33:31 2012 NARUSE, Yui <naruse@ruby-lang.org>
- * configure.in: AC_MINIX move to before AC_EXEEXT and AC_OBJEXT.
+ * lib/ftp/ftp.rb (Net::FTP#close): ignore exceptions from shutdown and
+ read on closing.
-Mon Nov 8 19:52:29 1999 EGUCHI Osamu <eguchi@shizuokanet.ne.jp>
+Wed Apr 4 01:48:35 2012 NARUSE, Yui <naruse@ruby-lang.org>
- * configure.in: Renamed AC_CHAR_UNSIGNED to AC_C_CHAR_UNSIGNED.
+ * lib/ftp/ftp.rb (Net::FTP#close): close socket more gracefully.
- * configure.in: Added default to AC_CHECK_SIZEOF().
+ * lib/ftp/ftp.rb (Net::BufferedSocket#shutdown): added.
-Mon Nov 8 14:28:18 1999 Yukihiro Matsumoto <matz@netlab.co.jp>
+ * test/net/ftp/test_ftp.rb (FTPTest#create_ftp_server): wait socket
+ with shutdown and read.
- * parse.y (stmt): rescue modifier added to the syntax.
+Tue Apr 3 19:00:52 2012 NAKAMURA Usaku <usa@ruby-lang.org>
- * keywords: kRESCUE_MOD added.
+ * test/net/ftp/test_ftp.rb (FTPTest#create_ftp_server): should wait
+ a little before closing socket because if the client call
+ Net::FTP#getmultiline the socket is suddenly closed by the server in
+ the getline loop.
- * eval.c (rb_f_eval): fake outer scope when eval() called without
- bindings.
+Tue Apr 3 18:33:38 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * eval.c (rb_f_binding): should copy last_class in the outer frame too.
+ * process.c (setreuid, setregid): suppress warnings.
+ [ruby-core:43374][Bug #6169]
-Sun Nov 7 18:31:04 1999 Yasuhiro Fukuma <yasuf@big.or.jp>
+Tue Apr 3 10:18:27 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * eval.c (is_defined): last_class may be 0.
+ * enumerator.c (inspect_enumerator): suppress uninitialized
+ instance variable warnings. [ruby-dev:45449][Bug #6214]
+ patched by no6v (Nobuhiro IMAI).
-Sat Nov 6 19:26:55 1999 EGUCHI Osamu <eguchi@shizuokanet.ne.jp>
+Mon Apr 2 13:25:08 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * Makefile.in: Added depend entry make parse.@OBJEXT@ from parse.c
- for UCB make
+ * lib/optparse/ac.rb: autoconf-like options.
-Thu Nov 4 17:41:18 1999 Yukihiro Matsumoto <matz@netlab.co.jp>
+Mon Apr 2 10:34:00 2012 eregon <eregontp@gmail.com>
- * regex.c (re_compile_pattern): \< (wordbeg), \> (wordend) disabled.
+ * string.c (rb_str_start_with, rb_str_end_with): raise an error if
+ an argument is not convertible to a String.
+ [ruby-core:40623][Bug #5536]
-Wed Nov 3 08:52:57 1999 Masaki Fukushima <fukusima@goto.info.waseda.ac.jp>
+Mon Apr 2 03:35:25 2012 NARUSE, Yui <naruse@ruby-lang.org>
- * io.c (Init_IO): forgot to use INT2FIX() around SEEK_SET, etc.
+ * lib/webrick/server.rb (WEBrick::GenericServer): close socket only if
+ the socket is not closed yet.
-Wed Nov 3 00:25:20 1999 Yukihiro Matsumoto <matz@netlab.co.jp>
+Sun Apr 1 23:03:18 2012 NARUSE, Yui <naruse@ruby-lang.org>
- * string.c (rb_str_split_method): use mbclen2() to handle kcode
- option of regexp objects.
+ * lib/net/ftp.rb (Net::BufferedSocket): should delegate send() to @io
+ for Net::FTP#abort and Net::FTP#status.
-Mon Nov 1 14:22:15 1999 EGUCHI Osamu <eguchi@shizuokanet.ne.jp>
+Sun Apr 1 00:41:56 2012 Shugo Maeda <shugo@ruby-lang.org>
- * eval.c (rb_eval): reduce recursive calls to rb_eval()
- case of ||= and &&= .
+ * lib/net/ftp.rb: fixed the domain name in examples.
-Sun Oct 31 13:12:42 1999 WATANABE Hirofumi <eban@os.rim.or.jp>
+Sat Mar 31 21:39:45 2012 NARUSE, Yui <naruse@ruby-lang.org>
- * regex.c (re_compile_pattern): wrong [\W] match.
+ * lib/webrick/utils.rb (WEBrick::Utils::TimeoutHandler): dup to prevent
+ @timeout_info's "can't add a new key into hash during iteration".
-Fri Oct 29 16:57:30 1999 Yukihiro Matsumoto <matz@netlab.co.jp>
+Sat Mar 31 14:22:59 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * ext/nkf/lib/kconv.rb: new String methods (kconv, tojis, toeuc,
- tosjis).
+ * hash.c (hash_default_value): extract from rb_hash_aref(), to be
+ shared with rb_hash_shift(), so that overriding Hash#default
+ will be respected.
- * time.c (time_s_at): now accepts optional second argument to
- specify micro second.
+Sat Mar 31 14:16:02 2012 Sokolov Yura (funny-falcon) <funny.falcon@gmail.com>
-Thu Oct 28 13:35:40 1999 Yukihiro Matsumoto <matz@netlab.co.jp>
+ * hash.c: do not allocate st_table when it is not necessary.
- * string.c (rb_str_split_method): should be mbchar aware with
- single char separators.
+Sat Mar 31 13:42:39 2012 Shugo Maeda <shugo@ruby-lang.org>
-Wed Oct 27 12:57:21 1999 Yukihiro Matsumoto <matz@netlab.co.jp>
+ * lib/net/ftp.rb (read_timeout=, open_timeout=): supported timeout.
- * random.c (rb_f_srand): random seed should be unsigned.
+Sat Mar 31 13:20:40 2012 Sokolov Yura (funny-falcon) <funny.falcon@gmail.com>
-Tue Oct 26 23:58:15 1999 Yukihiro Matsumoto <matz@netlab.co.jp>
+ * hash.c: remove unnecessary checks for Qundef in hash iterations.
+ since hash use st_foreach_check for iterations, such checks are
+ needless.
- * array.c (rb_ary_collect): collect for better performance.
+Sat Mar 31 12:05:01 2012 Martin Bosslet <Martin.Bosslet@googlemail.com>
-Tue Oct 26 19:20:54 1999 Koji Arai <JCA02266@nifty.ne.jp>
+ * ext/openssl/ossl_x509cert.c: Fix doc typo.
- * marshal.c (r_object): should register class/module objects.
+Sat Mar 31 10:13:24 2012 Sokolov Yura (funny-falcon) <funny.falcon@gmail.com>
-Sat Oct 23 15:59:39 1999 Takaaki Tateishi <ttate@jaist.ac.jp>
+ * st.c (st_foreach_check, st_foreach): remove ancient check. This
+ check are from initial ordered hash commit when first entry were
+ created with entry->fore = entry->back = entry.
- * process.c (rb_f_system): should require at least one argument.
+ * st.c (st_delete): use real_entries in st_delete for packed tables
-Sat Oct 23 12:42:44 1999 Nobuyoshi Nakada <nobu.nakada@nifty.ne.jp>
+Sat Mar 31 07:53:23 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * enum.c (enum_collect): collect without block will collect
- elements in enumerable.
+ * st.c (st_foreach_check): remove the entry by replacing with never
+ when ST_DELETE.
-Thu Oct 21 16:14:19 1999 Yukihiro Matsumoto <matz@netlab.co.jp>
+ * hash.c (st_foreach_safe): since table is not for VALUE, Qundef is
+ not special value, so use 0 instead. therefore this function can be
+ applied to only st_table which 0 is invalid as keys, e.g., IDs.
- * ruby.c (moreswitches): function to process string option;
- the name is stolen from perl (not implementation).
+ * hash.c: Qundef cannot be passed from st_foreach_check().
- * ruby.c (proc_options): use RUBYOPT environment variable to
- retrieve the default options.
+ * hash.c, marshal.c, object.c, variable.c: fix callback argument types
+ of iterators.
- * dir.c (fnmatch): use eban's fnmatch; do not depend on system's
- fnmatch (which may have portability problem) anymore.
+Thu Mar 29 23:50:15 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Wed Oct 20 15:14:24 1999 Yukihiro Matsumoto <matz@netlab.co.jp>
+ * st.c (st_update): pass pointer to key to the callback function.
- * marshal.c (marshal_load): should protect the generated object
- table (arg->data) from GC.
+Thu Mar 29 16:36:10 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Mon Oct 18 16:15:52 1999 Yukihiro Matsumoto <matz@netlab.co.jp>
+ * st.c (st_update): add existing parameter to the callback function.
- * ext/nkf/nkf.c (rb_nkf_kconv): output should be NUL terminated.
+Thu Mar 29 16:35:32 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Mon Oct 18 09:03:01 1999 Minero Aoki <aamine@dp.u-netsurf.ne.jp>
+ * lib/test/unit.rb (terminal_width, del_status_line, put_status):
+ extract as methods.
- * lib/net/session.rb, smtp.rb, pop.rb: 1.0.3
+Thu Mar 29 10:20:18 2012 Martin Bosslet <Martin.Bosslet@googlemail.com>
- * lib/net/pop.rb: new methods POP3Command#uidl, POPMail#uidl.
+ * ext/openssl/ossl_pkcs7.c: fix crash when parsing garbage data.
+ * test/openssl/test_pkcs7.rb: assert correct behavior for it.
+ Thanks to Matt Venables for reporting the issue.
+ [ruby-core:43250][Bug #6134]
-Sun Oct 17 03:35:33 1999 Masaki Fukushima <fukusima@goto.info.waseda.ac.jp>
+Thu Mar 29 10:16:05 2012 NAKAMURA Usaku <usa@ruby-lang.org>
- * array.c (rb_ary_pop): forgot some freeze checks.
+ * thread_win32.c (TIME_QUANTUM_USEC): 10ms(= old setting) [experimental]
+ cf. [Bug #6098]
-Sat Oct 16 12:57:53 1999 EGUCHI Osamu <eguchi@shizuokanet.ne.jp>
+Thu Mar 29 10:12:12 2012 NAKAMURA Usaku <usa@ruby-lang.org>
- * array.c (rb_ary_sort): always returns the copied array.
+ * thread.c (rb_threadptr_execute_interrupts_common): use defined
+ TIME_QUANTUM_USEC instead of a magic number. there is no meanings
+ to use different values for checking interval of interruption and
+ thread switching limits.
+ cf. [Bug #6098]
-Fri Oct 15 22:50:41 1999 WATANABE Hirofumi <eban@os.rim.or.jp>
+Thu Mar 29 09:26:17 2012 Martin Bosslet <Martin.Bosslet@googlemail.com>
- * error.c (sys_nerr): on CYGWIN, it is _sys_nerr.
+ * test/openssl/test_x509cert.rb: exclude test that fails when issuing
+ a certificate with RSA signature and DSS1 digest for earlier
+ OpenSSL versions when used in conjunction with OpenSSL 1.0.1.
+ Thanks, Vit Ondruch, for reporting the issue.
+ [ruby-core:42949][Bug #6089]
-Fri Oct 15 01:32:31 1999 WATANABE Hirofumi <eban@os.rim.or.jp>
+Thu Mar 29 08:25:35 2012 Martin Bosslet <Martin.Bosslet@googlemail.com>
- * io.c (rb_io_ctl) :need to use NUM2ULONG, not NUM2INT.
+ * NEWS: add note about unified behavior of encoding nil values in
+ instances of OpenSSL::ASN1::ASN1Data.
- * ext/Win32API/Win32API.c (Win32API_Call): need to use NUM2ULONG,
- not NUM2INT.
+Thu Mar 29 07:45:36 2012 Martin Bosslet <Martin.Bosslet@googlemail.com>
-Fri Oct 15 00:22:30 1999 Yukihiro Matsumoto <matz@netlab.co.jp>
+ * ext/openssl/ossl_asn1.c: raise TypeError when trying to encode nil
+ values for Primitive instances.
+ * test/openssl/test_asn1.rb: Assert consistent behavior when
+ encoding nil values: Primitives raise TypeError, Constructives
+ raise NoMethodError.
+ Fixes [ruby-core:43009][Bug #6102]
- * re.c (Init_Regexp): super class of the MatchingData, which was
- Data, to be Object.
+Wed Mar 28 16:39:59 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * eval.c (ruby_run): evaluate required libraries before load &
- compiling the script.
+ * process.c (obj2uid, obj2gid): allow strings as input user/group id.
+ [ruby-core:40923][Feature #5610]
- * parse.y (lex_getline): retrieve a line from the stream, saving
- lines in the table in debug mode.
+Wed Mar 28 15:06:18 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * eval.c (call_trace_func): treat the case ruby_sourcefile is null.
+ * marshal.c (r_symreal): default to ASCII-8BIT for non-ascii symbols,
+ otherwise it should be converted to US-ASCII in rb_intern_str() if
+ possible. [ruby-core:43762][Bug #6209]
-Thu Oct 14 02:00:10 1999 Yukihiro Matsumoto <matz@netlab.co.jp>
+Wed Mar 28 08:44:24 2012 Aaron Patterson <aaron@tenderlovemaking.com>
- * parse.y (string): compile time string concatenation.
+ * ext/psych/lib/psych.rb: updating version to match gem
+ * ext/psych/psych.gemspec: ditto
+ * ext/psych/lib/psych/visitors/to_ruby.rb: fixing deprecation warning
-Wed Oct 13 07:28:09 1999 Minero Aoki <aamine@dp.u-netsurf.ne.jp>
+Tue Mar 27 23:44:11 2012 NAKAMURA Usaku <usa@ruby-lang.org>
- * lib/net/session.rb, smtp.rb, pop.rb: 1.0.2
+ * io.c (io_unread): fixed memory leak. report by nagachika via IRC.
- * lib/net/session.rb: new method Session#set_pipe.
+Tue Mar 27 22:44:23 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * lib/net/session.rb, smtp.rb, pop.rb: add RD documentation.
+ * configure.in (verconf.h): separate load path specific stuff from
+ config.h.
-Wed Oct 13 02:17:05 1999 EGUCHI Osamu <eguchi@shizuokanet.ne.jp>
+Tue Mar 27 22:43:40 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * array.c (rb_ary_plus): remove recursion.
+ * win32/Makefile.sub: fix config.h path to include.
- * array.c (rb_ary_sort_bang): detect modify attempt.
+Tue Mar 27 17:08:08 2012 Kazuhiro NISHIYAMA <zn@mbf.nifty.com>
-Wed Oct 13 02:17:05 1999 Yukihiro Matsumoto <matz@netlab.co.jp>
+ * win32/win32.c (check_if_dir): fix memory leak.
- * eval.c (block_pass): should copy block to prevent modifications.
- tag in the structure should be updated from latest prot_tag.
+Tue Mar 27 13:13:51 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * eval.c (proc_s_new): tag in struct BLOCK should not point into
- unused stack.
+ * string.c (str_new_empty): should copy also the encoding as an
+ empty substring. [ruby-dev:45441][Bug #6206]
- * dir.c (dir_s_glob): iterate over generated matching filenames if
- the block is given to the method.
+Mon Mar 26 23:43:04 2012 Shugo Maeda <shugo@ruby-lang.org>
- * array.c (rb_ary_at): new methods; at, first, last.
+ * lib/net/ftp.rb (parse227, parse228, parse229): don't use $~.
- * hash.c (rb_hash_fetch): raises exception unless the default
- value is supplied.
+Mon Mar 26 23:34:40 2012 Shugo Maeda <shugo@ruby-lang.org>
- * hash.c (rb_hash_s_create): need not remove nil from value.
+ * lib/net/ftp.rb (parse227, parse228, parse229): don't use local
+ variables defined by named capture for other Ruby implementations
+ such as Rubinius.
- * hash.c (rb_hash_aset): setting value to nil does not remove key
- anymore.
+Mon Mar 26 23:19:03 2012 Shugo Maeda <shugo@ruby-lang.org>
-Tue Oct 12 22:29:04 1999 Yukihiro Matsumoto <matz@netlab.co.jp>
+ * lib/net/ftp.rb (parse_pasv_port): refactored.
- * io.c (io_read): length may be 0 or negative.
+Mon Mar 26 19:49:49 2012 Shugo Maeda <shugo@ruby-lang.org>
-Tue Oct 12 13:26:27 1999 Jun-ichiro itojun Hagino <itojun@itojun.org>
+ * test/net/ftp/test_ftp.rb: add the test, which was forgotten in the
+ previous commit.
- * signal.c (posix_signal): RETSIGTYPE may be void.
+Mon Mar 26 19:37:27 2012 Shugo Maeda <shugo@ruby-lang.org>
-Tue Oct 12 03:28:03 1999 EGUCHI Osamu <eguchi@shizuokanet.ne.jp>
+ * lib/net/ftp.rb (parse227, parse228, parse229): refactored.
- * array.c (rb_ary_delete_at): allows negative position.
+Mon Mar 26 11:46:23 2012 Shugo Maeda <shugo@ruby-lang.org>
-Mon Oct 11 17:42:25 1999 Nobuyoshi Nakada <nobu.nakada@nifty.ne.jp>
+ * enumerator.c (inspect_enumerator): show method arguments of
+ lazy enumerators correctly.
- * parse.y (rb_intern): should generate distinct ID_ATTRSET symbols
- for the name with multiple `='s at the end.
+Mon Mar 26 13:51:23 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * Makefile.in (CPPFLAGS): separate cpp flags from CFLAGS.
+ * win32/win32.c (check_if_dir, check_if_wdir): fix for Visual C++
+ not to use S_ISDIR(). [Feature #2408][ruby-core:26925]
-Mon Oct 11 07:27:05 1999 Yukihiro Matsumoto <matz@netlab.co.jp>
+ * ruby.c (load_file_internal): ditto.
- * eval.c (rb_eval): should not execute the `else' clause on the
- case the exceptions are handled by the `rescue' clause.
+Mon Mar 26 11:46:01 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * signal.c (Init_signal): ignore SIGPIPE by default.
+ * ruby.c (load_file_internal): bail out if the script is a directory.
+ [Feature #2408][ruby-core:26925]
-Wed Oct 6 17:13:19 1999 Nobuyoshi Nakada <nobu.nakada@nifty.ne.jp>
+ * win32/win32.c (rb_w32_open, rb_w32_wopen): check if the file is a
+ directory when access denied, to set errno to EISDIR.
- * ruby.c (addpath): rubylib_mangled_path() modified.
+Sun Mar 25 18:13:14 2012 NARUSE, Yui <naruse@ruby-lang.org>
-Mon Oct 4 12:42:32 1999 Kazuhiko Izawa <izawa@erec.che.tohoku.ac.jp>
+ * string.c (tr_setup_table): fix multiple non latin argument for
+ non latin (over 256 characters) tr-like methods.
+ [ruby-core:43371] [Bug #6167]
- * pack.c (pack_unpack): % in printf format should be %%.
+Sun Mar 25 00:46:06 2012 Shugo Maeda <shugo@ruby-lang.org>
-Mon Oct 4 10:01:40 1999 Yukihiro Matsumoto <matz@netlab.co.jp>
+ * enumerator (lazy_initialize): set the instance variable "receiver"
+ to include the receiver to the return value of inspect on a lazy
+ enumerator directly created by Enumerator::Lazy.new.
- * variable.c (rb_obj_instance_variables): should always return
- array for all object can have instance variables now.
+ * enumerator (RETURN_LAZY): don't set the instance variable "receiver".
-Mon Oct 4 00:08:34 1999 Yukihiro Matsumoto <matz@netlab.co.jp>
+Sat Mar 24 23:59:00 2012 Shugo Maeda <shugo@ruby-lang.org>
- * pack.c (OFF16): need to adjust pointer address to pack/unpack on
- 64bit machines.
+ * enumerator (enumerator_inspect): include the original receiver and
+ method name of Enumerator::Lazy in the result of inspect.
+ [ruby-core:43345] [Bug #6159]
-Sun Oct 03 03:05:59 1999 WATANABE Hirofumi <eban@os.rim.or.jp>
+ * enumerator (InitVM_Enumerator): don't use rb_define_alias for
+ some methods such as collect in order to make rb_frame_this_func()
+ return the correct method names.
- * time.c (time_arg): mktime y2k problem.
+Sat Mar 24 22:22:18 2012 Sambasiva Rao Suda <sambasivarao@gmail.org>
-Sun Sep 26 16:54:45 1999 WATANABE Hirofumi <eban@os.rim.or.jp>
+ * time.c (time_init_1): Time.new will accept seconds as string or
+ int. [ruby-core:43569][Bug #6193]
- * parse.y (here_document): `\r' handling for here documents.
+Fri Mar 23 15:12:12 2012 Martin Duerst <duerst@it.aoyama.ac.jp>
-Wed Sep 22 09:20:11 1999 Masahiro Tomita <tommy@tmtm.org>
+ * transcode.c (documentation for str_encode): Explain
+ that transcoding to the same encoding is a no-op
+ (i.e. no exceptions, no replacements,...).
+ [ruby-core:43557][Bug #6190]
- * ext/socket/socket.c: SOCKS5 support.
+Fri Mar 23 13:19:20 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Wed Sep 22 07:33:23 1999 Minero Aoki <aamine@dp.u-netsurf.ne.jp>
+ * bignum.c (rb_str_to_inum): must be ASCII compatible encoding as
+ well as String#hex and String#oct. [ruby-core:43566][Bug #6192]
- * lib/net/session.rb, smtp.rb, pop.rb: 1.0.1
+ * string.c (rb_must_asciicompat): check if ASCII compatible.
- * lib/net/pop.rb: APOP did not work.
+Thu Mar 22 23:14:36 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * lib/net/pop.rb: modify the way to make APOP challenge.
+ * transcode.c (str_encode_bang, encoded_dup): if nothing was
+ transcoded, just set encoding but leave coderange unchanged as
+ force_encoding. [ruby-core:43557][Bug #6190]
-Wed Sep 22 00:35:30 1999 Yukihiro Matsumoto <matz@netlab.co.jp>
+Thu Mar 22 22:30:44 2012 Hiroshi Shirosaki <h.shirosaki@gmail.com>
- * string.c (rb_str_include): should return boolean value.
+ * io.c (static int io_fflush): add the definition.
+ Use it in set_binary_mode_with_seek_cur().
- * regex.c (re_compile_fastmap): wrong comparison with mbc.
+ * io.c (set_binary_mode_with_seek_cur): refactoring to split the
+ content into io_unread(). Fix the possibility of buffer overflow.
- * eval.c (specific_eval): default sourcefile name should be
- "(eval)" for module_eval etc.
+ * io.c (io_unread): add new implementation for Windows. Previous one
+ caused invalid cursor position using IO#pos with OS text mode. New
+ one fixes the bug.
-Wed Sep 22 00:06:07 1999 Katsuyuki Komatsu <komatsu@sarion.co.jp>
+ * test/ruby/test_io_m17n.rb
+ (TestIO_M17N#test_pos_dont_move_cursor_position): add a test for
+ above bug.
+ [ruby-core:43497] [Bug #6179]
- * win32/Makefile: update rules.
+Thu Mar 22 19:55:08 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * io.c (io_fread): should not assign in char, it maybe -1.
+ * win32/win32.c (rb_w32_fstat, rb_w32_fstati64): convert FILETIME
+ to time_t directly, not to be affected by TZ unnecessarily.
-Tue Sep 21 23:57:54 1999 Yukihiro Matsumoto <matz@netlab.co.jp>
+ * win32/win32.c (unixtime_to_filetime): convert time_t to FILETIME
+ simply.
- * eval.c (call_trace_func): should not propagate retval in
- trace_func.
+Thu Mar 22 13:43:31 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Mon Sep 20 21:35:39 1999 Katsuyuki Komatsu <komatsu@sarion.co.jp>
+ * ext/openssl/ossl_pkey_rsa.c (rsa_generate): fix argument type.
+ [Bug #6094]
- * win32/win32.c (myselect): assume non socket files are always
- readable/writable.
+Thu Mar 22 11:14:10 2012 NAKAMURA Usaku <usa@ruby-lang.org>
-Mon Sep 20 01:08:02 1999 Yukihiro Matsumoto <matz@netlab.co.jp>
+ * test/ruby/test_io.rb (TestIO#test_pos_with_getc): updated.
+ see [ruby-core:43550]
- * io.c (io_fread): should not block other threads.
+Wed Mar 21 17:57:57 2012 NARUSE, Yui <naruse@ruby-lang.org>
- * io.c (rb_io_synchronized): renamed from rb_io_unbuffered(); do
- not call setbuf(NULL) anymore.
+ * regcomp.c: Merge Onigmo 3d855b30d574536d3ae600260208c6624ae4791c.
+ [Bug#6143] [Bug#6144] [Bug#6145]
-Sat Sep 18 13:45:43 1999 Yukihiro Matsumoto <matz@netlab.co.jp>
+Wed Mar 21 17:01:55 2012 NAKAMURA Usaku <usa@ruby-lang.org>
- * stable version 1.4.2 released.
+ * test/ruby/test_io.rb (TestIO#test_pos_with_getc): added.
+ see [Bug #6179][ruby-core:43518]
-Fri Sep 17 23:24:17 1999 Katsuyuki Komatsu <komatsu@sarion.co.jp>
+Mon Mar 19 17:18:51 2012 Shugo Maeda <shugo@ruby-lang.org>
- * eval.c (rb_f_missing): dumped core if no argument given.
+ * enumerator.c (lazy_flat_map_func): convert the block value to
+ Array if it doesn't respond to each. [ruby-core:43334]
+ [Bug #6155]
-Fri Sep 17 23:21:06 1999 Katsuyuki Komatsu <komatsu@sarion.co.jp>
+Mon Mar 19 16:34:14 2012 Shugo Maeda <shugo@ruby-lang.org>
- * win32/win32.c (myselect): translate WSAEINTR, WSAENOTSOCK into
- UNIX errno constants.
+ * enum.c (zip_i): variadic argument needs explicit cast on the
+ platforms where VALUE is longer than int.
-Fri Sep 17 00:52:27 1999 Yukihiro Matsumoto <matz@netlab.co.jp>
+Mon Mar 19 15:36:41 2012 Shugo Maeda <shugo@ruby-lang.org>
- * parse.y (arg): assignable() may return 0.
+ * enumerator.c (enumerable_lazy): add an example of take and first
+ to the documentation. [ruby-core:43344] [Bug #6158]
+ add the description of the behavior when a block is given to zip
+ or cycle.
-Thu Sep 16 20:46:23 1999 WATANABE Hirofumi <watanabe@ase.ptg.sony.co.jp>
+Mon Mar 19 15:20:53 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * eval.c (rb_eval): was doubly evaluating the return expression.
+ * compile.c (iseq_specialized_instruction): DRY and replace chain
+ of if-else with switch for special instructions. based on a
+ patch by Vasfed. https://github.com/ruby/ruby/pull/105
-Thu Sep 16 18:40:08 1999 Yukihiro Matsumoto <matz@netlab.co.jp>
+Mon Mar 19 15:05:54 2012 URABE Shyouhei <shyouhei@ruby-lang.org>
- * stable version 1.4.1 released.
+ * test/test_pty.rb: same as r29280, skip tests when PTY allocation
+ failed (that's not our fault).
-Thu Sep 16 11:33:22 1999 WATANABE Hirofumi <watanabe@ase.ptg.sony.co.jp>
+Sun Mar 18 23:21:17 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * string.c (rb_str_match): should return nil.
+ * gc.c (aligned_free): fix condition for free. memalign() and
+ posix_memalign() are not defined together normally.
-Wed Sep 15 22:46:37 1999 Yukihiro Matsumoto <matz@netlab.co.jp>
+Sun Mar 18 18:31:45 2012 Yuki Sonoda (Yugui) <yugui@yugui.jp>
- * re.c (rb_reg_s_quote): should quote `-' too.
+ * gc.c (aligned_malloc, aligned_free): added fallback implementations
+ for platforms like OSX Leopard.
-Tue Sep 14 15:23:22 1999 Nobuyoshi Nakada <nobu.nakada@nifty.ne.jp>
+Sun Mar 18 17:17:48 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * parse.y (yylex): no need to ignore `\r' here.
+ * bignum.c (rb_big_pow): estimate result bit size more precisely.
+ [ruby-core:30735][Feature #3429]
- * parse.y (nextc): strip `\r' from text.
+Sun Mar 18 17:17:36 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * parse.y (nextc): support `__END__\r\n' type terminator.
+ * gc.c (free_method_entry_i): method entry may be in
+ unlinked_method_entry_list. [ruby-core:43383][Bug #6171]
-Mon Sep 13 10:49:19 1999 WATANABE Hirofumi <watanabe@ase.ptg.sony.co.jp>
+Sun Mar 18 15:27:31 2012 Tanaka Akira <akr@fsij.org>
- * eval.c (rb_eval): needless RTEST(ruby_verbose) removed.
+ * compile.c: typo fix by Run Paint Run Run.
+ [ruby-core:28368] [Bug #2824]
-Mon Sep 13 09:10:11 1999 Minero Aoki <aamine@dp.u-netsurf.ne.jp>
+Sun Mar 18 10:01:02 2012 Kazuki Tsujimoto <kazuki@callcc.net>
- * lib/net/session.rb, smtp.rb, pop.rb: 1.0.0
+ * lib/profiler.rb: support calling singleton methods of
+ an instance of BasicObject.
-Wed Sep 8 11:37:38 1999 Tadayoshi Funaba <tadf@kt.rim.or.jp>
+Sat Mar 17 06:56:58 2012 Eric Hodel <drbrain@segment7.net>
- * time.c (make_time_t): bit more strict comparison.
+ * object.c: Fix indentation of Class#inherited example.
-Tue Sep 7 00:50:56 1999 Yukihiro Matsumoto <matz@netlab.co.jp>
+Sat Mar 17 01:46:05 2012 Kazuhiro NISHIYAMA <zn@mbf.nifty.com>
- * range.c (range_each): use rb_str_upto() for strings.
+ * string.c (trnext): fix bug with string ending with '\\'.
+ [ruby-dev:45374][Bug #6160]
- * string.c (rb_str_upto): set upper limit by comparing curr <= end.
+ * test/ruby/test_string.rb (TestString#test_delete): test for
+ above.
- * range.c (range_each): should check equality to handle magic
- increment.
+Fri Mar 16 20:06:24 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Mon Sep 6 22:43:33 1999 Yukihiro Matsumoto <matz@netlab.co.jp>
+ * string.c (trnext): should advance char-wise.
+ [ruby-core:43335][Bug #6156]
- * eval.c (rb_eval): break/next/redo available within -n/-p loop.
+Fri Mar 16 17:42:05 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Fri Sep 3 11:14:31 1999 Yukihiro Matsumoto <matz@netlab.co.jp>
+ * parse.y (block_append_gen): fix unreachable warning line number.
+ should warn at the code, not jump.
- * compar.c (cmp_equal): should not raise exception; protect by
- rb_rescue().
+Fri Mar 16 17:33:08 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Thu Sep 2 05:23:05 1999 WATANABE Hirofumi <eban@os.rim.or.jp>
+ * enum.c (enum_take): allocate buffer array before iteration, as well
+ as enum_first did.
- * file.c (rb_file_s_expand_path): use dirsep, instead of character
- literal '/'.
+ * enum.c (enum_first): remove duplication.
- * file.c (rb_file_s_expand_path): reduce multiple dirsep at the top.
+Fri Mar 16 14:43:18 2012 Yuki Sonoda (Yugui) <yugui@yugui.jp>
-Wed Sep 1 00:28:27 1999 Yukihiro Matsumoto <matz@netlab.co.jp>
+ * load.c (ruby_init_ext): don't free the given pointer itself.
+ It is not guaranteed even that the pointer is on heap.
- * eval.c (rb_call): call rb_undefined() if a method appears not to
- be exist explicitly from cache.
+Fri Mar 16 14:37:57 2012 Shugo Maeda <shugo@ruby-lang.org>
- * eval.c (rb_method_boundp): check method cache before calling
- rb_get_method_body().
+ * vm_eval.c (rb_mod_module_eval): fix the documentation of
+ class_eval to mention class variable lookup. [ruby-core:40649]
+ [Bug #5544]
- * eval.c (rb_get_method_body): store method non-existence
- information in the cache.
+Fri Mar 16 14:27:11 2012 Shugo Maeda <shugo@ruby-lang.org>
- * random.c (rb_f_srand): use getpid(2) to generate seed.
+ * vm_eval.c (rb_mod_module_eval): fix the documentation of
+ class_eval to mention constant lookup. [ruby-core:41718]
+ [Bug #5777]
- * regex.c (re_match): do not apply partial mbc match for
- charset_not.
+Fri Mar 16 14:10:45 2012 Shugo Maeda <shugo@ruby-lang.org>
- * regex.c (re_compile_pattern): put extended literal prefix (0xff)
- only before numeric literals, not before all >0x80 char.
+ * lib/net/imap.rb (initialize): raise Net::IMAP::Error when the
+ connection is closed without a greeting response.
+ [ruby-core:40938] [Bug #5616]
- * regex.c (re_compile_pattern): put numeric literal in extended
- charset region, not normal charset bits.
+Fri Mar 16 13:50:12 2012 Shugo Maeda <shugo@ruby-lang.org>
- * regex.c (re_compile_fastmap): calculate fastmap for charset and
- charset_not to treat numeric literal (e.g. \246) specially.
+ * lib/net/imap.rb (rfc822_text): ignore [] after RFC822.
+ [ruby-core:40945] [Bug #5620]
-Fri Aug 28 17:32:55 1999 Yasuhiro Fukuma <yasuf@big.or.jp>
+Fri Mar 16 12:00:42 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * eval.c (rb_eval): should set return value (nil) explicitly if a
- value is omitted for return statement.
+ * vm_insnhelper.c (argument_error): use line number at the beginning
+ of lambda, not the first code of its body.
+ [ruby-core:43314][Bug #6151]
-Thu Aug 26 15:06:11 1999 Masaki Fukushima <fukusima@goto.info.waseda.ac.jp>
+ * iseq.c (rb_iseq_first_lineno): constified.
- * gc.c (rb_gc): local variables may be placed beyond stack_end, so
- use an address from alloca(1) on non C_ALLOCA platforms.
+Fri Mar 16 11:20:07 2012 Shugo Maeda <shugo@ruby-lang.org>
-Thu Aug 26 01:24:17 1999 Yukihiro Matsumoto <matz@netlab.co.jp>
+ * enumerator.c (lazy_take): don't enumerate an extra value.
+ [ruby-dev:45370] [Bug #6152]
- * sprintf.c (rb_f_sprintf): "%%" is legal, but "%3.14%" is not.
+Fri Mar 16 06:30:10 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Mon Aug 23 00:00:54 1999 Tsukada Takuya <tsukada@fminn.nagano.nagano.jp>
+ * enumerator.c (lazy_zip_func): variadic argument needs explicit cast
+ on the platforms where VALUE is longer than int.
- * regex.c (re_compile_fastmap): wrong macro caused memory leak.
+ * enumerator.c (lazy_init_iterator): no need to check overflow twice.
-Sat Aug 21 11:30:51 1999 Yukihiro Matsumoto <matz@netlab.co.jp>
+Fri Mar 16 05:47:09 2012 Eric Hodel <drbrain@segment7.net>
- * eval.c (ADJ): should not adjust addresses to data on heap.
+ * enumerator.c (lazy_init_iterator): Fix type error (int vs long).
-Fri Aug 20 20:50:58 1999 Kenji Nagasawa <kenn@hma.att.ne.jp>
+Thu Mar 15 23:13:36 2012 Shugo Maeda <shugo@ruby-lang.org>
- * defines.h (PATH_SEP): path separator is ";" for OS/2.
+ * enum.c (rb_enum_values_pack): rename from enum_values_pack, and
+ remove static.
-Thu Aug 19 10:50:43 1999 WATANABE Tetsuya <tetsu@jpn.hp.com>
+ * enumerator.c (lazy_init_iterator, lazy_init_yielder,
+ lazy_select_func, lazy_reject_func, lazy_grep_func): handle
+ multiple values correctly.
- * gc.c (rb_gc): add volatile to avoid GCC optimize bug(?).
+ * enumerator.c (lazy_grep): change the behavior when a block is
+ given, to be consistent with Enumerable#grep.
-Wed Aug 18 23:48:10 1999 Yukihiro Matsumoto <matz@netlab.co.jp>
+Thu Mar 15 19:12:31 2012 Shugo Maeda <shugo@ruby-lang.org>
- * due to disk trouble, some change records were lost. several
- modification made to eval.c, gc.c, io.c, pack.c,
- ext/extmk.rb.in, and lib/mkmf.rb.
+ * enumerator.c (lazy_zip): rescue StopIteration returned by
+ Enumerator#next.
-Fri Aug 13 15:41:39 1999 Yukihiro Matsumoto <matz@netlab.co.jp>
+Thu Mar 15 18:19:53 2012 Shugo Maeda <shugo@ruby-lang.org>
- * stable version 1.4.0 released.
+ * enumerator.c (lazy_zip, lazy_cycle): Enumerator::Lazy#{zip,cycle}
+ should be eager when a block is given, to be consistent with
+ Enumerable#{zip,cycle}.
-Fri Aug 13 03:16:07 1999 Yukihiro Matsumoto <matz@netlab.co.jp>
+Thu Mar 15 17:45:27 2012 Shugo Maeda <shugo@ruby-lang.org>
- * io.c (argf_forward): since $stdout may be non-IO, ARGF.file is
- not guaranteed to be IO. check and forwarding added to every ARGF
+ * enumerator.c (InitVM_Enumerator): renamed Enumerable::Lazy to
+ Enumerator::Lazy.
+
+Thu Mar 15 16:37:38 2012 Shugo Maeda <shugo@ruby-lang.org>
+
+ * enumerator.c (enumerable_lazy): added cycle to the documentation.
+
+Thu Mar 15 15:37:42 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * parse.y (parser_yylex): fix warning line number.
+
+Thu Mar 15 15:19:38 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * enumerator.c (lazy_cycle): check argument number overflow before
+ creating temporary array.
+
+Thu Mar 15 15:04:54 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * util.c (ruby_strtod): no need to check same digit for hexdigit
+ twice. [ruby-dev:45363][Bug #6146]
+
+ * parse.y (sym_check_asciionly): check ascii compatibility before
+ scanning for code range.
+
+ * parse.y (intern_str): set to us-ascii if ascii only.
+ [ruby-dev:45363][Bug #6146]
+
+ * file.c (ruby_enc_find_basename): allow NULL as alllen.
+ [ruby-dev:45363][Bug #6146]
+
+Thu Mar 15 14:49:31 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * string.c (rb_str_conv_enc_opts): default to original encoding.
+
+Thu Mar 15 13:47:17 2012 NAKAMURA Usaku <usa@ruby-lang.org>
+
+ * hash.c (env_str_new, rb_f_getenv, env_fetch): use rb_str_conv_enc()
+ instead of rb_str_encode() to simplify the code.
+
+Thu Mar 15 12:44:50 2012 NAKAMURA Usaku <usa@ruby-lang.org>
+
+ * win32/win32.c, include/ruby/win32.h (rb_w32_ugetenv): new API to
+ accept and to return UTF-8 strings.
+
+ * win32/win32.c (rb_w32_getenv): follow above change.
+
+ * win32/win32.c (rb_w32_get_environ): returns UTF-8 environment area.
+
+ * hash.c (env_str_new, rb_f_getenv, env_fetch): follow above changes.
+ [Bug #5570] [ruby-core:40737]
+
+Thu Mar 15 10:57:27 2012 Shugo Maeda <shugo@ruby-lang.org>
+
+ * enumerator.c (lazy_cycle): add Enumerable::Lazy#cycle.
+
+Thu Mar 15 10:31:40 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * test/ruby/test_arity.rb (TestArity#err_mess): use assert_raise.
+
+Thu Mar 15 07:03:52 2012 Eric Hodel <drbrain@segment7.net>
+
+ * vm_eval.c (check_funcall): Raise ArgumentError if respond_to?
+ requires more than three arguments. [Bug #6000]
+
+ * test/ruby/test_object.rb (class TestObject): Test for respond_to?
+ requiring more than three arguments.
+
+Thu Mar 15 06:08:06 2012 Marc-Andre Lafortune <ruby-core@marc-andre.ca>
+
+ * include/ruby/intern.h: Add rb_check_arity, rb_error_arity [#6085]
+
+ * array.c: Use rb_check_arity / rb_error_arity
+
+ * class.c: ditto
+
+ * enumerator.c: ditto
+
+ * eval.c: ditto
+
+ * file.c: ditto
+
+ * hash.c: ditto
+
+ * numeric.c: ditto
+
+ * proc.c: ditto
+
+ * process.c: ditto
+
+ * random.c: ditto
+
+ * re.c: ditto
+
+ * signal.c: ditto
+
+ * string.c: ditto
+
+ * struct.c: ditto
+
+ * transcode.c: ditto
+
+ * vm_eval.c: ditto
+
+ * vm_insnhelper.c: ditto & implementation of rb_error_arity
+
+ * test/ruby/test_arity.rb: tests for above
+
+Thu Mar 15 06:08:05 2012 Marc-Andre Lafortune <ruby-core@marc-andre.ca>
+
+ * vm_insnhelper.c: improve number of arguments error in case of
+ optional parameters (issue #6085)
+
+ * include/ruby/intern.h: define UNLIMITED_ARGUMENTS
+
+ * test/ruby/test_arity.rb: test for above
+
+Thu Mar 15 00:58:04 2012 Shugo Maeda <shugo@ruby-lang.org>
+
+ * enumerator.c (enumerable_lazy): fix the documentation of
+ Enumerable#lazy.
+
+Wed Mar 14 22:01:06 2012 Shugo Maeda <shugo@ruby-lang.org>
+
+ * enumerator.c (lazy_init_iterator): break when Qundef is returned
+ to make obj.drop(3).take(2) work properly.
+
+ * enumerator.c (lazy_take_while): add Enumerable::Lazy#take_while.
+
+ * enumerator.c (lazy_drop): add Enumerable::Lazy#drop.
+
+ * enumerator.c (lazy_drop_while): add Enumerable::Lazy#drop_while.
+
+ * enumerator.c (InitVM_Enumerator): add Enumerable::Lazy#force as an
+ alias of to_a.
+
+Wed Mar 14 19:28:40 2012 Shugo Maeda <shugo@ruby-lang.org>
+
+ * enumerator.c (lazy_take): add Enumerable::Lazy#take.
+
+Wed Mar 14 18:40:36 2012 Shugo Maeda <shugo@ruby-lang.org>
+
+ * enumerator.c: use long for array indices.
+
+Wed Mar 14 18:25:18 2012 Shugo Maeda <shugo@ruby-lang.org>
+
+ * enumerator.c: moved the comment of StopIteration.
+
+Wed Mar 14 17:55:29 2012 NAKAMURA Usaku <usa@ruby-lang.org>
+
+ * numeric.c (flodivmod): must go through the same pass if HAVE_FMOD or
+ not. this is a bugfix of r35013.
+
+Wed Mar 14 16:41:55 2012 NAKAMURA Usaku <usa@ruby-lang.org>
+
+ * test/test_tmpdir.rb (TestTmpdir#test_world_writable): skip on Windows.
+
+Wed Mar 14 15:09:23 2012 Marc-Andre Lafortune <ruby-core@marc-andre.ca>
+
+ * numeric.c: fix flodivmod for cornercases [Bug #6044]
+ add ruby_float_mod
+
+ * insns.def (opt_mod): use ruby_float_mod
+
+ * internal.h: declare ruby_float_mod
+
+ * test/ruby/test_float.rb: tests for above
+
+ * test/ruby/envutil.rb: create helper assert_is_minus_zero
+
+Wed Mar 14 10:44:35 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * enumerator.c (lazy_grep_func): should use === instead of =~, as
+ well as Enumerable#grep
+
+Wed Mar 14 08:15:54 2012 Shugo Maeda <shugo@ruby-lang.org>
+
+ * enumerator.c (lazy_flat_map_func): use each for non-Array objects.
+
+Wed Mar 14 08:06:35 2012 Shugo Maeda <shugo@ruby-lang.org>
+
+ * enumerator.c (lazy_zip): add Enumerable::Lazy#zip.
+
+ * enumerator.c (lazy_lazy): just returns self.
+
+Wed Mar 14 07:48:36 2012 Tadayoshi Funaba <tadf@dotrb.org>
+
+ * ext/date/date_core.c (datetime_s_now): [ruby-core:43256].
+
+Tue Mar 13 22:00:14 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * compile.c (iseq_set_arguments): keyword rest arg without keyword args.
+
+ * node.c (dump_node): dump kw_rest_arg too.
+
+ * parse.y (block_param, f_arg): more kwrest patterns.
+ [ruby-core:42455][Bug #5989]
+
+ * parse.y (new_args_gen): no extra kw_rest_arg if no keyword rest arg.
+
+Tue Mar 13 15:17:03 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * parse.y (block_param, f_args): add rules for the case arguments
+ begin with kwrest. [ruby-core:42455][Bug #5989]
+
+Tue Mar 13 12:37:53 2012 NARUSE, Yui <naruse@ruby-lang.org>
+
+ * io.c (io_encoding_set): always warn if external encoding and internal
+ encoding are identical. [ruby-core:40727] [Bug #5568]
+
+Tue Mar 13 12:37:03 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * gc.c: add ObjectSpace::WeakMap. [ruby-dev:44565][Bug #5350]
+
+ * lib/weakref.rb: use WeakMap instead of _id2ref.
+
+Tue Mar 13 10:59:48 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * tool/rbinstall.rb (prepare): skip if basedir is not defined.
+ [ruby-core:39135][Bug #5238]
+
+ * tool/rbinstall.rb (CONFIG.[]): check for mandatory
+ configurations.
+
+Tue Mar 13 00:09:18 2012 Shugo Maeda <shugo@ruby-lang.org>
+
+ * enumerator.c (enumerable_lazy): added documentation.
+
+Mon Mar 12 20:19:25 2012 Tanaka Akira <akr@fsij.org>
+
+ * lib/tmpdir.rb (Dir::tmpdir): test the current directory suitable for
+ temporary directory.
+
+Mon Mar 12 20:08:16 2012 Tanaka Akira <akr@fsij.org>
+
+ * lib/fileutils.rb (fu_have_symlink?): specify TypeError for rescue
+ clause.
+
+Mon Mar 12 19:23:13 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * encoding.c (rb_find_encoding): new function find encoding from
+ arbitrary object as a pointer to rb_encoding, and return NULL if
+ not found.
+
+ * io.c (io_encoding_set): just warn unsupported encodings, but not
+ exception. [ruby-core:40726] [Bug #5567]
+
+Mon Mar 12 19:03:32 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * vm_method.c (Init_eval_method): respond_to? and
+ respond_to_missing? are public.
+
+Mon Mar 12 14:56:52 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * node.h (NEW_YIELD), parse.y (new_yield_gen): array-values flags
+ has been already obsolete. patch by Thomas Enebo.
+ [ruby-core:41929][Bug #5847]
+
+Mon Mar 12 12:44:33 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * vm_method.c (Init_eval_method): copy basic methods to Exception.
+ [ruby-core:40287][Bug #5473]
+
+Mon Mar 12 10:13:36 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * eval_jump.c (rb_exec_end_proc): remember the latest exit status.
+ [ruby-core:43173][Bug #5218]
+
+Mon Mar 12 07:33:12 2012 Tanaka Akira <akr@fsij.org>
+
+ * lib/tmpdir.rb: update document for changing
+ FileUtils.remove_entry_secure to FileUtils.remove_entry.
+
+ * NEWS: add incompatibility note for lib/tmpdir.rb.
+
+Mon Mar 12 07:19:03 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * lib/tmpdir.rb (Dir.tmpdir): should not use world-writable but
+ non-sticky directory.
+
+ * lib/tmpdir.rb (Dir.mktmpdir): check the parent directory.
+
+Mon Mar 12 07:04:11 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * random.c (Init_Random): removed rb_Random_DEFAULT and register as
+ mark-object instead of global variable.
+
+Mon Mar 12 07:03:32 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * random.c (random_s_rand): ensure default PRNG is re-initialized
+ after fork. patched by Eric Wong. [ruby-core:41209][Bug #5661]
+
+Sun Mar 11 23:57:29 2012 NARUSE, Yui <naruse@ruby-lang.org>
+
+ * pack.c (pack_unpack): when unpack('M') occurs an illegal byte
+ sequence, output the "=" character and the following character in
+ the decoded data without any transformation.
+ [ruby-dev:44875] [Bug #5635]
+
+Sun Mar 11 22:32:43 2012 NARUSE, Yui <naruse@ruby-lang.org>
+
+ * ext/json: Merge 164a75c8bd2007d32c4d7665d53140d8fc126dcd.
+ [ruby-core:41917] [Bug #5846]
+
+Sun Mar 11 17:10:04 2012 Shota Fukumori <sorah@tubusu.net>
+
+ * lib/test/unit.rb: Put error message into STDERR if failed to launch
+ worker (job) process. [ruby-dev:44802] [Bug #5577]
+
+ * lib/test/unit/parallel.rb: If failed to increment_io, exit with code
+ 2. [ruby-dev:44802] [Bug #5577]
+
+Sun Mar 11 15:46:45 2012 Shota Fukumori <sorah@tubusu.net>
+
+ * io.c: fix rdoc of `IO.binwrite` to show same as `IO.write` except
+ it opens file with mode "wb:ASCII-8BIT". [Bug #5782] [ruby-core:42592]
+
+Sat Mar 10 23:52:28 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * st.c: pack tables also generic keys. patched by Sokolov Yura at
+ https://github.com/ruby/ruby/pull/84
+
+ * st.c: add st_foreach_check for fixing iteration over packed table
+ and st_delete_safe. patched by Sokolov Yura at
+ https://github.com/ruby/ruby/pull/84
+
+ * st.c: fix packed num_entries on delete_safe. patched by Sokolov
+ Yura at https://github.com/ruby/ruby/pull/84
+
+Fri Mar 9 14:29:32 2012 Shugo Maeda <shugo@ruby-lang.org>
+
+ * enumerator.c (lazy_flat_map): add Enumerable::Lazy#flat_map.
+
+Fri Mar 9 06:29:22 2012 Aaron Patterson <aaron@tenderlovemaking.com>
+
+ * ext/psych/lib/psych.rb (load, parse): stop parsing or loading after
+ the first document has been parsed.
+
+ * test/psych/test_stream.rb: pertinent tests.
+
+Fri Mar 9 06:17:05 2012 Aaron Patterson <aaron@tenderlovemaking.com>
+
+ * ext/psych/lib/psych.rb (parse_stream, load_stream): if a block is
+ given, documents will be yielded to the block as they are parsed.
+ [ruby-core:42404] [Bug #5978]
+
+ * ext/psych/lib/psych/handlers/document_stream.rb: add a handler that
+ yields documents as they are parsed
+
+ * test/psych/test_stream.rb: corresponding tests.
+
+Fri Mar 9 00:35:03 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * enumerator.c (lazy_initialize, enumerable_lazy): no additional
+ arguments.
+
+Fri Mar 9 00:30:23 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * enumerator.c: add Enumerable#lazy. based on the patch by
+ Innokenty Mikhailov at <https://github.com/ruby/ruby/pull/101>
+ [ruby-core:37164] [Feature #4890]
+
+Fri Mar 9 00:25:59 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * enumerator.c (enumerator_each, generator_each): pass arguments to
+ the block with yielder.
+
+Fri Mar 9 00:25:02 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * array.c (rb_ary_cat): new function to concat objects into array.
+
+Thu Mar 8 16:44:02 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * .gdbinit (rb_numtable_entry): update for recent refactoring of
+ st_table.
+
+Wed Mar 7 22:41:50 2012 CHIKANAGA Tomoyuki <nagachika00@gmail.com>
+
+ * lib/xmlrpc/client.rb (module XMLRPC): fix typo.
+
+ * test/xmlrpc/test_client.rb (test_async_call): add test for
+ XMLRPC::Client#call_async to check above fix.
+
+Wed Mar 7 16:30:24 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * error.c (rb_load_fail): should honor encoding.
+
+ * load.c (load_failed): ditto.
+
+Wed Mar 7 12:26:25 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * error.c (rb_load_fail): use path as a string, not char*.
+
+ * internal.h: (rb_load_fail): moved from ruby/intern.h.
+
+ * ruby.c (load_file_internal): fname cannot be NULL.
+
+Wed Mar 7 08:32:43 2012 Aaron Patterson <aaron@tenderlovemaking.com>
+
+ * error.c (rb_loaderror_with_path): Adding the missing file as an
+ instance variable to the LoadError exception.
+ [ruby-core:39079]
+
+ * load.c: call rb_loaderror_with_path so that the missing path is
+ added to the exception.
+
+ * ruby.c: call rb_loaderror rather than raising our own LoadError
+ exception.
+
+ * include/ruby/intern.h: add declaration for rb_loaderror_with_path.
+
+ * test/ruby/test_require.rb: add supporting test for LoadError#path
method.
- * io.c (set_outfile): $stdout/$stderr may not be IO now.
+Wed Mar 7 08:28:00 2012 Aaron Patterson <aaron@tenderlovemaking.com>
- * io.c (set_stdin): $stdin may not be IO now.
+ * lib/xmlrpc/parser.rb: support i8 types. Thanks Stas Kelvich!
+ [ruby-core:29246] [Feature #3090]
- * range.c (rb_range_beg_len): round `end' to length as documented.
+ * test/xmlrpc/test_client.rb: supporting test
- * io.c (Init_IO): preserve original stdin/stdout/stderr.
+Wed Mar 7 07:43:29 2012 Aaron Patterson <aaron@tenderlovemaking.com>
-Thu Aug 12 13:44:33 1999 Yukihiro Matsumoto <matz@netlab.co.jp>
+ * lib/xmlrpc/client.rb: assume servers that do not send a Content-Type
+ header are sending 'text/xml'. Thanks Nathan Leavitt!
+ [ruby-core:41204] [Bug #5660]
- * eval.c (Init_load): require receives 1 argument.
+ * test/xmlrpc/test_client.rb: supporting test
- * eval.c (frame_dup): should clear tmp to avoid dangling
- references.
+Wed Mar 7 07:39:28 2012 Aaron Patterson <aaron@tenderlovemaking.com>
-Wed Aug 11 13:33:13 1999 Katsuyuki Komatsu <komatsu@sarion.co.jp>
+ * test/xmlrpc/test_client.rb: adding a test for performing an XMLRPC
+ call.
+ * test/xmlrpc/data/blog.xml: supporting XML document for the response.
- * eval.c (rb_eval): no automatic aggregate initialization.
+Tue Mar 6 16:24:01 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * eval.c (module_setup): ditto.
+ * parse.y (parser_tokadd_string): escape simple regexp meta
+ character terminators.
-Wed Aug 11 18:18:41 1999 WATANABE Tetsuya <tetsu@jpn.hp.com>
+Tue Mar 6 10:11:43 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * eval.c (yield_under_i): automatic aggregate initialization is an
- ANSI feature.
+ * ext/io/console/console.c (set_rawmode): clear ECHOE and ECHOK
+ bits too.
-Wed Aug 11 10:10:02 1999 Yukihiro Matsumoto <matz@netlab.co.jp>
+ * ext/io/console/console.c (echo_p): ignore ECHOE and ECHOK bits.
+ [ruby-dev:45309] [Bug #6116]
- * parse.y (yylex): parse `[].length==0' as `([].length)==0', not
- `([].length=)=0'
+ * ext/io/console/console.c (console_raw): fix rdoc.
- * parse.y (yylex): parse `[].length!=0' as `([].length)!=0', not
- `([].length!)=0'
+ * ext/io/console/console.c (console_set_echo): mentioned about
+ platform dependency.
- * parse.y (peek): peek-in lexical buffer.
+Tue Mar 6 07:18:10 2012 Aaron Patterson <aaron@tenderlovemaking.com>
-Wed Aug 11 00:34:05 1999 Yukihiro Matsumoto <matz@netlab.co.jp>
+ * lib/xmlrpc/client.rb: switch net/http post2 calls to modern
+ `request_post` methods.
- * regex.c (re_match): bug on backward jump adjustment concerning
- stop_paren.
+Tue Mar 6 02:31:20 2012 Aaron Patterson <aaron@tenderlovemaking.com>
-Tue Aug 10 14:54:25 1999 Yukihiro Matsumoto <matz@netlab.co.jp>
+ * ext/psych/lib/psych/core_ext.rb: only extend Kernel if IRB is loaded
+ in order to stop method pollution.
- * ext/nkf/nkf.c (rb_nkf_guess): binary detection was wrong.
+Tue Mar 6 01:34:19 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Tue Aug 10 00:07:36 1999 Yukihiro Matsumoto <matz@netlab.co.jp>
+ * parse.y (block_call): rules for block_call after block_call.
+ based on a patch by pasberth https://github.com/ruby/ruby/pull/102
+ [ruby-dev:45308][Bug #6115]
- * io.c (rb_io_clone): should use CLONESETUP().
+Tue Mar 6 01:24:13 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Mon Aug 9 23:57:07 1999 Yukihiro Matsumoto <matz@netlab.co.jp>
+ * parse.y (block_command, block_call): simplified rules.
- * ruby.h (CLONESETUP): should have copied generic instance
- variables too.
+Mon Mar 5 18:28:35 2012 Kazuhiro NISHIYAMA <zn@mbf.nifty.com>
-Mon Aug 9 10:46:54 1999 Katsuyuki Komatsu <komatsu@sarion.co.jp>
+ * test/ruby/test_regexp.rb (TestRegexp#test_source): fix typo.
+ * test/ruby/test_regexp.rb (TestRegexp#test_equal): ditto.
- * ext/socket/extconf.rb: add check for <arpa/nameser.h> and
- <resolv.h>.
+Mon Mar 5 17:11:44 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Sat Aug 7 13:19:06 1999 EGUCHI Osamu <eguchi@shizuokanet.ne.jp>
+ * ext/syck/lib/syck/rubytypes.rb (Exception.yaml_new): fix bug
+ that causes YAML serialization problem for Exception.
+ Exception#initialize doesn't use visible instance variable for
+ the exception message, so call the method with the message.
+ patched by Jingwen Owen Ou <jingweno AT gmail.com>.
+ http://github.com/ruby/ruby/pull/41
- * numeric.c (flo_cmp): comparing NaN should not return value.
- raises FloatDomainError.
+Mon Mar 5 16:50:22 2012 NAKAMURA Usaku <usa@ruby-lang.org>
-Sat Aug 7 03:09:08 1999 Yukihiro Matsumoto <matz@netlab.co.jp>
+ * test/ruby/test_sleep.rb (TestSleep#test_sleep_5sec): syntax error.
- * eval.c (blk_free): free copied frames too.
+ * test/ruby/test_sleep.rb (TestSleep#test_sleep_5sec): call uname
+ only on linux because it's a workaround for linux only.
- * eval.c (frame_dup): should copy previous frames from stack to
- heap to preserve frame information.
+Mon Mar 5 12:44:12 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Fri Aug 6 15:01:07 1999 Yukihiro Matsumoto <matz@netlab.co.jp>
+ * st.c (unpack_entries): chain entries directly. based on a patch
+ by Sokolov Yura <funny.falcon AT gmail.com>.
- * version 1.3.7 - version 1.4 beta
+ * st.c (unpack_entries): use union instead of casted pointer.
+ patched by Sokolov Yura <funny.falcon AT gmail.com>.
- * ext/socket/socket.c (s_recv): UDPsocket#recvfrom now returns
- IPsocket#addr information.
+ * st.c: use PACKED_ENT and FIND_ENTRY. patched by Sokolov
+ Yura <funny.falcon AT gmail.com>.
- * array.c (rb_ary_subary): ary[-3,3] should not return nil.
+ * st.c (unpack_entries): reallocate bins if packed array size
+ is not same as initial bins size. based on a patch by
+ Sokolov Yura <funny.falcon AT gmail.com>.
-Thu Aug 5 10:58:01 1999 Yukihiro Matsumoto <matz@netlab.co.jp>
+Mon Mar 5 11:51:48 2012 NARUSE, Yui <naruse@ruby-lang.org>
- * eval.c (thread_mark): protect old ruby_frame from GC during it
- replaced by eval().
+ * ext/bigdecimal/lib/bigdecimal/math.rb: remove description about
+ BigMath#log. patched by Sho Hashimoto [ruby-dev:45307] [Bug #6112]
- * eval.c (eval): do not modify frame.prev; binding should preserve
- information about calling() too.
+ * string.c (str_byteslice): fix typo.
- * eval.c (rb_yield_0): no arity check for mere yield; but only for
- Proc#call.
+Sun Mar 4 23:21:10 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Tue Aug 3 22:07:13 1999 Kazuhiro HIWADA <hiwada@kuee.kyoto-u.ac.jp>
+ * parse.y (parser_tokadd_string): regexp engine doesn't need
+ terminators to be escaped. [ruby-core:40364][Bug #5484]
- * object.c (rb_mod_clone): should check if iv_tbl, m_tbl are
- initialized.
+Sat Mar 3 22:51:46 2012 Tanaka Akira <akr@fsij.org>
-Tue Aug 3 19:03:02 1999 Yukihiro Matsumoto <matz@netlab.co.jp>
+ * process.c (rb_run_exec_options_err): chdir at last to interpret
+ relative pathnames from the current directory of the parent process.
- * hash.c (rb_any_cmp): use rb_with_disable_interrupt() to ensure
- clearance of rb_prohibit_interrupt even on failure.
+Sat Mar 3 12:20:44 2012 Tadayoshi Funaba <tadf@dotrb.org>
- * eval.c (rb_with_disable_interrupt): new function added.
+ * ext/date/date_strftime.c: reassigned some variables.
-Sat Jul 31 23:23:44 1999 Yukihiro Matsumoto <matz@netlab.co.jp>
+Sat Mar 3 12:12:16 2012 Tadayoshi Funaba <tadf@dotrb.org>
- * eval.c (rb_thread_create_0): set THREAD_RAISED flag on thread
- termination by exception.
+ * ext/date/date_{parse,strptime}.c: [ruby-dev:45303].
- * eval.c (rb_thread_join): `$!' may not be nil for the threads
- created in rescue clause.
+Sat Mar 3 10:09:21 2012 Aaron Patterson <aaron@tenderlovemaking.com>
- * eval.c (rb_thread_status): ditto.
+ * lib/xmlrpc/client.rb (initialize): net/http defaults to 1_2 in 1.8+,
+ so we can safely remove the call to enable it.
- * eval.c (rb_thread_join): should re-raise exception for already
- dead threads too.
+Sat Mar 3 08:42:25 2012 Aaron Patterson <aaron@tenderlovemaking.com>
-Fri Jul 30 17:56:54 1999 GOTO Kentaro <gotoken@math.sci.hokudai.ac.jp>
+ * lib/xmlrpc/client.rb (new2): use URI for uri parsing.
+ * test/xmlrpc/test_client.rb: test that query params are passed to the
+ client constructor.
- * object.c (rb_mod_ge): wrong comparison.
+Sat Mar 3 08:20:10 2012 Aaron Patterson <aaron@tenderlovemaking.com>
-Fri Jul 30 12:15:44 1999 Katsuyuki Komatsu <komatsu@sarion.co.jp>
+ * lib/xmlrpc/client.rb (new2): raises an ArgumentError on bad
+ arguments.
+ * test/xmlrpc/test_client.rb: tests for bad uris
- * ext/tcltklib/extconf.rb: win32 support.
+Sat Mar 3 08:08:11 2012 Aaron Patterson <aaron@tenderlovemaking.com>
- * lib/mkmf.rb: use append_library().
+ * lib/xmlrpc/client.rb (new2): fix custom port specification when an
+ SSL uri is used.
+ * test/xmlrpc/test_client.rb: tests for XMLRPC::Client.new2
- * ext/extmk.rb.in: ditto.
+Sat Mar 3 08:03:29 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Fri Jul 30 02:11:48 1999 Yukihiro Matsumoto <matz@netlab.co.jp>
+ * ext/syck/rubyext.c (mktime_do): use ISDIGIT().
+ [ruby-core:43060] [Bug #6108]
- * array.c (rb_ary_delete): should return nil for deleting non
- existing item.
+ * ext/syck/token.c (sycklex_yaml_utf8): cast as unsigned char.
+ [ruby-core:43060] [Bug #6108]
- * io.c (rb_io_close): call rb_sys_wait() on explicit close.
+Sat Mar 3 06:57:14 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * io.c (rb_io_fptr_close): do not call rb_sys_wait() on finalize.
+ * configure.in (ruby_pc): make configurable. [Bug #6051]
- * eval.c (yield_under_i): cbase context should be maintained for
- Module#module_eval(). suggested by <inaba@st.rim.or.jp>.
+Fri Mar 2 17:49:03 2012 Hiroshi Nakamura <nahi@ruby-lang.org>
-Wed Jul 28 01:18:28 1999 WATANABE Hirofumi <watanabe@ase.ptg.sony.co.jp>
+ * .travis.yml (branches): Enable TravisCI for ruby_1_9_3.
- * Makefile.in: add -I$(hdrdir)/lib to install using ftools.
+Fri Mar 2 17:13:33 2012 Hiroshi Nakamura <nahi@ruby-lang.org>
- * util.c: use HAVE_FCNTL_H, not HAVE_FCNTL
+ * test/ruby/test_array.rb (test_combination2): Make the test case for
+ [ruby-core:29240] more descriptive.
+ cf. http://bugs.jruby.org/6518
-Wed Jul 28 18:24:45 1999 Yukihiro Matsumoto <matz@netlab.co.jp>
+Fri Mar 2 16:37:11 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * version 1.3.6 - version 1.4 alpha
+ * file.c (file_expand_path): use wcscasecmp().
-Tue Jul 27 09:38:08 1999 EGUCHI Osamu <eguchi@shizuokanet.ne.jp>
+Fri Mar 2 16:36:31 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * eval.c (rb_eval): reduce recursive rb_eval() calls by
- NODE_BLOCKs.
+ * thread_pthread.c (native_cond_timeout): cast explicitly to suppress
+ a warning.
-Tue Jul 27 01:20:40 1999 WATANABE Hirofumi <watanabe@ase.ptg.sony.co.jp>
+Fri Mar 2 16:35:56 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * file.c (rb_file_s_expand_path): drive letter patch.
+ * io.c (pipe_open): cmd is no longer used if fork is available.
-Mon Jul 26 02:36:31 1999 Shugo Maeda <shugo@netlab.co.jp>
+Thu Mar 1 16:13:18 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * eval.c (rb_load): should clear ruby_nerr.
+ * internal.h (rb_file_const, rb_file_load_ok): moved functions for
+ internal use only.
- * eval.c (rb_thread_join): oldbt should not be empty to unshift.
+Thu Mar 1 15:40:05 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Sun Jul 25 12:09:16 1999 Koji Arai <JCA02266@nifty.ne.jp>
+ * win32/makedirs.bat: new command to make intermediate
+ directories, and not to report any errors if the directory
+ already exists.
- * dir.c (push_braces): should treat nested braces.
+ * win32/Makefile.sub (MAKEDIRS): enable command extensions.
-Fri Jul 23 02:49:49 1999 Yukihiro Matsumoto <matz@netlab.co.jp>
+Thu Mar 1 01:25:43 2012 NARUSE, Yui <naruse@ruby-lang.org>
- * hash.c (rb_hash_clear): dummy argument added; suggested by
- <eguchi@shizuokanet.ne.jp>. thanks.
+ * regparse.c (is_onechar_cclass): optimize character class
+ Merge Onigmo 27278c12e6674043cc8affca6507e20e119a86ee.
-Thu Jul 22 19:37:22 1999 Yukihiro Matsumoto <matz@netlab.co.jp>
+ * regparse.c (is_onechar_cclass): [bug] unexpected match occurs when a
+ char class contains no char
- * eval.c (rb_thread_join): get_backtrace() may return Qnil.
- typecheck added.
+ * enc/unicode.c (init_case_fold_table): define the sizes of case
+ folding tables in casefold.h
-Tue Jul 20 14:36:43 1999 WATANABE Hirofumi <watanabe@ase.ptg.sony.co.jp>
+Wed Feb 29 16:11:34 2012 NAKAMURA Usaku <usa@ruby-lang.org>
- * range.c (range_each): do not treat String specially (for future
- override).
+ * win32/Makefile.sub (MAKEDIRS): use mkdir of cmd.exe instead of ruby.
+ [Bug #6103] [ruby-core:43012]
-Tue Jul 20 02:28:34 1999 Yukihiro Matsumoto <matz@netlab.co.jp>
+ * win32/README.win32: added a notice about command extension of cmd.exe.
- * io.c (rb_gets): $_ should be nil, when get returns nil.
+Wed Feb 29 15:39:39 2012 NAKAMURA Usaku <usa@ruby-lang.org>
- * io.c (rb_f_gets): ditto.
+ * test/ruby/test_io.rb (TestIO#test_readpartial_locktmp): skip on
+ windows because of the platform restriction.
-Mon Jul 19 17:13:09 1999 Yukihiro Matsumoto <matz@netlab.co.jp>
+Wed Feb 29 15:38:50 2012 NAKAMURA Usaku <usa@ruby-lang.org>
- * regex.c (re_compile_fastmap): should continue fastmap compile
- for anychar_repeat, for it's repeat anyway.
+ * test/ruby/memory_status.rb (Memory): syntax error.
-Mon Jul 26 13:33:45 1999 WATANABE Hirofumi <watanabe@ase.ptg.sony.co.jp>
+Wed Feb 29 13:06:42 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * lib/jcode.rb: replaced by faster code.
+ * test/ruby/memory_status.rb: use /proc/self/status if it is in
+ the expected format.
-Mon Jul 19 01:57:28 1999 Yukihiro Matsumoto <matz@netlab.co.jp>
+Wed Feb 29 06:14:51 2012 Tadayoshi Funaba <tadf@dotrb.org>
- * lib/mkmf.rb: no longer use install program.
+ * ext/date/date_core.c: reverted r34825.
- * ext/extmk.rb.in: use miniruby to install programs.
+Tue Feb 28 23:20:01 2012 Hiroshi Shirosaki <h.shirosaki@gmail.com>
-Sat Jul 17 00:06:21 1999 Yukihiro Matsumoto <matz@netlab.co.jp>
+ * Makefile.in (PLATFORM_DIR): add a variable for `win32` directory.
+ * Makefile.in (clean-platform): add new target.
+ It cleans `win32` directory.
- * ext/socket/socket.c (ipaddr): don't do reverse lookup if
- attribute do_not_reverse_lookup is set for socket classes.
- Experimental. Note this is a global attribute.
+ * common.mk (clean): add a dependency for `win32` directory.
+ * common.mk (distclean): ditto.
+ * common.mk (distclean-platform): add new target.
+ It cleans `win32` directory.
+ * common.mk ($(PLATFORM_D)): add new target to make `win32` directory.
+ * common.mk (win32/win32.$(OBJEXT)): move win32.o into `win32`
+ directory.
+ * common.mk (win32/file.$(OBJEXT)): add new target for win32/file.c.
-Fri Jul 16 22:18:29 1999 Yukihiro Matsumoto <matz@netlab.co.jp>
+ * configure.in: move win32.o into `win32` directory and add
+ win32/file.o to MISSING.
- * io.c (rb_io_eof): use feof() to check EOF already met.
+ * file.c (file_load_ok, rb_file_load_ok): replace static
+ file_load_ok() with public rb_file_load_ok().
+ It's to link Windows implementation in win32/file.c.
+ * file.c (rb_find_file_ext_safe): ditto.
+ * file.c (rb_find_file_safe): ditto.
- * io.c (read_all): should return nil at EOF.
+ * win32/file.c (rb_file_load_ok): new file. Add Windows specific
+ optimized implementation of rb_file_load_ok(). We created a
+ separated file to avoid too many #ifdef macro which is unreadable.
-Fri Jul 16 13:39:42 1999 Wakou Aoyama <wakou@fsinet.or.jp>
+ * win32/Makefile.sub (PLATFORM_DIR): add a variable for `win32`
+ directory.
+ * win32/Makefile.sub (MISSING): move win32.obj into `win32`
+ directory and add win32/file.obj to MISSING.
+ * win32/Makefile.sub (MAKEDIRS): replace MINIRUBY with BASERUBY.
+ It's because miniruby doesn't exist when making `win32` directory.
+ * win32/Makefile.sub (clean-platform): add new target to clean `win32`
+ directory.
+ * win32/Makefile.sub ({$(srcdir)}.c{}.obj): make it not match
+ win32/file.c to build properly.
+ * win32/Makefile.sub (win32/win32.$(OBJEXT)): move win32.obj into
+ `win32` directory.
- * lib/telnet.rb: version 0.231.
+ Patch created with Luis Lavena.
+ [ruby-core:42480] [Feature #5999]
-Fri Jul 16 10:58:22 1999 WATANABE Tetsuya <tetsu@jpn.hp.com>
+Tue Feb 28 20:27:25 2012 Tadayoshi Funaba <tadf@dotrb.org>
- * regex.c (re_match): debug print removed.
+ * ext/date/date_core.c: [ruby-core:42998]
-Fri Jul 16 09:58:15 1999 Katsuyuki Komatsu <komatsu@sarion.co.jp>
+Tue Feb 28 18:47:44 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * many files: clean up unused variables found by gcc -Wall.
+ * io.c (io_binwrite, rb_io_syswrite): use shared frozen source
+ strings.
- * lib/mkmf.rb: better cygwin support etc.
+ * io.c (io_fread, io_getpartial, rb_io_sysread): set buffer size
+ after check if readable, which can cause thread switch.
+ [ruby-dev:45297][Bug #6099]
- * ext/extmk.rb.in: ditto.
+Tue Feb 28 17:16:01 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * instruby.rb: ditto.
+ * lib/time.rb (Time#xmlschema): use strftime specifiers instead of
+ fractional exponential calculation which yields undesirable
+ result. [ruby-core:42997][Bug #6100]
-Fri Jul 16 01:37:50 1999 Koji Arai <JCA02266@nifty.ne.jp>
+Tue Feb 28 14:15:29 2012 Eric Hodel <drbrain@segment7.net>
- * string.c (rb_str_squeeze_bang): the type of local variable `c'
- should be int, not char.
+ * lib/net/protocol.rb: Add OpenTimeout subclass of Timeout::Error
+ * lib/net/pop.rb: Modernize Timeout usage. Patch by Eric Wong.
+ Use Net::OpenTimeout instead of Timeout::Error. [Bug #5765]
+ * lib/net/http.rb: ditto
+ * lib/net/smtp.rb: ditto
+ * lib/net/telnet.rb: ditto
- * string.c (rb_str_reverse): should always return copy.
+Tue Feb 28 13:51:12 2012 Eric Hodel <drbrain@segment7.net>
-Thu Jul 15 23:25:57 1999 NAKAMURA Hiroshi <nakahiro@sarion.co.jp>
+ * lib/net/http.rb: Retry HTTP requests for additional network errors.
+ Introduce OpenTimeout subclass of Timeout::Error. [Bug #6001]
+ * test/net/http/test_http.rb: Reduce timeout to 0.01s for faster test
+ * test/net/http/test_https.rb: ditto
- * lib/debug.rb: better display & frame treatment.
+Tue Feb 28 11:44:49 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Thu Jul 15 21:16:41 1999 Yukihiro Matsumoto <matz@netlab.co.jp>
+ * configure.in (debugflags): check if -ggdb is accepted.
+ [ruby-core:42875][Bug #6080]
- * array.c (rb_ary_each): returns self for normal termination;
- returns nil for break.
+Tue Feb 28 10:28:51 2012 Aaron Patterson <aaron@tenderlovemaking.com>
- * string.c: non bang methods (e.g. String#sub) should always
- return copy of the receiver.
+ * ext/psych/lib/psych.rb: default open YAML files with utf8 external
+ encoding. [ruby-core:42967]
+ * test/psych/test_tainted.rb: ditto
-Thu Jul 15 21:09:15 1999 Masaki Fukushima <fukusima@goto.info.waseda.ac.jp>
+Mon Feb 27 23:46:09 2012 Yukihiro Matsumoto <matz@ruby-lang.org>
- * eval.c (find_file): do not add empty string to the path.
+ * parse.y (opt_bv_decl): allow newline at the end. [ruby-dev:45292]
- * configure.in (with-search-path): should not add empty string if
- the option is not supplied.
+Mon Feb 27 20:43:05 2012 NAKAMURA Usaku <usa@ruby-lang.org>
-Thu Jul 15 17:49:08 1999 Ryo HAYASAKA <hayasaka@univ21.u-aizu.ac.jp>
+ * io.c (rb_io_set_pos): add rdoc about textmode.
- * ext/tcltklib/tcltklib.c: move `#include "ruby.h"' forward.
+ * test/ruby/test_io.rb (TestIO#test_setpos): use binmode.
-Thu Jul 15 16:54:16 1999 Yukihiro Matsumoto <matz@netlab.co.jp>
+Mon Feb 27 17:00:15 2012 Akinori MUSHA <knu@iDaemons.org>
- * version 1.3.5 - version 1.4 alpha
+ * string.c (rb_str_crypt): Update rdoc and state that this
+ function is system dependent. Reviewed by nobu, thanks to
+ @takai.
-Wed Jul 14 23:45:33 1999 Katsuyuki Komatsu <komatsu@sarion.co.jp>
+Mon Feb 27 17:03:20 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * eval.c (ruby_init): initialize for the first time only.
+ * ext/bigdecimal/bigdecimal.c (GetVpValueWithPrec): since methods
+ can be overridden, so should not make an assumption on the type
+ of results. [ruby-core:42969][Bug #6093]
-Tue Jul 13 00:15:19 1999 Yukihiro Matsumoto <matz@netlab.co.jp>
+Mon Feb 27 10:54:20 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * hash.c (rb_hash_index): re-defined; method to retrieve a key
- from the value.
+ * lib/mkmf.rb (try_cppflags, try_cflags, try_ldflags): replace the
+ target flags if the given flag is accepted.
- * hash.c (Init_Hash): member? should be re-defined for Hash.
+Mon Feb 27 10:53:44 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Tue Jul 12 13:54:51 1999 EGUCHI Osamu <eguchi@shizuokanet.ne.jp>
+ * test/rubygems/test_gem_specification.rb (test_self_from_yaml_syck_default_key_bug):
+ ignore the test for too old versions.
- * io.c (rb_file_sysopen): wrong number of argument.
+Mon Feb 27 10:53:12 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Mon Jul 12 11:52:35 1999 Yukihiro Matsumoto <matz@netlab.co.jp>
+ * lib/test/unit.rb (Test::Unit::Runner#puke): skips with no
+ messages should be trivial.
- * eval.c (rb_f_missing): class name included in message.
+Mon Feb 27 10:50:23 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * eval.c (print_undef): better error message.
+ * io.c, process.c, time.c, ext: use rb_sys_fail_str instead of
+ rb_sys_fail.
-Sun Jul 11 05:36:17 1999 NAKAMURA, Hiroshi <nakahiro@sarion.co.jp>
+Mon Feb 27 10:48:49 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * lib/debug.rb: patch to show proper position.
+ * ext/openssl/extconf.rb: suppress useless deprecation warnings
+ from OpenSSL added by Apple.
-Fri Jul 9 23:56:14 1999 WATANABE Hirofumi <eban@os.rim.or.jp>
+Sun Feb 26 23:29:49 2012 NARUSE, Yui <naruse@ruby-lang.org>
- * dln.c (dln_find_1): path conv. moved to conv_to_posix_path.
+ * regparse.c (add_code_range_to_buf0): wrong condition of duplicated
+ warnings.
- * dln.c (conv_to_posix_path): path conv. should be done.
+Sun Feb 26 11:26:44 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Fri Jul 9 10:26:47 1999 WATANABE Hirofumi <watanabe@ase.ptg.sony.co.jp>
+ * compile.c (iseq_compile_each): call on special object instead of
+ self. since stabby lambda is a syntax, so it should not be
+ affected by the context. [ruby-core:42349][Bug #5966]
- * random.c (RANDOM_NUMBER): should place parentheses.
+ * insns.def (send): no special deal for FCALL. self should be put
+ on TOS instead.
-Fri Jul 8 11:00:51 1999 Shugo Maeda <shugo@netlab.co.jp>
+Sun Feb 26 05:35:43 2012 NARUSE, Yui <naruse@ruby-lang.org>
- * numeric.c (fix_div): division may be out of fixnum range.
+ * error.c (report_bug): use buf and snprintf to avoid consuming stack.
+ [ruby-dev:45272] [Bug #6058]
- * bignum.c (bigdivmod): proper sign calculation to result.
+Sat Feb 25 17:41:19 2012 Tanaka Akira <akr@fsij.org>
-Wed Jul 7 18:27:41 1999 Yukihiro Matsumoto <matz@netlab.co.jp>
+ * ext/dbm/extconf.rb (headers): try ambiguous headers at last.
- * st.c (st_delete_safe): was modifying wrong slot.
+Sat Feb 25 17:07:15 2012 NARUSE, Yui <naruse@ruby-lang.org>
-Mon Jul 5 13:17:46 1999 Yukihiro Matsumoto <matz@netlab.co.jp>
+ * lib/fileutils.rb: use chomp(?/) instead of sub to optimize and avoid
+ to regexping invalid string.
- * gc.c (rb_gc_call_finalizer_at_exit): close all files at exit.
+Sat Feb 25 16:18:24 2012 NARUSE, Yui <naruse@ruby-lang.org>
-Fri Jul 2 18:00:21 1999 Minero Aoki <aamine@dp.u-netsurf.ne.jp>
+ * complex.c (nucomp_marshal_load): raise error on invalid data.
+ reported by John Firebaugh [ruby-core:42860] [Bug #6076]
- * lib/Mail/README: Mail-0.3.0 added to the distribution.
+Sat Feb 25 14:46:54 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Fri Jul 2 01:45:32 1999 Yukihiro Matsumoto <matz@netlab.co.jp>
+ * ext/dl/dl.c (Init_dl): support intrinsic types, size_t, ptrdiff_t
+ and intptr_t. [ruby-core:42460][Feature #5992]
- * regex.c (re_compile_fastmap): avoid allocation of register
- variables for each invocation of re_match(). Suggested by
- Zasukhin Ruslan <ruslan@paradigmasoft.com>. Thanks.
+ * ext/fiddle/fiddle.c (Init_fiddle): ditto.
-Tue Jun 29 20:39:24 1999 Koji Arai <JCA02266@nifty.ne.jp>
+ * ext/dl/lib/dl/cparser.rb (DL::CParser#parse_ctype): ditto.
- * ext/tk/lib/tk.rb (TkVariable): bug fix; should value type check
- be added?
+Sat Feb 25 11:08:28 2012 Tanaka Akira <akr@fsij.org>
- * string.c (rb_str_each_line): a bug in paragraph mode.
+ * ext/curses/curses.c (Init_curses): use rb_define_const once for
+ Curses::VERSION.
- * ruby.c (load_file): shifted too much to skip #!.
+ * ext/dbm/dbm.c (Init_dbm): ditto for DBM::VERSION.
-Tue Jun 29 06:50:21 1999 Wakou Aoyama <wakou@fsinet.or.jp>
+Sat Feb 25 10:34:22 2012 Tanaka Akira <akr@fsij.org>
- * lib/CGI.rb: 0.30 - cleanup release, incompatible.
+ * ext/curses/curses.c (Init_curses): make Curses::VERSION
+ understandable without context.
- * lib/telnet.rb: 0.22 - timeout added.
+ * ext/dbm/dbm.c (Init_dbm): ditto for DBM::VERSION.
-Tue Jun 29 10:49:25 1999 SHIROYAMA Takayuki <psi@fortune.nest.or.jp>
+Sat Feb 25 07:53:58 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * configure.in: better Rhapsody support.
+ * parse.y (parser_tokadd_string): insert a backslash only if
+ quoted by single quotes. [ruby-dev:45281] [Bug #6069]
- * lib/mkmf.rb: Rhapsody/NEXTSTEP support.
+Sat Feb 25 07:53:49 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Tue Jun 29 01:42:13 1999 Yukihiro Matsumoto <matz@netlab.co.jp>
+ * dir.c (dir_inspect), io.c (rb_io_inspect): keep encoding of path.
+ [Bug #6072]
- * ext/pty/pty.c (chld_changed): should use POSIX.1 style wait.
+Sat Feb 25 07:53:40 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Mon Jun 28 21:07:36 1999 KIMURA Koichi <kbk@kt.rim.or.jp>
+ * dir.c (dir_initialize): keep path in original encoding.
- * ext/extmk.rb.nt: wrong result for have_library().
+ * error.c (syserr_initialize): prefer the encoding of message over
+ locale. [ruby-dev:45279][Bug #6071]
-Mon Jun 28 15:24:05 1999 Yukihiro Matsumoto <matz@netlab.co.jp>
+Sat Feb 25 06:55:29 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * missing/isinf.c: OSF/1 raises SIGFPE on one()/zero().
+ * file.c (utime_internal): fix a variable missed to replace.
+ [ruby-core:42864] [Bug #6077]
- * regex.c (re_search): should search til EOS, for patterns may
- match beyond the end of range.
+Fri Feb 24 18:21:55 2012 Hiroshi Nakamura <nahi@ruby-lang.org>
-Mon Jun 28 12:49:12 1999 Yukihiro Matsumoto <matz@netlab.co.jp>
+ * test/zlib/test_zlib.rb (TestZlibGzipReader#test_encoding): Add
+ encoding testcases for GzipReader#read. read() emits
+ Encoding.default_external in contrast to read(size) emits BINARY.
+ See also: http://bugs.jruby.org/6208
- * io.c (rb_f_select): should not accept Time objects as an
- argument for it is time interval.
+Fri Feb 24 17:56:39 2012 URABE Shyouhei <shyouhei@ruby-lang.org>
- * process.c (rb_f_sleep): ditto.
+ * test/ruby/test_literal.rb (TestRubyLiteral#test_special_const):
+ test for https://bugs.php.net/bug.php?id=61095
- * file.c (test_s): should return nil for false condition.
+Fri Feb 24 16:48:29 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Mon Jun 28 12:23:52 1999 Katsuyuki Komatsu <komatsu@sarion.co.jp>
+ * dir.c, file.c, io.c (rb_sys_fail_path): use rb_sys_fail_str.
- * bignum.c (rb_dbl2big): typo.
+ * error.c: new functions to deal exceptions with string instances.
- * file.c (rb_f_test): ditto.
+ * dir.c, file.c, io.c: use rb_sys_fail_path.
- * string.c (rb_str_crypt): wrong message.
+Fri Feb 24 15:49:07 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Sun Jun 27 19:50:11 1999 Tadayoshi Funaba <tadf@kt.rim.or.jp>
+ * configure.in (__builtin_unreachable): check for clang.
+ [ruby-core:42849]
- * eval.c (rb_f_exit): should have treat signed integer status, not
- VALUE.
+ * include/ruby/ruby.h (UNREACHABLE): fallback definition.
- * process.c (rb_f_exit_bang): should work like exit().
+Fri Feb 24 13:54:33 2012 Aaron Patterson <aaron@tenderlovemaking.com>
-Sun Jun 27 16:21:32 1999 WATANABE Hirofumi <eban@os.rim.or.jp>
+ * ext/psych/parser.c: prevent a memory leak by protecting calls to
+ handler callbacks.
+ * test/psych/test_parser.rb: test to demonstrate leak.
- * string.c (rb_str_rindex): wrong position to search.
+Fri Feb 24 12:07:34 2012 Ayumu AIZAWA <ayumu.aizawa@gmail.com>
-Sat Jun 26 04:05:30 1999 Takaaki Tateishi <ttate@jaist.ac.jp>
+ * lib/net/http.rb: Fix documentation. Patched from Florian Mhun
+ via http://github.com/ruby/ruby/pull/96
- * configure.in (configure_args): --with-search-path to specify
- additional ruby search path.
+Fri Feb 24 11:48:07 2012 Ayumu AIZAWA <ayumu.aizawa@gmail.com>
- * ruby.c (ruby_prog_init): additional search path.
+ * string.c (rb_str_prepend): Fix documentation for String#prepend.
+ Patched from Franck Verrot via http://github.com/ruby/ruby/pull/98
+ and Andrew Horsman via http://github.com/ruby/ruby/pull/55
-Fri Jun 25 13:09:12 1999 Yukihiro Matsumoto <matz@netlab.co.jp>
+Fri Feb 24 10:08:33 2012 Eric Hodel <drbrain@segment7.net>
- * pack.c (pack_unpack): needed to initialize natint.
+ * lib/net/http.rb (Net::HTTP#transport_request): Fix infinite loop
+ upon EOFError or Errno::ECONNRESET where count is reset to 0.
+ * test/net/http/test_http.rb (class TestNetHTTPKeepAlive): Test for
+ above.
- * regex.c (re_compile_pattern): add start_paren to avoid too much
- finalization on maybe_finalize_jump.
+Fri Feb 24 09:05:40 2012 Eric Hodel <drbrain@segment7.net>
-Fri Jun 25 13:07:20 1999 Koji Oda <oda@bsd1.qnes.nec.co.jp>
+ * complex.c (Init_Complex): Document Complex::I. Patch by Sylvain
+ Daubert. [Feature #5623]
- * missing/isinf.c: include "config.h" added.
+Fri Feb 24 08:52:09 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Fri Jun 25 07:25:05 1999 Katsuyuki Komatsu <komatsu@sarion.co.jp>
+ * parse.y (parser_tokadd_string, parser_yylex): insert a backslash
+ if the next character is non-ascii. [ruby-dev:45278] [Bug #6069]
- * lib/mkmf.rb: initialize $(topdir).
+Fri Feb 24 08:13:20 2012 Eric Hodel <drbrain@segment7.net>
- * ext/extmk.rb.in (install_rb): install lib/*.rb properly.
+ * lib/profiler.rb: Add Profiler documentation by Gonzalo Rodriguez.
+ [Bug #5816]
- * configure.in (linux): specifies -rpath on --enable-shared.
+Fri Feb 24 08:08:38 2012 Aaron Patterson <aaron@tenderlovemaking.com>
- * configure.in (aix): ruby.imp must reside in $(topdir).
+ * ext/psych/parser.c: set parser encoding based on the YAML input
+ rather than user configuration.
+ * test/psych/test_encoding.rb: corresponding tests.
+ * test/psych/test_parser.rb: ditto
+ * test/psych/test_tainted.rb: ditto
-Thu Jun 24 19:11:29 1999 Yoshida Masato <yoshidam@yoshidam.net>
+Fri Feb 24 08:02:52 2012 Eric Hodel <drbrain@segment7.net>
- * parse.y (rb_str_extend): multi-byte identifier in expression
- interpolation in strings.
+ * hash.c (Init_Hash): Add section on how objects are used as Hash keys
+ and how to use custom classes as Hash keys.
- * parse.y (yylex): support multi-byte char identifiers.
+Fri Feb 24 07:36:11 2012 Eric Hodel <drbrain@segment7.net>
-Thu Jun 24 15:27:13 1999 Yukihiro Matsumoto <matz@netlab.co.jp>
+ * object.c (rb_obj_eql): Improve equality documentation by adding an
+ example of equal? vs == and recommending eql? be aliased to == when
+ overridden.
- * parse.y (f_arg): check duplicate argument names.
+Fri Feb 24 07:21:15 2012 Eric Hodel <drbrain@segment7.net>
- * gc.c (rb_gc_mark): marking wrong member for NODE_ARGS.
+ * object.c (rb_obj_hash): Added note that the hash value is not
+ deterministic on Marc-Andre's suggestion. Expanded description of
+ the purpose of the hash method. [Bug #6068]
- * string.c (rb_str_rindex): POSITION specifies start point, not
- end point.
+Thu Feb 23 23:01:21 2012 Tanaka Akira <akr@fsij.org>
-Thu Jun 24 13:00:17 1999 Yukihiro Matsumoto <matz@netlab.co.jp>
+ * ext/dbm/extconf.rb: unused macro removed.
- * regex.c (print_mbc): wrong boundary.
+Thu Feb 23 22:26:53 2012 Tanaka Akira <akr@fsij.org>
- * pack.c (uv_to_utf8): raises ArgError for too big value.
+ * test/test_curses.rb: new file.
-Thu Jun 24 11:02:51 1999 Yoshida Masato <yoshidam@yoshidam.net>
+Thu Feb 23 19:57:56 2012 Tanaka Akira <akr@fsij.org>
- * pack.c (uv_to_utf8): mask needed.
+ * ext/curses/rain.rb: trap SIGHUP, SIGINT, SIGQUIT and SIGTERM only.
-Wed Jun 23 21:03:56 1999 Tadayoshi Funaba <tadf@kt.rim.or.jp>
+Thu Feb 23 19:56:48 2012 Tanaka Akira <akr@fsij.org>
- * ruby.h (struct RFile): remove iv_tbl from struct. instance
- variables are handled as generic ivs.
+ * signal.c (sig_trap): show signal name on error.
-Wed Jun 23 22:06:26 1999 Tadayoshi Funaba <tadf@kt.rim.or.jp>
+Thu Feb 23 12:21:48 2012 Tanaka Akira <akr@fsij.org>
- * pack.c (utf8_to_uv): pack to 7 bytes sequence.
+ * ext/dbm/extconf.rb: use DBM_SUFFIX only to detect header of
+ Berkeley DB.
- * pack.c (uv_to_utf8): wrong boundary.
+Thu Feb 23 10:00:18 2012 Eric Hodel <drbrain@segment7.net>
- * pack.c (pack_unpack): should treat as unsigned long.
+ * io.c (rb_io_f_sync): Fix double-negative typo. [ruby-trunk - #5837]
-Wed Jun 23 15:10:11 1999 Inaba Hiroto <inaba@sdd.tokyo-sc.toshiba.co.jp>
+Thu Feb 23 09:57:21 2012 Eric Hodel <drbrain@segment7.net>
- * parse.y (parse_string): failed to parse nested braces.
+ * load.c (rb_f_require): Add note to require for scope of items in the
+ loaded file. [ruby-trunk - #5910]
- * parse.y (parse_regx): nested braces within #{} available.
+Thu Feb 23 03:58:08 2012 Marc-Andre Lafortune <ruby-core@marc-andre.ca>
-Wed Jun 23 11:18:38 1999 Yukihiro Matsumoto <matz@netlab.co.jp>
+ * lib/ostruct.rb (delete_field): Bug fix so previous value is
+ returned. Patch by Nick Recobra [Bug #6063]
- * regex.c (slow_search): wrong shift width for mbcs.
+Thu Feb 23 02:33:00 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * eval.c (rb_thread_save_context): should not clear th->locals.
+ * io.c (rb_io_extract_modeenc): fail only if conflicting
+ text/binary modes given explicitly. [ruby-dev:45268][Bug #6055]
-Wed Jun 23 02:06:14 1999 Yukihiro Matsumoto <matz@netlab.co.jp>
+Wed Feb 22 23:27:08 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * parse.y (yylex): UMINUS binds too tight with digits. changed so
- that -2**2 => -4.
+ * test/iconv/test_option.rb: enabled. [ruby-core:42802][Bug #6061]
- * parse.y (close_paren): `do' for expr termination now works it
- used to be.
+Wed Feb 22 21:45:56 2012 Tanaka Akira <akr@fsij.org>
-Wed Jun 22 18:26:42 1999 Koji Arai <JCA02266@nifty.ne.jp>
+ * ext/curses/curses.c: use defined() to suppress a warning.
- * pack.c (pack_pack): should initialize local variable `j'.
+Wed Feb 22 21:44:29 2012 Tanaka Akira <akr@fsij.org>
-Wed Jun 22 15:24:59 1999 Koji Arai <JCA02266@nifty.ne.jp>
+ * ext/curses/extconf.rb: refactored.
- * parse.y (here_document): a bug for multiline heredoc.
+Wed Feb 22 20:42:28 2012 Tanaka Akira <akr@fsij.org>
-Tue Jun 22 15:06:36 1999 WATANABE Hirofumi <watanabe@ase.ptg.sony.co.jp>
+ * ext/curses/extconf.rb: try to distinguish curses_version is a
+ function or variable.
- * ext/socket/socket.c (ruby_socket): forgot to return fd
- explicitly.
+ * ext/curses/curses.c (Init_curses): refine Curses::VERSION.
-Tue Jun 22 13:34:12 1999 Yukihiro Matsumoto <matz@netlab.co.jp>
+Wed Feb 22 19:47:03 2012 Tanaka Akira <akr@fsij.org>
- * rubyio.h (MakeOpenFile): should initialize member `iv_tbl'.
+ * ext/curses/extconf.rb: show the chosen header and library.
-Wed Jun 22 10:35:51 1999 Katsuyuki Komatsu <komatsu@sarion.co.jp>
+Wed Feb 22 19:22:31 2012 Tadayoshi Funaba <tadf@dotrb.org>
- * io.c (rb_io_gets_internal): getc(3) may not set errno on
- interrupt.
+ * reverted 34739 for test/date.
-Mon Jun 21 22:39:28 1999 Yukihiro Matsumoto <matz@netlab.co.jp>
+Wed Feb 22 19:08:55 2012 Tanaka Akira <akr@fsij.org>
- * eval.c (call_required_libraries): ruby_sourceline should be
- cleared before loading libraries.
+ * ext/curses/extconf.rb: refactored.
- * io.c (set_stdin): do not use reopen(), so that we don't need to
- dup original stdin before assigning $stdin.
+Wed Feb 22 18:44:41 2012 Shota Fukumori <sorah@tubusu.net>
-Mon Jun 21 18:04:27 1999 Ryo HAYASAKA <hayasaka@univ21.u-aizu.ac.jp>
+ * lib/test/unit.rb (setup_options): add option "--retry" as opposite
+ for "--no-retry"
- * ext/dbm/dbm.c: include <cdefs.h> for solaris 2.6.
+Wed Feb 22 18:34:02 2012 Shota Fukumori <sorah@tubusu.net>
-Mon Jun 21 15:59:47 1999 Nobuyoshi Nakada <nobu.nokada@softhome.net>
+ * lib/test/unit.rb (setup_options): add option "--show-skip" to
+ cancel "--hide-skip" (-q)
- * ext/socket/socket.c (ip_addrsetup): forgot to put `else'.
+Wed Feb 22 17:36:22 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Mon Jun 21 15:38:37 1999 Yukihiro Matsumoto <matz@netlab.co.jp>
+ * io.c (rb_io_s_foreach): argument check before making Enumerator.
+ [ruby-dev:31525]
- * io.c (fptr_finalize): remove rb_syswait() invocation to avoid
- wait4(2) within GC. rb_syswait() moved to rb_io_fptr_close().
+Wed Feb 22 17:07:35 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Mon Jun 21 12:05:59 1999 Tadayoshi Funaba <tadf@kt.rim.or.jp>
+ * io.c (rb_io_s_foreach): return enumerator including keyword
+ arguments. [ruby-dev:45267][Bug #6054]
- * dir.c (dir_s_glob): remove MAXPATHLEN restriction.
+Wed Feb 22 12:15:16 2012 NARUSE, Yui <naruse@ruby-lang.org>
- * ext/md5/md5init.c (md5_hexdigest): should have used "%02x".
+ * configure.in: allow llvm-gcc because it work fine with r34278.
-Sun Jun 20 19:50:38 1999 Minero Aoki <aamine@dp.u-netsurf.ne.jp>
+Wed Feb 22 10:57:08 2012 NARUSE, Yui <naruse@ruby-lang.org>
- * string.c (rb_str_each_line): should have checked string
- boundary.
+ * regparse.c (fetch_token): don't use // comment.
-Sat Jun 19 22:24:12 1999 Kenji Nagasawa <kenn@hma.att.ne.jp>
+Wed Feb 22 10:32:11 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * OS/2 patch improved.
+ * test/mkmf/test_framework.rb: try CoreFoundation framework, than
+ Cocoa which is dependent on QuickTime SDK which has separated
+ since Xcode 4.3.
-Fri Jun 18 08:30:17 1999 Yukihiro Matsumoto <matz@netlab.co.jp>
+Wed Feb 22 10:18:05 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * marshal.c (r_byte): add data length check.
+ * common.mk (test-all, test-ruby): more dependencies.
- * ext/tcltklib/tcltklib.c (_timer_for_tcl): was doing busy-wait.
+Wed Feb 22 06:48:55 2012 Eric Hodel <drbrain@segment7.net>
-Tue Jun 15 10:01:21 1999 Katsuyuki Komatsu <komatsu@sarion.co.jp>
+ * file.c (rb_f_test): Fix formatting of Kernel#test rdoc.
- * configure.in: remove trailing slash from interpreter embedded
- shared library path.
+Wed Feb 22 06:12:15 2012 Tanaka Akira <akr@fsij.org>
- * configure.in (INSTALL_DLLIB): install shared lib with 0555.
+ * ext/dbm/extconf.rb: check DBM_SUFFIX for Mac OS X.
+ Its ndbm.h doesn't include db.h.
- * instruby.rb: changed mode for shared library into 0555.
+Wed Feb 22 06:02:42 2012 Tanaka Akira <akr@fsij.org>
-Fri Jun 11 23:27:00 1999 Tadayoshi Funaba <tadf@kt.rim.or.jp>
+ * ext/dbm/dbm.c (fdbm_initialize): disable Berkeley DB error messages.
- * ext/etc/etc.c (etc_passwd): should return nil, not exception for
- call after last passwd entry.
+ * ext/dbm/extconf.rb: check DBC type for above.
-Fri Jun 11 15:21:21 1999 Yukihiro Matsumoto <matz@netlab.co.jp>
+ [ruby-dev:45269]
- * gc.c (rb_gc_mark_locations): add safety margin 1.
+Tue Feb 21 20:23:47 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * eval.c (ruby_run): should protect toplevel node tree.
+ * hash.c (rb_any_hash): treat Qundef like as other special constants.
- * ext/etc/etc.c (etc_group): dumps core if there's no more group.
+ * hash.c (hash_foreach_iter): fix signature.
-Fri Jun 11 01:50:25 1999 Yukihiro Matsumoto <matz@netlab.co.jp>
+Tue Feb 21 19:39:34 2012 Tanaka Akira <akr@fsij.org>
- * eval.c (ruby_run): Init_stack() was called too late; local
- variables happened to be higher (or lower) than stack_start.
+ * ext/curses/curses.c (Init_curses): use curses_version() for
+ Curses::VERSION.
-Thu Jun 10 16:41:48 1999 Yukihiro Matsumoto <matz@netlab.co.jp>
+Tue Feb 21 18:21:25 2012 Narihiro Nakamura <authornari@gmail.com>
- * io.c: do not call `initialize' for IO objects. So with Array,
- Hash, Range, and Time objects.
-
- * ext/curses/curses.c (curses_getch): made thread aware using
- rb_read_check().
+ * gc.c : remove gc_clear_mark_on_sweep_slots() and use
+ rest_sweep() instead of it, because some dead objects might be
+ marked in next the mark phase by false pointers.
+ [ruby-core:42672]
- * ext/curses/curses.c (window_getch): ditto.
+Tue Feb 21 16:08:17 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * ext/curses/curses.c (curses_getstr): made (partially) thread
- aware using rb_read_check().
+ * proc.c (rb_hash_proc): get wrapped pointer properly. [Bug #6048]
- * ext/curses/curses.c (window_getstr): ditto.
+Tue Feb 21 14:41:10 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * io.c (rb_read_check): new function to help making something
- (like extension libraries) thread aware.
+ * template/ruby.pc.in: added rubylibprefix, {rubylib,vendor,site}dir
+ and {ruby,vendor,site}archdir. [ruby-core:42766][Feature #6052]
- * eval.c (is_defined): `defined? super' should be true even for
- private superclass methods.
+Tue Feb 21 09:13:25 2012 Marc-Andre Lafortune <ruby-core@marc-andre.ca>
-Fri Jun 10 13:42:10 1999 Koji Arai <JCA02266@nifty.ne.jp>
+ * proc.c (method_hash, proc_hash): Fix {Unbound}Method#hash
+ [Bug #6048]. Isolate hash computation for proc
- * pack.c (pack_pack): template `Z' should be allowed.
+ * internal.h: Declaration for above
-Wed Jun 9 13:26:38 1999 Yukihiro Matsumoto <matz@netlab.co.jp>
+ * vm_method.c (rb_method_definition_hash): Computation for
+ hash part of a method definition
- * eval.c (rb_thread_loading): modified to avoid nested race
- condition of require().
+ * method.h: Declaration for above
- * ext/tcltklib/tcltklib.c (ip_invoke): queue invocation on non
- main threads.
+ * test/ruby/test_method.rb: Test for above
- * ext/tcltklib/tcltklib.c (lib_mainloop): flush invocation
- queues periodically.
+Tue Feb 21 02:56:15 2012 Yukihiro Matsumoto <matz@ruby-lang.org>
- * version.c (ruby_show_version): now print the message to stdout.
+ * enumerator.c (enumerator_rewind): update the documentation.
+ fixed: #6053
- * version.c (ruby_show_copyright): ditto.
+Mon Feb 20 23:38:35 2012 NAKAMURA Usaku <usa@ruby-lang.org>
-Tue Jun 8 00:00:34 1999 Yukihiro Matsumoto <matz@netlab.co.jp>
+ * enc/depend: ignore mktable.c because it's not encoding library.
+ [ruby-core:42760] [Bug #6049]
- * pack.c (pack_unpack): append sentinel (NUL) to the string.
+Mon Feb 20 21:40:53 2012 Tanaka Akira <akr@fsij.org>
- * ext/md5/md5init.c (md5_hexdigest): new method to obtain
- printable hash string.
+ * ext/curses/extconf.rb: fold too long lines.
- * ext/md5/md5init.c (md5_update): should return self.
+Mon Feb 20 21:16:48 2012 Hiroshi Shirosaki <h.shirosaki@gmail.com>
- * pack.c (pack_pack): undocumented template 'U' for UTF8.
+ * lib/fileutils.rb: revert a line modified accidentally at r34669.
+ This fixes mingw test errors in TestDir_M17N.
+ [ruby-core:42728] [Feature #4970]
- * pack.c (pack_unpack): ditto.
+Mon Feb 20 21:09:27 2012 Tanaka Akira <akr@fsij.org>
- * marshal.c (r_byte): should replace getc() with rb_getc().
+ * ext/curses/curses.c (Init_curses): define Curses::VERSION.
- * io.c (rb_getc): getc() replacement uses READ_DATA_PENDING() and
- rb_thread_wait_fd().
+Mon Feb 20 21:08:00 2012 Tanaka Akira <akr@fsij.org>
-Mon Jun 7 23:23:38 1999 Yukihiro Matsumoto <matz@netlab.co.jp>
+ * ext/curses/extconf.rb: restore $libs and $defs for each
+ header/library choice.
- * object.c (rb_mod_clone): should call CLOSESETUP().
+Mon Feb 20 19:57:26 2012 Tanaka Akira <akr@fsij.org>
- * eval.c (bind_clone): should call CLONESETUP() for new clone.
+ * ext/dbm/extconf.rb: weaken header/library consistency check if db is
+ "ndbm". It seems several (possibly historical) distributions
+ provide libndbm. However the content of libndbm vary: Berkeley DB,
+ GDBM or even 4.3BSD NDBM. (Mandriva, Tru64 UNIX, OpenSuSE,
+ SCO OpenServer, ...)
+ "ndbm" is not searched automatically now (dblib doesn't contain it)
+ but configure --with-dbm-type=ndbm choose libndbm and ndbm.h.
-Sat Jun 5 10:32:40 1999 Yukihiro Matsumoto <matz@netlab.co.jp>
+Mon Feb 20 19:15:57 2012 Tanaka Akira <akr@fsij.org>
- * string.c (rb_str_oct): binary (e.g. 0b10111) support.
+ * ext/dbm/extconf.rb: refine variable names.
- * variable.c (rb_const_set): raise warning, not exception.
+Mon Feb 20 15:50:33 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * parse.y (yycompile): initialize parser internal variables.
+ * configure.in: check if -fstack-protector is really available.
- * parse.y (close_paren): set lex_state to EXPR_PAREN after closing
- parenthesis.
+Sun Feb 19 23:43:38 2012 Tanaka Akira <akr@fsij.org>
- * parse.y (yylex): returns kDO for `do' right after method_call.
+ * ext/dbm/extconf.rb: show header and library found.
-Thu Jun 3 11:05:30 1999 WATANABE Hirofumi <watanabe@ase.ptg.sony.co.jp>
+Sun Feb 19 23:01:01 2012 Tanaka Akira <akr@fsij.org>
- * regex.c (read_backslash): should decode \b within class.
+ * ext/dbm/dbm.c (Init_dbm): refine DBM::VERSION definition.
-Thu Jun 3 01:06:18 1999 Katsuyuki Komatsu <komatsu@sarion.co.jp>
+ * ext/dbm/extconf.rb: provide RUBYDBM_GDBM_HEADER macro.
- * dln.c (dln_load): AIX improvement (aix_findmain removed).
+Sun Feb 19 17:07:27 2012 Tanaka Akira <akr@fsij.org>
-Wed Jun 2 00:41:31 1999 Yukihiro Matsumoto <matz@netlab.co.jp>
+ * test/dbm/test_dbm.rb (test_dbmfile_suffix): check pag and dir is
+ empty for 4.3BSD ndbm.
- * pack.c (pack_unpack): new undocumented template Z which strips
- stuff after first null.
+Sun Feb 19 03:00:30 2012 Tanaka Akira <akr@fsij.org>
- * pack.c (pack_pack): should preserve specified length of the
- resulting string.
+ * test/dbm/test_dbm.rb (test_dbmfile_suffix): check magic numbers.
-Tue Jun 1 15:29:33 1999 Yukihiro Matsumoto <matz@netlab.co.jp>
+Sun Feb 19 01:05:41 2012 Tanaka Akira <akr@fsij.org>
- * ext/socket/socket.c (ruby_socket): retry after GC, if socket(2)
- failed on EMFILE or ENFILE.
+ * ext/dbm/extconf.rb: detect GDBM's ndbm.h by testing dbm_clearerr is
+ an empty macro.
- * ext/socket/socket.c (sock_s_socketpair): ditto.
+Sun Feb 19 00:25:55 2012 Tanaka Akira <akr@fsij.org>
- * eval.c (module_setup): need to add PUSH_VAR/POP_VAR to clear
- dyna vars link list.
+ * ext/dbm/extconf.rb: don't choose 'dbm' if _GDB_H_ is defined which
+ is available since GDBM 1.9 because 'gdbm_compat' is appropriate
+ choice since GDBM 1.8.1.
- * version.h (RUBY_RELEASE_CODE): integer macro constant for source
- version detection.
+Sat Feb 18 23:27:00 2012 Kenta Murata <mrkn@mrkn.jp>
-Sun May 30 22:19:12 1999 Kenji Nagasawa <kenn@tcp-ip.or.jp>
+ * random.c: remove a duplicated comment.
- * ext/socket/socket.c: emx/gcc 0.9d now fixes things about
- AF_UNIX.
+Sat Feb 18 18:43:13 2012 Tanaka Akira <akr@fsij.org>
- * process.c: OS/2 EMX kludge.
+ * ext/dbm/extconf.rb (dblib): prefer recent GDBM over older GDBM.
+ (have_declared_libvar): new function to check a declared variable
+ exists in a library.
+ (have_undeclared_libvar): renamed from renamed from have_libvar.
+ (headers.db_check2): check that GDBM version variable if GDBM header
+ is chosen.
- * Makefile.in (strncasecmp.o): added dependency.
+ * ext/dbm/dbm.c (Init_dbm): use HAVE_DECLARED_LIBVAR_GDBM_VERSION and
+ HAVE_UNDECLARED_LIBVAR_GDBM_VERSION macro.
-Mon May 31 16:06:28 1999 Yukihiro Matsumoto <matz@netlab.co.jp>
+Sat Feb 18 13:53:01 2012 Tanaka Akira <akr@fsij.org>
- * version 1.3.4 - preliminary release for 1.4
+ * test/dbm/test_dbm.rb (test_dbmfile_suffix): DBM::VERSION should
+ be Berkeley DB if foo.db is created by DBM.open.
-Mon May 31 15:57:41 1999 Yukihiro Matsumoto <matz@netlab.co.jp>
+Sat Feb 18 13:40:37 2012 Tanaka Akira <akr@fsij.org>
- * io.c (rb_io_fptr_close): close on IO which main_thread is
- waiting cause serious exception, that vanishes the actual fd
- closing. Invocation of rb_thread_fd_close() is deferred
- a little.
+ * test/dbm/test_dbm.rb (test_dbmfile_suffix): test dbm file suffix.
-Sat May 29 18:27:13 1999 Koji Arai <JCA02266@nifty.ne.jp>
+Sat Feb 18 12:50:59 2012 Tanaka Akira <akr@fsij.org>
- * regex.c (re_match): stack boundary check needed.
+ * ext/dbm/dbm.c (DBM::VERSION): define it by detecting _GDBM_H_ or
+ _DBM_IOERR.
-Sat May 29 12:27:00 1999 Yukihiro Matsumoto <matz@netlab.co.jp>
+Sat Feb 18 07:52:45 2012 NARUSE, Yui <naruse@ruby-lang.org>
- * ext/tcltklib/tcltklib.c (ip_invoke): proper ref count management
- to avoid leak. I HATE REF COUNTING!!
+ * tool/enc-unicode.rb: don't use 1.9 feature on tools.
- * eval.c (ruby_run): moved ruby_require_libraries() to handle `-r'
- from ruby_options() to avoid stack corruption for threads
- created in libraries.
+Sat Feb 18 02:48:39 2012 Aaron Patterson <aaron@tenderlovemaking.com>
-Sat May 29 02:22:12 1999 Yukihiro Matsumoto <matz@netlab.co.jp>
+ * lib/fileutils.rb: refactored FileUtil methods to use the
+ `define_command` API. Patch from 7rans <transfire@gmail.com>
+ * test/fileutils/test_dryrun.rb: corresponding test refactoring
+ * test/fileutils/test_nowrite.rb: ditto
+ * test/fileutils/test_verbose.rb: ditto
- * eval.c (rb_yield_0): when `for' appeared in blocks, it
- introduced new scope for local variables.
+Fri Feb 17 21:39:36 2012 Tanaka Akira <akr@fsij.org>
-Fri May 28 17:16:49 1999 Yukihiro Matsumoto <matz@netlab.co.jp>
+ * ext/dbm/extconf.rb: remove dbm.
- * string.c (rb_str_squeeze_bang): squeeze AND of the arguments.
- UNDOCUMENTED.
+Fri Feb 17 21:18:39 2012 Tanaka Akira <akr@fsij.org>
- * string.c (rb_str_count): new UNDOCUMENTED method.
+ * ext/dbm/extconf.rb: refine header/library mismatch detection.
+ check only for ndbm.h except libc. check _GDBM_H_ for gdbm.
+ check _DBM_IOERR for the original ndbm.
- * string.c (rb_str_delete_bang): delete AND of the arg ranges.
- UNDOCUMENTED FEATURE for 1.3.x.
+Fri Feb 17 20:30:44 2012 Tanaka Akira <akr@fsij.org>
- * ext/socket/socket.c (setipaddr): re-wrote using ip_addrsetup().
+ * ext/dbm/extconf.rb: don't check libdbm. It is not a ndbm
+ implementation. (libdbm in Version 7 Unix is database library
+ for single database per process.)
- * ext/socket/socket.c (ip_addrsetup): decode symbolic address
- <broadcast>.
+Fri Feb 17 15:38:53 2012 NARUSE, Yui <naruse@ruby-lang.org>
-Thu May 27 12:27:42 1999 Yukihiro Matsumoto <matz@netlab.co.jp>
+ * Merge Onigmo-5.13.1. [ruby-dev:45057] [Feature #5820]
+ https://github.com/k-takata/Onigmo
+ cp reg{comp,enc,error,exec,parse,syntax}.c reg{enc,int,parse}.h
+ cp oniguruma.h
+ cp tool/enc-unicode.rb
+ cp -r enc/
- * string.c (tr_trans): should handle NUL (\0) within strings.
+Fri Feb 17 15:20:30 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Tue May 25 16:45:11 1999 Yukihiro Matsumoto <matz@netlab.co.jp>
+ * enum.c (enum_each_slice): arrays to be yielded can be newly
+ created in the block.
- * io.c (rb_f_syscall): syscall may return values other than zero
- on success.
+ * enum.c: move work variables to objects not to let called blocks
+ access stack area out of scope. [Bug #5801]
- * regex.c (re_match): handle empty loop properly (hopefully).
+Fri Feb 17 12:35:55 2012 NARUSE, Yui <naruse@ruby-lang.org>
- * regex.c (re_match): remove empty group check, because it does
- not help non-grouping parentheses (?:..).
+ * tool/merger.rb: remove borders from the commit message which is used
+ when the commit doesn't change ChangeLog.
- * regex.c (re_compile_fastmap): treating try_next, finalize_push
- wrong way.
+Fri Feb 17 11:50:11 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * regex.c: remove some obsolete functions such as
- group_match_null_string_p().
+ * common.mk (btest, btest-ruby, test-sample test-knownbugs)
+ (test-all, test-ruby): depend on prog.
-Mon May 24 14:47:54 1999 Yukihiro Matsumoto <matz@netlab.co.jp>
+Fri Feb 17 09:56:22 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * regex.c (read_backslash): read backslash by regex.
+ * lib/mkmf.rb (create_header): log the content of header.
-Sun May 23 19:44:58 1999 WATANABE Hirofumi <eban@os.rim.or.jp>
+Fri Feb 17 09:44:55 2012 NARUSE, Yui <naruse@ruby-lang.org>
- * ext/pty/pty.c (getDevice): portability patch.
+ * tool/transcode-tblgen.rb (import_ucm): don't use \h because the
+ script should work with ruby 1.8.
-Fri May 21 23:01:26 1999 Katsuyuki Komatsu <komatsu@sarion.co.jp>
+ * tool/enc-unicode.rb: ditto.
- * ext/socket/getaddrinfo.c (GET_AI): should set error code.
+Fri Feb 17 07:33:29 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Thu May 20 03:43:44 1999 Jun-ichiro itojun Hagino <itojun@itojun.org>
+ * enum.c (id_lshift): use constant ID.
- * ext/socket/socket.c: you should use sockaddr_storage to handle
- IPv6 addresses.
+Fri Feb 17 07:30:53 2012 Tanaka Akira <akr@fsij.org>
- * ext/socket/getaddrinfo.c (getaddrinfo): prevent retrieving
- AF_INET6 address if hints.ai_flags == AI_PASSIVE.
+ * ext/dbm/extconf.rb: refactored to split too long conditions.
-Wed May 19 12:27:07 1999 Yukihiro Matsumoto <matz@netlab.co.jp>
+Fri Feb 17 00:23:25 2012 Tanaka Akira <akr@fsij.org>
- * eval.c (exec_end_proc): should protect exceptions.
+ * test/dbm/test_dbm.rb: fix skip condition for libgdbm 1.8.0 or prior.
+ reported by Bohuslav Kabrda.
+ [ruby-core:42685] [ruby-trunk - Bug #6036]
- * gc.c (run_final): ditto.
+Fri Feb 17 00:04:21 2012 Tanaka Akira <akr@fsij.org>
- * parse.y (f_rest_arg): allow just * for rest arg.
+ * ext/dbm/extconf.rb: check _DB_H_ macro unavailable except
+ Berkeley DB library.
- * parse.y (mlhs_basic): allow * without formal argument.
+Thu Feb 16 05:41:35 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * regex.c (re_match): the variable `part' should be initialized.
+ * insns.def (splatarray): make new array if flag is set.
-Tue May 18 15:25:45 1999 Yukihiro Matsumoto <matz@netlab.co.jp>
+ * compile.c (iseq_compile_each): make new array with
+ splat. [ruby-core:21901][Feature #1125]
- * regex.c (re_search): a bug in range adjustment.
+Thu Feb 16 00:14:04 2012 Kazuhiro NISHIYAMA <zn@mbf.nifty.com>
-Tue May 18 11:35:59 1999 WATANABE Hirofumi <watanabe@ase.ptg.sony.co.jp>
+ * lib/abbrev.rb (Array#abbrev): add missing '"' in documentation.
- * dln.c (conv_to_posix_path): path_len argument added.
+Wed Feb 15 22:20:19 2012 CHIKANAGA Tomoyuki <nagachika00@gmail.com>
-Mon May 17 12:26:31 1999 Yukihiro Matsumoto <matz@netlab.co.jp>
+ * cont.c (rb_fiber_reset_root_local_storage): add a new function to
+ restore rb_thread_t::local_storage.
- * numeric.c (fix_rev): should treat Fixnum as signed long.
+ * cont.c (rb_obj_is_fiber): add a new function to tell finalizer to
+ prevent fibers from destroy.
- * eval.c (massign): add strict number check for yield (and call).
+ * gc.c (rb_objspace_call_finalizer): don't sweep fibers at finalizing
+ objspace.
- * eval.c (proc_arity): new method to return number of arguments.
+ * internal.h (rb_fiber_reset_root_local_storage, rb_obj_is_fiber):
+ add prototypes.
- * eval.c (method_arity): new method to return number of arguments.
+ * vm.c (ruby_vm_destruct): reset main thread's local_storage before
+ free main thread. rb_thread_t::local_storage is replaced by fiber's
+ local storage when forked from fiber, and it should be already freed
+ when the fiber was destroyed. [ruby-core:41456] [Bug #5700]
- * parse.y (read_escape): char may be unsigned.
+ * test/ruby/test_fiber.rb (test_fork_from_fiber): add test for fork
+ from fiber.
- * string.c (rb_str_succ): ditto.
+Wed Feb 15 19:57:02 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * string.c (tr_trans): ditto.
+ * ext/fiddle/closure.c (callback): deal with unsigned integers.
+ [ruby-core:42458][Bug #5991][Bug #6022]
- * object.c (Init_Object): methods `&', `|', `^' are added to nil.
+ * ext/fiddle/conversions.c (value_to_generic, generic_to_value):
+ ditto.
- * range.c (rb_range_beg_len): it should be OK for [0..-len-1].
+ * ext/fiddle/closure.c (callback): same as r34506.
- * regex.c (re_search): search for byte literal within mbcs.
+Wed Feb 15 17:41:31 2012 NARUSE, Yui <naruse@ruby-lang.org>
- * regex.c (is_in_list): parsh
+ * io.c (io_strsetbuf): call rb_str_modify to make str independent
+ before calling rb_str_set_len for r34580.
- * regex.c (re_compile_fastmap): should have not alter the loop
- variable `j' if TRASLATE_P().
+Wed Feb 15 12:30:10 2012 Eric Hodel <drbrain@segment7.net>
- * regex.c (re_compile_pattern): escaped characters should be read
- by PATFETCH_RAW(c).
+ * ext/zlib/zlib.c (Init_zlib): Added Zlib::TEXT and note that
+ Zlib::ASCII is deprecated in zlib 1.2.3 and newer.
-Sat May 15 11:23:51 1999 Yukihiro Matsumoto <matz@netlab.co.jp>
+Wed Feb 15 12:24:40 2012 Eric Hodel <drbrain@segment7.net>
- * regex.c (re_match): endline2 (\Z) should not match at the point
- between a newline and end-of-line, like endline ($).
+ * ext/zlib/zlib.c: Move constant descriptions to constants. Remove
+ extra comment block at the top of Init_zlib().
- * class.c (include_class_new): should initialize iv_tbl to share
- between module and iclass.
+Wed Feb 15 12:30:46 2012 Marc-Andre Lafortune <ruby-core@marc-andre.ca>
-Fri May 14 08:50:27 1999 Akira Endo <akendo@t3.rim.or.jp>
+ * lib/ostruct.rb: Create getters and setters after dup.
+ [Bug #6028] [rubyspecs:0380bcc]
- * regex.c (re_compile_fastmap): it should be k != 0 to skip.
+Wed Feb 15 10:59:52 2012 Narihiro Nakamura <authornari@gmail.com>
-Fri May 14 12:46:56 1999 Yukihiro Matsumoto <matz@netlab.co.jp>
+ * gc.c (HEAP_BITMAP_LIMIT): HEAP_BITMAP_LIMIT is computed on the
+ basis of HEAP_SIZE because it must covers a whole heap block.
+ [ruby-trunk - Bug #6006]
- * time.c (time_load): a bug in old marshal format support.
+Wed Feb 15 09:27:45 2012 Eric Hodel <drbrain@segment7.net>
- * instruby.rb: make site_ruby directory.
+ * ext/zlib/zlib.c (Init_zlib): Added Zlib::FIXED and Zlib::RLE
+ strategies.
+ * NEWS: Add note about the new Zlib constants.
-Fri May 14 10:18:02 1999 WATANABE Tetsuya <tetsu@jpn.hp.com>
+Wed Feb 15 09:11:36 2012 Eric Hodel <drbrain@segment7.net>
- * regex.c (re_match): a bug in inline `.*' etc.
+ * ext/zlib/zlib.c: Improve documentation. [ruby-trunk - Bug #5948]
-Fri May 14 09:58:46 1999 Minero Aoki <aamine@dp.u-netsurf.ne.jp>
+Wed Feb 15 07:28:54 2012 Eric Hodel <drbrain@segment7.net>
- * ruby.c (addpath): should have specified string length.
+ * encoding.c (Init_Encoding): Add IO example of internal and external
+ encoding. Fixed a typo in the force_encoding example. [#5949]
-Thu May 13 10:40:44 1999 Yukihiro Matsumoto <matz@netlab.co.jp>
+Wed Feb 15 06:58:21 2012 Eric Hodel <drbrain@segment7.net>
- * eval.c (rb_eval_string_wrap): new function.
+ * encoding.c (Init_Encoding): Add Encoding documentation.
+ [ruby-trunk - Bug #5949]
+ * encoding.c (rb_set_default_external): Fix typo in documentation.
- * regex.c (re_compile_pattern): POSIX line match should alter
- behavior for `^' and `$' to begbuf and endbuf2 respectively.
+Tue Feb 14 20:22:11 2012 Narihiro Nakamura <authornari@gmail.com>
- * ext/pty/pty.c: un-ANSI-fy function arguments.
+ * gc.c (CEILDIV): rename to a appropriate name.
-Wed May 12 14:19:38 1999 Yukihiro Matsumoto <matz@netlab.co.jp>
+Tue Feb 14 18:07:20 2012 Narihiro Nakamura <authornari@gmail.com>
- * struct.c (iv_get): in case of inheritance of generated struct
- class, __member__ and __size__ should also be inherited.
- Thanks for Pros Yeboah <yeboah@tu-harburg.de>.
+ * gc.c (assign_heap_slot): SEGV happens cause on 64-bit platform
+ sometime there should be `objs-=2` instead of `objs--`.
+ [Bug #6006]
+ patched by Sokolov Yura. https://github.com/ruby/ruby/pull/92
- * io.c (rb_f_gets_internal): should check number of arguments
- before checking rb_rs == rb_default_rs. Thanks for Koji Arai
- <JCA02266@nifty.ne.jp>.
+Tue Feb 14 16:00:30 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Tue May 11 08:29:28 1999 Yukihiro Matsumoto <matz@netlab.co.jp>
+ * io.c (io_setstrbuf): cut down the buffer if longer.
- * regex.c (re_compile_pattern): .?, .+ did not work.
+Tue Feb 14 15:06:37 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Mon May 10 00:59:33 1999 Yukihiro Matsumoto <matz@netlab.co.jp>
+ * lib/test/unit/assertions.rb (build_message): skip escaped
+ question marks.
- * lib/jcode.rb: forgot to squeeze on reverse (complement) case.
+Tue Feb 14 12:10:04 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * string.c (tr_squeeze): should not set modify flag to be honest,
- if the string is not modified.
+ * variable.c (autoload_const_set, autoload_require): fix
+ signatures.
- * signal.c (Init_signal): SIGTERM should not be handled.
+Tue Feb 14 05:23:40 2012 Eric Hodel <drbrain@segment7.net>
- * regex.c (re_match): seeking for longest match is now optional,
- which can be set using RE_OPTION_POSIXMATCH. This satisfies
- POSIX longest match as much as Emacs's posix-* functions, which
- are known to be incomplete.
+ * process.c (proc_wait): Change typo "SystemError" to
+ "SystemCallError". [ruby-trunk - Bug #5962]
+ * process.c (proc_wait2): ditto
-Sun May 9 13:04:01 1999 Katsuyuki Komatsu <komatsu@sarion.co.jp>
+Tue Feb 14 05:18:24 2012 Eric Hodel <drbrain@segment7.net>
- * ext/socket/socket.c (sock_s_getaddrinfo): conversion from
- Fixnums to C integers needed.
+ * enumerator.c: Document use of Enumerator.new for creating a lazy
+ enumeration for filtering/chaining. [ruby-trunk - Feature #707]
-Sun May 9 11:51:43 1999 Koji Arai <JCA02266@nifty.ne.jp>
+Mon Feb 13 23:01:50 2012 Akinori MUSHA <knu@iDaemons.org>
- * range.c (range_eqq): reverse condition.
+ * vm_method.c (rb_method_boundp):
+ obj.respond_to?(:a_protected_method) should return false because
+ calling a protected method may cause NoMethodError if called
+ from outside the class inheritance tree. Kernel#respond_to? is
+ mostly used to test if it is safe to call a method, so the false
+ positive should be avoided. [ruby-dev:40461] [ruby-dev:41739]
+ [ruby-dev:41837]
- * range.c (range_s_new): default should be end inclusive.
+Mon Feb 13 21:52:06 2012 Narihiro Nakamura <authornari@gmail.com>
-Sat May 8 03:27:51 1999 Yukihiro Matsumoto <matz@netlab.co.jp>
+ * gc.c (HEAP_OBJ_LIMIT, HEAP_BITMAP_LIMIT): HEAP_OBJ_LIMIT used
+ `sizeof(struct heaps_slot)` while heap is currently allocated
+ with `struct heaps_header`.
+ HEAP_BITMAP_LIMIT were calculated from
+ `HEAP_OBJ_LIMIT/sizeof(uintptr_t)` - one Byte for each object,
+ not one Bit. [Bug #6006]
+ patched by Sokolov Yura. https://github.com/ruby/ruby/pull/92
- * ext/socket/socket.c (thread_connect): replace nasty
- rb_thread_fd_writable() with rb_thread_select().
+Mon Feb 13 18:30:32 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Fri May 7 20:49:00 1999 Katsuyuki Komatsu <komatsu@sarion.co.jp>
+ * io.c (io_setstrbuf): defer resizing buffer string until data is
+ read actually.
- * ext/socket/getaddrinfo.c (inet_pton): wrong parameter to
- inet_aton().
+Mon Feb 13 10:24:39 2012 Loren Segal <lsegal@soen.ca>
- * ext/socket/addrinfo.h (__P): silly cut and paste typo.
+ * io.c (Init_IO): use directive hack to make ARGF documentable
+ in other tools. [ruby-core:42515][Bug #6007]
-Fri May 7 17:03:57 1999 Yukihiro Matsumoto <matz@netlab.co.jp>
+Sun Feb 12 20:43:54 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * dir.c (glob): removed GPL'ed glob.c completely.
+ * include/ruby/ruby.h (rb_event_hook_func_t): add argument names.
-Fri May 7 08:17:19 1999 Yukihiro Matsumoto <matz@netlab.co.jp>
+Sun Feb 12 16:30:23 2012 Akinori MUSHA <knu@iDaemons.org>
- * ext/sdbm/extconf.rb: sdbm extension added to the distribution.
+ * tool/merger.rb (#default_merge_branch): Add support for
+ Subversion 1.7 which adopted a whole new working directory
+ structure.
-Fri May 7 01:42:20 1999 Yukihiro Matsumoto <matz@netlab.co.jp>
+Sun Feb 12 15:14:41 2012 Kazuki Tsujimoto <kazuki@callcc.net>
- * ext/socket/socket.c (tcp_s_gethostbyname): avoid using struct
- sockaddr_storage.
+ * benchmark/driver.rb: suppress unused/shadowing variable warnings.
-Thu May 6 13:21:41 1999 Yukihiro Matsumoto <matz@netlab.co.jp>
+Sun Feb 12 03:14:40 2012 Eric Hodel <drbrain@segment7.net>
- * array.c (rb_ary_indexes): should not use rb_ary_concat().
+ * vm_eval.c (check_funcall): Call respond_to? with matching arity for
+ legacy single-argument implementations. [ruby-trunk - Bug #6000]
-Thu May 4 12:34:18 1999 Koji Arai <JCA02266@nifty.ne.jp>
+Sat Feb 11 12:04:05 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * parse.y (parse_string): there should be newline escape by
- backslashes in strings.
+ * compile.c (defined_expr): guard the whole expression.
+ [ruby-dev:45021][Bug#5786]
- * parse.y (parse_qstring): ditto.
+Sat Feb 11 08:34:42 2012 Eric Hodel <drbrain@segment7.net>
-Mon May 3 04:37:20 1999 Koji Arai <JCA02266@nifty.ne.jp>
+ * ext/zlib/zlib.c (rb_inflate_add_dictionary): Added
+ Zlib::Inflate#add_dictionary to allow users to pre-specify
+ for using during #inflate. [ruby-trunk - Feature #5937]
- * ext/tcltklib/extconf.rb: better search for libX11.
+Sat Feb 11 08:23:02 2012 Eric Hodel <drbrain@segment7.net>
- * range.c (range_s_new): embarrassing =/== typo.
+ * ext/zlib/zlib.c (do_inflate): Inflate more data if buffered data
+ exists. Allows Zlib::Inflate#set_dictionary to work.
+ [ruby-trunk - Bug #5929]
- * re.c (Init_Regexp): failed to set default kcode.
+Sat Feb 11 06:00:48 2012 NARUSE, Yui <naruse@ruby-lang.org>
-Mon May 3 02:39:55 1999 WATANABE Tetsuya <tetsu@jpn.hp.com>
+ * dir.c (fnmatch): The * needs to be escaped to avoid formatting in
+ fnmatch comment.
+ patched by @dalton. https://github.com/ruby/ruby/pull/91
- * ext/socket/socket.c (open_inet): typo (res and res0).
+Fri Feb 10 03:41:31 2012 Aaron Patterson <aaron@tenderlovemaking.com>
-Tue May 4 02:07:49 1999 Yukihiro Matsumoto <matz@netlab.co.jp>
+ * ext/psych/parser.c: removed external encoding setter, allow parser
+ to be reused.
+ * ext/psych/lib/psych/parser.rb: added external encoding setter.
+ * test/psych/test_parser.rb: test parser reuse
- * mkconfig.rb: leave undefined $(VARIABLE) unexpanded in the
- Config::CONFIG hash table.
+Fri Feb 10 01:30:41 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Mon May 3 09:37:22 1999 Yukihiro Matsumoto <matz@netlab.co.jp>
+ * ext/dl/dl.h (ALIGN_OF): use offsetof().
- * regex.c (re_compile_pattern): expand exactn{n} at compile time.
- handles stop_paren specially.
+ * ext/dl/dl.h (DLALIGN): round up at once and get rid of overflow.
- * regex.c (re_compile_pattern): expand x{n} at compile time.
+Fri Feb 10 00:47:07 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * regex.c (re_search): posix line match should be checked.
+ * test/ruby/envutil.rb (assert_no_memory_leak): new assertion to
+ check memory leak by invoking child ruby process and watch its
+ memory size.
- * regex.c (re_search): a bug in anchor condition.
+Thu Feb 9 23:41:44 2012 CHIKANAGA Tomoyuki <nagachika00@gmail.com>
-Fri Apr 30 18:57:41 1999 Yukihiro Matsumoto <matz@netlab.co.jp>
+ * test/pathname/test_pathname.rb (test_binread): add assertion to
+ check encoding.
- * version 1.3.3
+Thu Feb 9 16:48:19 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * string.c (rb_str_rindex): position should be END point, not
- START point.
+ * ext/dl/dl.c (Init_dl): fix mangled document.
- * re.c (rb_reg_search): pos means end point on reverse now.
+Thu Feb 9 16:10:34 2012 NAKAMURA Usaku <usa@ruby-lang.org>
- * array.c (rb_ary_s_create): should clear ary->ptr to avoid
- potential gc crash.
+ * test/ruby/memory_status.rb (Memory::Win32): 64bit support.
-Fri Apr 30 15:24:58 1999 Yukihiro Matsumoto <matz@netlab.co.jp>
+Thu Feb 9 16:08:55 2012 NAKAMURA Usaku <usa@ruby-lang.org>
- * ext/socket/addrinfo.h: compatibility hack for ipv4.
+ * ext/dl/lib/value.rb (DL::ValueUtil.{unsigned_value,signed_value}):
+ currently pack/unpack does not accept "q!" and "Q!".
- * ext/socket/socket.c: itojun's ipv6 patches applied.
+Thu Feb 9 16:01:29 2012 NAKAMURA Usaku <usa@ruby-lang.org>
- * ext/socket/extconf.rb: detect ipv6 features based on itojun's
- ipv6 patches.
+ * ext/fiddle/conversions.c (value_to_generic): src is not guaranteed as
+ a Bignum if the type is LONG_LONG. it may be a Fixnum if the value
+ is small.
- * ext/extmk.rb.in (enable_config): can handle --enable-xxx now.
+Thu Feb 9 11:32:36 2012 NAKAMURA Usaku <usa@ruby-lang.org>
- * lib/mkmf.rb (enable_config): ditto.
+ * ext/dl/lib/types.rb: Win64 support.
-Fri Apr 30 05:22:23 1999 Shugo Maeda <shugo@netlab.co.jp>
+Thu Feb 9 04:12:29 2012 NARUSE, Yui <naruse@ruby-lang.org>
- * string.c (rb_str_aset): last index should not append.
+ * test/pathname/test_pathname.rb: not read but binread.
+ patched by Benoit Daloze, [ruby-core:42440] [Bug #5984]
-Thu Apr 29 18:55:31 1999 WATANABE Hirofumi <eban@os.rim.or.jp>
+Wed Feb 8 22:29:59 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * dln.c (conv_to_posix_path): remove const from args.
+ * string.c (rb_str_modify_expand): fix memory leak.
- * ruby.c (rubylib_mangle): remove Fatal(), the obsolete function.
+Wed Feb 8 14:06:59 2012 Hiroshi Nakamura <nahi@ruby-lang.org>
-Tue Apr 27 14:11:45 1999 Yukihiro Matsumoto <matz@netlab.co.jp>
+ * ext/openssl/ossl_ssl.c: Add SSL constants and allow to unset SSL
+ option to prevent BEAST attack. See [Bug #5353].
- * parse.y (fname): lazy workaround for keywords did not work well.
+ In OpenSSL, OP_DONT_INSERT_EMPTY_FRAGMENTS is used to prevent
+ TLS-CBC-IV vulnerability described at
+ http://www.openssl.org/~bodo/tls-cbc.txt
+ It's known issue of TLSv1/SSLv3 but it attracts lots of attention
+ these days as BEAST attack. (CVE-2011-3389)
- * ext/extmk.rb.in: `--with-xxx=yyy' argument configuration.
+ Until now ossl sets OP_ALL at SSLContext allocation and call
+ SSL_CTX_set_options at connection. SSL_CTX_set_options updates the
+ value by using |= so bits set by OP_ALL cannot be unset afterwards.
- * lib/mkmf.rb: ditto.
+ This commit changes to call SSL_CTX_set_options only 1 time for each
+ SSLContext. It sets the specified value if SSLContext#options= are
+ called and sets OP_ALL if not.
- * misc/ruby-mode.el: forgot to handle $`.
+ To help users to unset bits in OP_ALL, this commit also adds several
+ constant to SSL such as
+ OpenSSL::SSL::OP_DONT_INSERT_EMPTY_FRAGMENTS. These constants were
+ not exposed in Ruby because there's no way to unset bits in OP_ALL
+ before.
- * ext/extmk.rb.in: better AIX link support proposed by
- <komatsu@sarion.co.jp>.
+ Following is an example to enable 0/n split for BEAST prevention.
-Mon Apr 26 16:46:59 1999 Yukihiro Matsumoto <matz@netlab.co.jp>
+ ctx.options = OP_ALL & ~OP_DONT_INSERT_EMPTY_FRAGMENTS
- * ext/extmk.rb.in: AIX shared library support modified.
+ * test/openssl/test_ssl.rb: Test above option exists.
- * ext/aix_mksym.rb: ditto.
+Wed Feb 8 13:12:02 2012 Martin Bosslet <Martin.Bosslet@googlemail.com>
- * configure.in: ditto.
+ * ext/openssl/ossl_x509name.c: Use the numerical representation of
+ unrecognized OIDs instead of the sn "UNDEF".
- * sprintf.c (rb_f_sprintf): should allocate proper sized buffer
- for float numbers.
+ * test/openssl/test_x509name.rb: Add tests for the fixed behavior.
-Sat Apr 24 00:00:16 1999 Yukihiro Matsumoto <matz@netlab.co.jp>
+ Patch provided by Paul Kehrer, thank you!
+ [ruby-core:41769] [Feature #5787]
- * parse.y (operation): syntax like `a.[]=(1,2)' is allowed.
+Wed Feb 8 09:49:58 2012 NARUSE, Yui <naruse@ruby-lang.org>
-Fri Apr 23 23:54:09 1999 Yukihiro Matsumoto <matz@netlab.co.jp>
+ * tool/merger.rb: don't abort, update first.
- * io.c (argf_binmode): binmode method added to ARGF.
+Wed Feb 8 09:47:33 2012 Martin Bosslet <Martin.Bosslet@googlemail.com>
-Fri Apr 23 13:55:22 1999 Yukihiro Matsumoto <matz@netlab.co.jp>
+ * ext/openssl/ossl_asn1.c: Call INT2NUM only once for GeneralString.
+ Thanks to Mantas Mikulenas for noticing and providing a patch!
+ [ruby-core:42358] [Bug #5972]
- * string.c (rb_f_chomp): should assign the result to $_. or maybe
- sub/gsub/chop/chomp should NOT assign $_ altogether.
+Wed Feb 8 09:19:00 2012 Martin Bosslet <Martin.Bosslet@googlemail.com>
-Thu Apr 22 16:50:54 1999 Yukihiro Matsumoto <matz@netlab.co.jp>
+ * ext/openssl/ossl_cipher.c: Add warning about key as IV.
- * eval.c (rb_callcc): call scope_dup() for all scopes in
- the interpreter stack.
+Tue Feb 7 20:08:12 2012 Ayumu AIZAWA <ayumu.aizawa@gmail.com>
-Tue Apr 20 11:24:18 1999 Yukihiro Matsumoto <matz@netlab.co.jp>
+ * error.c (exc_inspect): Fix typo. patch from Trent Ogren
+ via https://github.com/ruby/ruby/pull/90
- * string.c (rb_str_dump): `#' should be escaped.
+Tue Feb 7 19:37:35 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Tue Apr 20 02:32:42 1999 Yukihiro Matsumoto <matz@netlab.co.jp>
+ * st.c: refactor packed entries using structs.
- * parse.y (parse_regx): option /p for posix match added.
+Tue Feb 7 14:52:10 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * re.c (rb_reg_desc): did not print options properly.
+ * st.c (st_update): table can be unpacked in the callback.
- * io.c (rb_file_s_open): initialize was called twice.
+ * st.c (st_foreach): should not yield same pair when checking
+ after unpacking.
-Mon Apr 19 18:56:21 1999 Yukihiro Matsumoto <matz@netlab.co.jp>
+Mon Feb 6 21:55:13 2012 NARUSE, Yui <naruse@ruby-lang.org>
- * configure.in (DEFAULT_KCODE): can specify default code for
- $KCODE by --with-default-kcode=(euc|sjis|utf8|none).
+ * tool/merger.rb: abort if the working directory is dirty.
- * regex.c (IS_A_LETTER): a byte sequence shorter than mbc should
- not match with \w etc.
+ * tool/merger.rb: update the working directory after commit.
-Mon Apr 19 13:49:11 1999 Yukihiro Matsumoto <matz@netlab.co.jp>
+Mon Feb 6 00:16:27 2012 NARUSE, Yui <naruse@ruby-lang.org>
- * eval.c (eval): should restore ruby_dyna_vars.
+ * encoding.c (rb_enc_compatible): return ASCII-8BIT even if 2nd string
+ is ascii only string. [ruby-core:42354] [Bug #5968]
-Fri Apr 16 21:40:43 1999 Nobuyoshi Nakada <gea02117@nifty.ne.jp>
+Fri Feb 3 07:16:47 2012 Eric Hodel <drbrain@segment7.net>
- * io.c (f_backquote): pipe_open may return nil.
+ * lib/webrick.rb: Moved proxy rewriting to WEBrick::HTTPProxy.
+ * lib/webrick/httpproxy.rb: Add examples of creating a proxy server
+ and response rewriting using HTTPProxy.
- * io.c (f_open): rb_io_open may return nil.
+Fri Feb 3 06:53:22 2012 Eric Hodel <drbrain@segment7.net>
- * io.c (io_s_foreach): ditto.
+ * ext/openssl/ossl_x509store.c: Add class documentation for
+ OpenSSL::X509::Store
- * io.c (io_s_readlines): ditto.
+Thu Feb 2 22:28:13 2012 Kazuhiro NISHIYAMA <zn@mbf.nifty.com>
- * io.c (io_defset): wrong message.
+ * test/net/http/test_https_proxy.rb
+ (HTTPSProxyTest#test_https_proxy_authentication):
+ add workaround to avoid to hang up without openssl.
+ see [ruby-dev:45021][Bug #5786]
-Fri Apr 16 15:09:20 1999 Yukihiro Matsumoto <matz@netlab.co.jp>
+ * test/resolv/test_dns.rb (TestResolvDNS#test_query_ipv4_address):
+ ditto.
- * bignum.c (rb_str2inum): strtoul() returns long, not int.
+Thu Feb 2 21:48:18 2012 Kouhei Sutou <kou@cozmixng.org>
- * eval.c (rb_load): size of VALUE and ID may be different.
+ * lib/rexml/parsers/baseparser.rb: use meaningful names.
- * util.c (mmprepare): int is too small to cast from pointers.
+Thu Feb 2 21:38:52 2012 Kouhei Sutou <kou@cozmixng.org>
- * config.guess: avoid 'linux-gnu' for alpha-unknown-linux.
+ * lib/rexml/parsers/baseparser.rb, test/rexml/test_namespace.rb:
+ fix the default xml namespace URI validation.
+ [ruby-dev:45169] [Bug #5956]
+ Reported by Miho Hiramatsu. Thanks!!!
-Thu Apr 15 23:46:20 1999 WATANABE Hirofumi <watanabe@ase.ptg.sony.co.jp>
+Thu Feb 2 17:51:02 2012 NARUSE, Yui <naruse@ruby-lang.org>
- * ruby.c (rubylib_mangle): mangle path by RUBYLIB_PREFIX.
+ * io.c (argf_next_argv): reset ARGF.next_p on ARGV.replace.
+ r34409 breaks replacing ARGV.
+ [ruby-dev:45160] [Bug #5952]
-Wed Apr 14 23:52:51 1999 SHIROYAMA Takayuki <psi@fortune.nest.or.jp>
+Thu Feb 2 16:21:01 2012 NAKAMURA Usaku <usa@ruby-lang.org>
- * node.h (NODE_LMASK): should be long to avoid overflow.
+ * test/net/http/test_http.rb (TestNetHTTPKeepAlive#*): remove debug
+ output.
-Wed Apr 14 13:14:35 1999 Katsuyuki Komatsu <komatsu@sarion.co.jp>
+Thu Feb 2 01:24:34 2012 Yusuke Endoh <mame@tsg.ne.jp>
- * dln.c: AIX dynamic link.
+ * parse.y (debug_lines, coverage): set file path encoding for coverage
+ result. [ruby-dev:44950]
- * ext/aix_ld.rb: ditto.
+Wed Feb 1 14:38:31 2012 Akinori MUSHA <knu@iDaemons.org>
-Wed Apr 14 12:19:09 1999 Yukihiro Matsumoto <matz@netlab.co.jp>
+ * lib/tempfile.rb (Tempfile#unlink, Tempfile::Remover#call): Just
+ call File.unlink and ignore ENOENT because existence check
+ before unlinking does not help in terms of race condition.
- * lib/thread.rb: Queue#{enq,deq} added.
+ * lib/tempfile.rb (Tempfile#unlink, Tempfile::Remover#call): My
+ comment about thread safeness is obsolete.
-Tue Apr 13 17:43:56 1999 Yukihiro Matsumoto <matz@netlab.co.jp>
+Wed Feb 1 09:50:10 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * hash.c (rb_hash_s_create): Hash::[] acts more like casting.
+ * doc/re.rdoc (Repetition): fix typo. reported by Ori Avtalion
+ and patched by Zachary Scott. [Bug #5947]
-Tue Apr 13 00:33:52 1999 Yukihiro Matsumoto <matz@netlab.co.jp>
+Wed Feb 1 06:38:54 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * io.c (rb_io_stdio_set): warning for assignment to the variables
- $std{in,out,err}.
+ * io.c (argf_close): skip stdin, which should be readable again.
+ [ruby-dev:45160] [Bug #5952]
-Mon Apr 12 23:12:32 1999 Yukihiro Matsumoto <matz@netlab.co.jp>
+ * io.c (argf_readlines): reinitialize after all read to be
+ readable again.
- * io.c (rb_io_reopen): check for reopening same IO.
+Tue Jan 31 21:27:43 2012 Narihiro Nakamura <authornari@gmail.com>
-Fri Apr 9 17:45:11 1999 Yukihiro Matsumoto <matz@netlab.co.jp>
+ * configure.in (HEAP_ALIGN_LOG): HEAP_ALIGN_LOG should be page
+ size in OpenBSD. [ruby-core:42158][Bug #5901]
- * parse.y (rb_compile_string): bug for nested eval().
+ * gc.c : avoid to redefine.
- * regex.c (re_match): should pop non-greedy stack items on
- failure, after best_regs are fixed.
+Tue Jan 31 14:27:22 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Thu Apr 8 17:30:40 1999 Yukihiro Matsumoto <matz@netlab.co.jp>
+ * test/ruby/envutil.rb (EnvUtil.invoke_ruby): yield also child pid
+ in block form.
- * pack.c (PACK_LENGTH_ADJUST): need to adjust for `*' length.
+Mon Jan 30 19:08:19 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Tue Apr 6 23:28:44 1999 Yukihiro Matsumoto <matz@netlab.co.jp>
+ * vm_eval.c (vm_call0): should pass block to enumerators. patched
+ by Kazuki Tsujimoto. [ruby-dev:44961][Bug #5731]
- * parse.y (void_check): add void context checks.
+ * vm_eval.c (method_missing), vm_insnhelper.c (vm_call_method):
+ ditto. patched by satoshi shiba.
-Mon Apr 5 12:23:42 1999 Yukihiro Matsumoto <matz@netlab.co.jp>
+Mon Jan 30 12:31:05 2012 NAKAMURA Usaku <usa@ruby-lang.org>
- * time.c (time_s_at): should copy gmt-mode.
+ * file.c (append_fspath): need to set the encoding to result always.
- * eval.c (eval_node): preserve ruby_eval_tree.
+Mon Jan 30 10:38:37 2012 NAKAMURA Usaku <usa@ruby-lang.org>
-Fri Apr 2 14:00:34 1999 NAKAMURA, Hiroshi <nakahiro@sarion.co.jp>
+ * test/irb/test_completion.rb: skip if cannot load irb/completion
+ (maybe readline does not exist).
- * lib/debug.rb: wrong command interpreting.
+Sun Jan 29 22:47:19 2012 Yutaka Kanemoto <kanemoto@ruby-lang.org>
-Fri Apr 2 11:46:22 1999 Yukihiro Matsumoto <matz@netlab.co.jp>
+ * tool/config.{guess,sub}: updated to automake-1.11.2.
- * version 1.3.2
+Sun Jan 29 12:17:56 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Fri Apr 2 10:40:04 1999 Yukihiro Matsumoto <matz@netlab.co.jp>
+ * ext/readline/readline.c (readline_attempted_completion_function):
+ respect encodings. [Bug #5941]
- * io.c (rb_io_s_pipe): forgot to define IO::pipe.
+Sat Jan 28 09:33:33 2012 Hiroshi Shirosaki <h.shirosaki@gmail.com>
-Thu Apr 1 14:40:46 1999 Yukihiro Matsumoto <matz@netlab.co.jp>
+ * win32/win32.c (rb_w32_read): fix an issue that $stdin.read doesn't
+ terminate by CTRL-C on Windows.
+ [ruby-dev:45149] [Bug #5812]
- * eval.c (assign): modified for rhs change.
+Sat Jan 28 08:18:11 2012 Hiroshi Shirosaki <h.shirosaki@gmail.com>
- * parse.y (stmt): unparenthesisized method calls can be right hand
- side expression of the assignment.
+ * test/ruby/test_thread.rb
+ (TestThreadGroup#test_thread_timer_and_interrupt): skip exit status
+ assertion because we cannot get signal status on Windows.
-Sat Mar 27 22:42:47 1999 Koji Arai <JCA02266@nifty.ne.jp>
+ * win32/win32.c (CreateChild): create process group to receive the
+ signal by GenerateConsoleCtrlEvent().
- * ext/nkf/nkf.c (rb_nkf_kconv): check size output_ctr before
- decrement.
+ * win32/win32.c (kill): use CTRL_BREAK_EVENT instead of CTRL_C_EVENT
+ if a process group is specified. CTRL_C_EVENT signal cannot be
+ generated for process groups for the specification.
+ [ruby-dev:45149] [Bug #5812]
-Thu Mar 25 09:11:03 1999 Yukihiro Matsumoto <matz@netlab.co.jp>
+Sat Jan 28 07:46:03 2012 Hiroshi Shirosaki <h.shirosaki@gmail.com>
- * time.c (time_s_at): preserve gmt-mode for result.
+ * thread_win32.c (rb_w32_wait_events_blocking): use
+ ruby_thread_from_native() instead of GET_THREAD() because
+ GET_THREAD() doesn't always return the current thread and
+ WaitForMultipleObjects() at rb_w32_read() doesn't return by
+ Thread#kill. This fixes TestQueue#test_thr_kill failure on
+ Windows.
- * parse.y (rb_compile_string): do not use cur_mid, use
- compile_for_eval instead.
+ * thread_win32.c (rb_w32_wait_events): use ruby_thread_from_native()
+ instead of GET_THREAD() for consistency with the above change.
- * st.c (PTR_NOT_EQUAL): wrong logical condition.
+ * thread_win32.c (rb_w32_sleep): ditto.
-Wed Mar 24 13:06:43 1999 Yukihiro Matsumoto <matz@netlab.co.jp>
+ * thread_win32.c (rb_w32_Sleep): ditto.
+ [ruby-dev:45149] [Bug #5812]
- * parse.y (yycompile): should clear cur_mid after compilation.
+Sat Jan 28 07:28:48 2012 Hiroshi Shirosaki <h.shirosaki@gmail.com>
- * io.c (next_argv): need to check type for ARGV.shift.
+ * test/zlib/test_zlib.rb (TestZlibGzipReader#test_reader_wrap): set
+ binmode explicitly for fixing test error on Windows. This is consistent
+ with r34243.
+ [ruby-dev:45149] [Bug #5812]
- * eval.c (blk_copy_prev): need to preserve outer scope as well as
- outer frames.
+Sat Jan 28 05:53:34 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * parse.y (rb_compile_string): return can appear within eval().
+ * lib/irb/completion.rb (IRB::InputCompletor::CompletionProc):
+ ignore non-string name modules. [ruby-core:42244][Bug #5938]
-Tue Mar 23 10:15:07 1999 EGUCHI Osamu <eguchi@shizuokanet.ne.jp>
+Fri Jan 27 16:31:45 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * configure.in: AC_C_CONST check added.
+ * gc.c (HEAP_ALIGN, HEAP_ALIGN_MASK): DRY, let compiler calculate
+ from HEAP_ALIGN_LOG.
-Tue Mar 23 02:07:35 1999 Yukihiro Matsumoto <matz@netlab.co.jp>
+Thu Jan 26 11:03:37 2012 Eric Hodel <drbrain@segment7.net>
- * time.c (time_plus): preserve gmt-mode for result.
+ * lib/matrix.rb: Clean up extra whitespace in output documentation.
-Mon Mar 22 01:32:37 1999 Yukihiro Matsumoto <matz@netlab.co.jp>
+Thu Jan 26 03:24:02 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * eval.c (rb_eval): adjust line numbers before expression
- interpolation within strings.
+ * ext/io/console/console.c (io_getch): default delegating method
+ for StringIO. https://github.com/nobu/io-console/issues/4
- * eval.c (rb_eval): defined? returns nil for false condition.
+ * ext/stringio/stringio.c: moved some methods to hidden modules.
- * numeric.c (num_nonzero_p): returns nil for false condition.
+Wed Jan 25 13:27:42 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Sat Mar 20 13:07:43 1999 Keiju Ishitsuka <keiju@rational.com>
+ * file.c (rb_file_s_basename): ignore non-ascii extension in
+ different encoding, which cannot match.
- * lib/weakref.rb: avoid leak for two weakrefs for one object.
+ * file.c (rmext): no extension to strip if empty string.
-Fri Mar 19 11:26:45 1999 WATANABE Hirofumi <watanabe@ase.ptg.sony.co.jp>
+ * file.c (rb_enc_path_next, rb_enc_path_skip_prefix)
+ (rb_enc_path_last_separator, rb_enc_path_end)
+ (ruby_enc_find_basename, ruby_enc_find_extname): encoding-aware
+ path handling functions.
- * eval.c (ruby_run): needed to eval END{} on exit.
+ * file.c (rb_home_dir, file_expand_path, rb_realpath_internal)
+ (rb_file_s_basename, rb_file_dirname, rb_file_s_extname)
+ (rb_file_join): should respect the encodings of arguments than
+ file system encoding. [ruby-dev:45145] [Bug #5919]
- * eval.c (rb_exit): ditto.
+ * dir.c (check_dirname, ruby_glob0): ditto.
-Fri Mar 19 02:17:27 1999 Yukihiro Matsumoto <matz@netlab.co.jp>
+ * ext/pathname/pathname.c (path_sub_ext): ditto.
- * signal.c (Init_signal): handles terminating signals HUP, TERM,
- QUIT, PIPE, etc.
+Tue Jan 24 14:20:42 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Thu Mar 18 15:47:18 1999 Yukihiro Matsumoto <matz@netlab.co.jp>
+ * vm.c (rb_iter_break_value): new function to break a block with
+ the value. [ruby-dev:45132] [Feature #5895]
- * bignum.c (rb_big_and): bug in sign calculation.
+Tue Jan 24 12:58:41 2012 Yukihiro Matsumoto <matz@ruby-lang.org>
- * bignum.c (rb_big_or): ditto.
+ * object.c (rb_Hash): add Kernel#Hash conversion method like
+ Array() or Float(). a patch from Run Paint Run Run. Fix #3131
- * io.c (rb_f_select): forgot to use to_io to retrieve IO, after
- calling select(2).
+Tue Jan 24 11:38:05 2012 NARUSE, Yui <naruse@ruby-lang.org>
-Tue Mar 16 19:54:31 1999 WATANABE Hirofumi <watanabe@ase.ptg.sony.co.jp>
+ * lib/uri/common.rb (URI.encode_www_form_component): initialize on
+ requiring to support JRuby, which runs parallel multithreads.
+ [ruby-core:42222] [Bug #5925]
- * ext/extmk.rb.in: static linking cause infinite make loop.
+ * lib/uri/common.rb (URI.decode_www_form_component): initialize on
-Tue Mar 16 18:50:04 1999 Yoshida Masato <yoshidam@yoshidam.net>
+Mon Jan 23 20:33:11 2012 Jason Kay <geniture@me.com>
- * ext/socket/socket.c (tcp_s_gethostbyname): typo, not NUM2INT(),
- but INT2NUM().
+ * lib/net/http.rb (Net::HTTP#connect): Writing entire packet at
+ once to avoid incomplete transmission. Current code using
+ writeline was causing sub-optimal conversing with a proxy due to
+ the connect tunnel request headers being split over multiple
+ packets. The modification I made allows the connect request to
+ be written as one packet, avoiding problems and optimizing the
+ conversation.
- * ext/socket/socket.c (mkhostent): ditto.
+ https://github.com/ruby/ruby/pull/72
+ [Feature #5460]
-Tue Mar 16 12:31:44 1999 Ryo HAYASAKA <hayasaka@cheer.u-aizu.ac.jp>
+Mon Jan 23 17:06:17 2012 NARUSE, Yui <naruse@ruby-lang.org>
- * file.c (utime_internal): suppress warning by const.
+ * lib/uri/mailto.rb (URI::MailTo.build): follow Array#to_s change of
+ Ruby 1.9; use Array#join. [Bug #5840]
- * time.c (time_gmtime): ditto.
+Mon Jan 23 16:42:28 2012 NARUSE, Yui <naruse@ruby-lang.org>
-Tue Mar 16 10:23:05 1999 Yukihiro Matsumoto <matz@netlab.co.jp>
+ * io.c (extract_binmode): raise an exception if binmode/textmode
+ is specified with both vmode and opthash.
+ [ruby-core:42199] [Bug #5918]
- * time.c (time_clone): Time object can be cloned.
+Mon Jan 23 16:35:27 2012 NARUSE, Yui <naruse@ruby-lang.org>
-Tue Mar 16 03:13:10 1999 Koji Arai <JCA02266@nifty.ne.jp>
+ * io.c (rb_io_extract_modeenc): set ASCII-8BIT if binmode is specified
+ with opthash. [ruby-core:42197] [Bug #5917]
- * ruby.c (load_file): argv[argc] should be NULL.
+Mon Jan 23 10:08:00 2012 Kenta Murata <mrkn@cookpad.com>
-Mon Mar 15 22:12:08 1999 Tadayoshi Funaba <tadf@kt.rim.or.jp>
+ * test/cgi/test_cgi_util.rb (test_cgi_escape_preserve_encoding):
+ add a test for CGI::escape to preserve encoding.
- * sprintf.c (rb_f_sprintf): typo in arg_num check at exit.
+ * test/cgi/test_cgi_util.rb (test_cgi_unescape_preserve_encoding):
+ add a test for CGI::unescape to preserve encoding.
-Mon Mar 15 16:42:22 1999 Yukihiro Matsumoto <matz@netlab.co.jp>
+Mon Jan 23 00:45:34 2012 Akinori MUSHA <knu@iDaemons.org>
- * array.c (rb_ary_dup): dup2 should copy class too.
+ * misc/rdoc-mode.el (rdoc-imenu-create-index): Add imenu support
+ to rdoc-mode.
-Mon Mar 15 15:12:53 1999 Yasuhiro Fukuma <yasuf@big.or.jp>
+ * misc/rdoc-mode.el (rdoc-mode): Fix regexp patterns containing
+ "\s " where CR/LF is not supposed to match.
- * lib/mkmf.rb: install program relative path check.
+Sun Jan 22 15:41:26 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Mon Mar 15 14:05:25 1999 Yukihiro Matsumoto <matz@netlab.co.jp>
+ * parse.y (rb_intern3): split to registration check and new
+ registration.
- * re.c (rb_reg_s_new): 2nd argument is now option.
- Regexp::EXTENDED can be specified.
+ * parse.y (rb_intern_str): make interned string shared with the
+ given string.
-Fri Mar 12 10:47:49 1999 Yukihiro Matsumoto <matz@netlab.co.jp>
+ * parse.y (rb_intern3, rb_intern_str): check the coderange first.
- * string.c (rb_str_index): str.index("") should always match at
- offset point.
+Sat Jan 21 22:21:07 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * string.c (rb_str_upto): can specify end point exclusion.
+ * include/ruby/ruby.h (FIXNUM_P): simple flag should be int.
- * string.c (rb_str_index): negative offset.
+Sat Jan 21 21:51:19 2012 NARUSE, Yui <naruse@ruby-lang.org>
- * regex.c (re_match): begline should not match at the point
- between a newline and end-of-string. endline neither.
+ * encoding.c (rb_enc_compatible): fix segv on symbols.
+ [ruby-core:42204] [Bug #5921]
- * regex.c (re_compile_pattern): context_indep_anchors .
+Sat Jan 21 11:43:45 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * parse.y (parse_regx): need not to push backslashes before
- escaped characters.
+ * dir.c (dir_chdir, check_dirname): get rid of optimization-out.
- * eval.c (rb_thread_join): re-raises exception within target.
+Fri Jan 20 20:47:37 2012 Kenta Murata <mrkn@cookpad.com>
-Fri Mar 12 01:09:36 1999 Koji Arai <JCA02266@nifty.ne.jp>
+ * lib/cgi/util.rb (CGI.escape): support a string with invalid byte
+ sequence. [Bug #5913]
- * ext/readline/readline.c (readline_s_vi_editing_mode): wrong
- number of arguments.
+ * test/cgi/test_cgi_util.rb
+ (test_cgi_escape_with_invalid_byte_sequence): test for the above
+ change.
-Fri Mar 12 02:12:50 1999 Yukihiro Matsumoto <matz@netlab.co.jp>
+Fri Jan 20 17:37:37 2012 NARUSE, Yui <naruse@ruby-lang.org>
- * pack.c (PACK_ITEM_ADJUST): "a".unpack("C3") => [97, nil, nil]
+ * vm.c (vm_exec): remove workaround for LLVM because r34278 fixes it.
-Thu Mar 11 18:23:50 1999 WATANABE Tetsuya <tetsu@jpn.hp.com>
+ * vm_insnhelper.c (vm_call_cfunc): ditto.
- * ext/socket/socket.c (Init_socket): UDPsocket was omitted.
+Fri Jan 20 14:31:43 2012 NARUSE, Yui <naruse@ruby-lang.org>
-Thu Mar 11 16:43:30 1999 Yukihiro Matsumoto <matz@netlab.co.jp>
+ * lib/net/http.rb (Net::HTTP#transport_request): retry a idempotent
+ request automatically. [ruby-dev:45030] [Bug #5790]
+ [ruby-core:41821] [Bug #5813]
- * pack.c (PACK_LENGTH_ADJUST): push fixed number of items per
- template to result array.
+ * lib/net/http.rb (Net::HTTP#keep_alive_timeout=): added to specify
+ the second to reconnect the TCP connection on Keep-Alive.
+ The default value is 2 second because current servers uses 2 sec.
+ http://ftp-admin.blogspot.com/2009/09/keepalivetimeout2.html
- * pack.c (pack_unpack): I/N/C etc. push nil in the array for "".
+ * lib/net/http.rb (Net::HTTP#begin_transport): reconnect TCP
+ connection on keep-alive timeout.
-Tue Mar 9 00:19:21 1999 Yukihiro Matsumoto <matz@netlab.co.jp>
+Thu Jan 19 07:53:09 2012 Tadayoshi Funaba <tadf@dotrb.org>
- * hash.c (ruby_unsetenv): use ruby_setenv(name, 0).
+ * ext/date/date_strptime.c: moved detector of leftover.
- * hash.c (env_delete): ditto.
+Thu Jan 19 07:10:47 2012 Tadayoshi Funaba <tadf@dotrb.org>
- * string.c (rb_str_upto): do not check `beg<end' to generate
- strings for the pattern like "a".upto("#a").
+ * ext/date/date_parse.c: [ruby-core:42173].
- * range.c (range_each): treat strings as special case.
+Wed Jan 18 18:11:02 2012 Akinori MUSHA <knu@iDaemons.org>
- * range.c (range_each): no longer use upto for generic cases.
+ * misc/rdoc-mode.el (rdoc-mode): Add provide so that requiring
+ this library succeeds.
-Sun Mar 7 14:21:32 1999 IKARASHI Akira <ikarashi@itlb.te.noda.sut.ac.jp>
+Wed Jan 18 18:06:45 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * string.c (rb_str_index): wrong end point calculation.
+ * ext/curses/curses.c (cWindow, cMouseEvent): made typed data.
-Sat Mar 6 02:19:12 1999 Yukihiro Matsumoto <matz@netlab.co.jp>
+Wed Jan 18 12:49:15 2012 Aaron Patterson <aaron@tenderlovemaking.com>
- * re.c (match_index): MatchingData#index(n) added.
+ * ext/psych/lib/psych/visitors/to_ruby.rb: Added support for loading
+ subclasses of String with ivars
+ * ext/psych/lib/psych/visitors/yaml_tree.rb: Added support for dumping
+ subclasses of String with ivars
+ * test/psych/test_string.rb: corresponding tests
- * array.c (rb_ary_subseq): ary[n..-1] returns an sub-array unless
- n is too small negative index.
+Wed Jan 18 10:39:47 2012 Aaron Patterson <aaron@tenderlovemaking.com>
- * re.c (rb_reg_match_method): Regexp#match(str) added.
+ * ext/psych/lib/psych/visitors/to_ruby.rb: Added ability to load array
+ subclasses with ivars.
+ * ext/psych/lib/psych/visitors/yaml_tree.rb: Added ability to dump
+ array subclasses with ivars.
+ * test/psych/test_array.rb: corresponding tests
- * array.c (rb_ary_indexes): understands ranges as indexes.
+Tue Jan 17 17:18:41 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * re.c (match_size): MatchingData#size added.
+ * configure.in (SPT_TYPE): enable as SPT_REUSEARGV on Darwin.
-Fri Mar 5 01:04:57 1999 Yukihiro Matsumoto <matz@netlab.co.jp>
+ * missing/setproctitle.c (ruby_init_setproctitle): changed prefix.
- * array.c (rb_ary_fill): modified for range.
+Tue Jan 17 12:32:46 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * array.c (rb_ary_aset): a[n..m] revisited.
+ * gc.c (aligned_malloc, aligned_free): covered missing defined
+ operators and fixes for cygwin.
-Thu Mar 4 14:23:29 1999 Yukihiro Matsumoto <matz@netlab.co.jp>
+Tue Jan 17 10:54:46 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * string.c (rb_str_subseq): a[n..m] revisited.
+ * st.c (do_hash): it's the time to remove cast to unsigned int.
- * parse.y (method_call): allow Const::method{}.
+Tue Jan 17 07:30:12 2012 NARUSE, Yui <naruse@ruby-lang.org>
- * array.c (rb_ary_replace_method): should replace original array.
+ * st.c (unpack_entries): Fix r34310: on unpacking, the position of
+ a hash must be do_hash-ed value.
-Thu Mar 4 02:30:22 1999 Yukihiro Matsumoto <matz@netlab.co.jp>
+ * st.c (add_packed_direct): ditto.
- * configure.in: remove --disable-thread, thread feature is no
- longer optional.
+Mon Jan 16 16:41:53 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Thu Mar 4 00:32:17 1999 Yasuhiro Fukuma <yasuf@big.or.jp>
+ * lib/optparse.rb (Regexp): fix incorrect options when casting to
+ a Regexp, and suppress encoding option warnings.
+ https://github.com/ruby/ruby/pull/82
- * parse.y (read_escape): wrong arguments for scan_oct,scan_hex.
+Mon Jan 16 11:22:38 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Wed Mar 3 11:51:53 1999 Yukihiro Matsumoto <matz@netlab.co.jp>
+ * win32/win32.c (rb_chsize): no need to get the current file size.
- * ext/socket/socket.c (Init_socket): rename class names as
- TCPsocket -> TCPSocket etc.
+Mon Jan 16 00:41:33 2012 Sokolov Yura <funny.falcon@gmail.com>
-Tue Mar 2 19:46:42 1999 WATANABE Hirofumi <watanabe@ase.ptg.sony.co.jp>
+ * st.c: st use function instead of macro. In my current
+ environment (Ubuntu 11.04 32bit gcc-4.5.2) it gives 4%
+ performance improvement.
- * configure.in (LDSHARED): use gcc -Wl,-G for solaris with gcc.
+ https://github.com/ruby/ruby/pull/77
-Tue Mar 2 17:04:19 1999 Yukihiro Matsumoto <matz@netlab.co.jp>
+Sun Jan 15 14:09:48 2012 NARUSE, Yui <naruse@ruby-lang.org>
- * parse.y (yylex): backslashes do not concatenate comment lines
- anymore.
+ * object.c (rb_inspect): raise the result is not compatible with
+ the default external encoding. [ruby-core:42095] [Bug #5848]
+ If the default external encoding is ASCII compatible, the encoding of
+ inspected result must be compatible with it.
+ If the default external encoding is ASCII incompatible,
+ the result must be ASCII only.
-Mon Mar 1 14:05:12 1999 Yukihiro Matsumoto <matz@netlab.co.jp>
+Sun Jan 15 13:21:50 2012 NARUSE, Yui <naruse@ruby-lang.org>
- * eval.c (rb_call0): adjust argv for optional arguments. super
- without arguments emit superclass method with the value from
- optional arguments. enabled as experiment.
+ * ext/json/parser/parser.rl (json_string_unescape): workaround fix
+ for over optimization of GCC 4.7. [ruby-core:42085] [Bug #5888]
+ http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51862
-Sun Feb 28 14:04:07 1999 WATANABE Hirofumi <eban@os.rim.or.jp>
+Sat Jan 14 22:24:09 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * parse.y (nextc): backslash at the eof cause infinite loop
+ * ext/dl/callback/mkcallback.rb (gencallback): suppress unused
+ variables.
-Sun Feb 28 11:01:26 1999 Tadayoshi Funaba <tadf@kt.rim.or.jp>
+Sat Jan 14 21:56:43 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * time.c (make_time_t): month range check added.
+ * iseq.c (iseq_data_to_ary): check line info table boundary. line
+ number 0 means no line number info is needed. [ruby-dev:45130]
+ [Bug #5894]
-Sat Feb 27 02:36:05 1999 Yukihiro Matsumoto <matz@netlab.co.jp>
+Sat Jan 14 18:24:13 2012 CHIKANAGA Tomoyuki <nagachika00@gmail.com>
- * re.c (Init_Regexp): add escape as alias of quote.
+ * error.c (exc_equal): clear rb_thread_t::errinfo when ignore
+ an exception under rb_protect(). [ruby-core:41979] [Bug #5865]
- * re.c (rb_reg_s_quote): char-code can be specified now.
+Sat Jan 14 12:02:55 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Fri Feb 26 18:45:36 1999 Yasuhiro Fukuma <yasuf@big.or.jp>
+ * sprintf.c (rb_enc_vsprintf): relaxed the restriction. since the
+ implementation deeply depends on plain char, so wchar_t based
+ encodings are not supported.
- * eval.c (error_print): bug for error message with newlines.
+Sat Jan 14 12:00:20 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Fri Feb 26 12:00:04 1999 Yukihiro Matsumoto <matz@netlab.co.jp>
+ * error.c (exc_equal): ignore exceptions during implicit
+ conversion. [ruby-core:41979] [Bug #5865]
- * time.c (make_time_t): future check modified to allow 1969-12-31
- at certain timezone.
+Sat Jan 14 05:58:54 2012 Eric Hodel <drbrain@segment7.net>
- * time.c (time_arg): year >= 1000 should be past.
+ * io.c (rb_io_s_read): Fix formatting of open_args comment. Reported
+ by Adam Prescott.
- * version.c (Init_version): constant RELEASE_DATE added.
+Fri Jan 13 18:41:19 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Fri Feb 26 01:08:30 1999 Yukihiro Matsumoto <matz@netlab.co.jp>
+ * sprintf.c (rb_enc_vsprintf): can be used for ASCII compatible
+ encodings only.
- * string.c (rb_str_substr): returns nil for out-of-range access.
+Fri Jan 13 18:29:06 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * array.c (rb_ary_subseq): returns nil for out-of-range access.
+ * thread.c (rb_mutex_unlock_th): simplified.
- * array.c (rb_ary_store): negative index message has changed.
+ * thread.c (rb_barrier_waiting): fix potential overflows.
- * string.c (rb_str_aset): reallocation needed.
+Fri Jan 13 17:23:38 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * string.c (rb_str_aset): allow char append to the string.
+ * load.c (load_unlock): update loading table at once.
-Thu Feb 25 23:30:17 1999 Tadayoshi Funaba <tadf@kt.rim.or.jp>
+Fri Jan 13 16:44:45 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * time.c (time_load): tm_year should be packed in 17 bits, not 18.
+ * error.c (exc_equal): try implicit conversion for delegator.
+ [ruby-core:41979] [Bug #5865]
-Thu Feb 25 12:50:25 1999 Yukihiro Matsumoto <matz@netlab.co.jp>
+Fri Jan 13 03:46:53 2012 Akinori MUSHA <knu@iDaemons.org>
- * missing/dup2.c: replaced by public domain version.
+ * lib/shellwords.rb (Shellwords#shellescape): shellescape() now
+ stringifies the given object using to_s.
- * time.c (make_time_t): add `future check' in loops.
+ * lib/shellwords.rb (Shellwords#shelljoin): shelljoin() accepts
+ non-string objects in the given array, each of which is
+ stringified using to_s.
- * object.c (rb_num2dbl): forbid implicit conversion from nil, or
- strings. thus `Time.now + str' should raise error.
+ * lib/shellwords.rb: Fix rdoc markups.
- * object.c (rb_Float): convert nil into 0.0.
+Fri Jan 13 03:38:36 2012 Akinori MUSHA <knu@iDaemons.org>
- * object.c (rb_Integer): conversion method improved.
+ * lib/shellwords.rb (Shellwords#shellsplit): Fix a bug where
+ consecutive backslashes in double quotes are all removed except
+ the one at the tail.
-Thu Feb 25 03:27:50 1999 Shugo Maeda <shugo@netlab.co.jp>
+Fri Jan 13 03:28:00 2012 Luis Lavena <luislavena@gmail.com>
- * eval.c (rb_call): should handle T_ICLASS properly.
+ * ext/socket/extconf.rb (if ipv6): only define _WIN32_WINNT if was not
+ previously defined. This solve warnings with multiple defines in
+ command line with GCC 4.6.1
-Thu Feb 25 00:04:00 1999 Yukihiro Matsumoto <matz@netlab.co.jp>
+Thu Jan 12 18:44:31 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * error.c (Init_Exception): global function Exception() removed.
+ * lib/mkmf.rb: fix r33904 and revert r33905. initialize global
+ variables with init_mkmf before initializing constants.
+ [ruby-dev:45124] [Bug #5879]
- * variable.c (rb_class2name): returns "nil"/"true"/"false" for them.
+Thu Jan 12 13:51:00 2012 NARUSE, Yui <naruse@ruby-lang.org>
- * time.c (time_dump): time marshaling format compressed size from
- 11 bytes to 8 bytes. thanx to tadf@kt.rim.or.jp.
+ * cont.c (cont_restore_0): prevent optimizing out `sp'. sp is used for
+ reserving a memory space with ALLOCA_N for restoring machine stack
+ stored in cont->machine_stack, but clang optimized out it (and
+ maybe #5851 is also caused by this).
+ This affected TestContinuation#test_check_localvars.
- * eval.c (rb_obj_call_init): should specify arguments explicitly.
+ * cont.c (cont_restore_1): revert workaround introduced in r32201.
-Wed Feb 24 15:43:28 1999 Yukihiro Matsumoto <matz@netlab.co.jp>
+Thu Jan 12 02:14:43 2012 Ayumu AIZAWA <ayumu.aizawa@gmail.com>
- * parse.y (yylex): comment concatenation requires preceding space
- before backslash at the end of line.
+ * object.c: Added examples for Object#is_a? and
+ Object#instance_of? patched from Manoj Kumar.
+ [Bug #5880] [ruby-core:42057]
- * io.c (rb_f_pipe): global pipe is obsolete now.
+Thu Jan 12 00:57:48 2012 Kazuhiro NISHIYAMA <zn@mbf.nifty.com>
- * object.c (Init_Object): remove true.to_i, false.to_i.
+ * lib/mkmf.rb: verbose-mode can use by RM, RMDIRS, etc.
+ (e.g. make V=1 realclean)
-Tue Feb 23 14:21:41 1999 Yukihiro Matsumoto <matz@netlab.co.jp>
+Wed Jan 11 23:40:21 2012 Naohisa Goto <ngoto@gen-info.osaka-u.ac.jp>
- * parse.y (yylex): warn if identifier! immediately followed by `='.
+ * string.c (rb_str_concat): set array element after definition
+ to fix compile error with Fujitsu C Compiler 5.6 on Solaris 10
+ on Sparc. [Bug #5878] [ruby-dev:45123]
-Tue Feb 23 12:32:41 1999 WATANABE Hirofumi <watanabe@ase.ptg.sony.co.jp>
+Wed Jan 11 22:52:51 2012 CHIKANAGA Tomoyuki <nagachika00@gmail.com>
- * eval.c (rb_load): tilde expansion moved to find_file.
+ * gc.c (ruby_mimmalloc): don't set allocated size to header.
+ ruby_mimmalloc() doesn't increment allocated_size/allocations and
+ decrement them in ruby_xfree() cause inconsistency.
- * eval.c (find_file): tilde expansion added.
+ * gc.c (ruby_xfree): don't decrement allocated_size/allocations if
+ allocated size record is 0.
-Tue Feb 23 10:50:20 1999 Yukihiro Matsumoto <matz@netlab.co.jp>
+Wed Jan 11 22:36:43 2012 CHIKANAGA Tomoyuki <nagachika00@gmail.com>
- * eval.c (require_method): require can handle multiple fnames.
+ * test/readline/test_readline.rb (test_completion_proc_empty_result):
+ ensure clearance of Readline's line_buffer after the test.
- * hash.c (rb_hash_foreach_iter): hash key may be nil.
+Tue Jan 10 21:57:38 2012 Hiroshi Shirosaki <h.shirosaki@gmail.com>
-Mon Feb 22 17:44:02 1999 Yukihiro Matsumoto <matz@netlab.co.jp>
+ * ext/dbm/dbm.c (Init_dbm): fix a build error on mswin32.
+ use `extern __declspec(dllimport)` for dll link with VC.
+ [ruby-core:41996] [Bug #5869]
- * regex.c (re_match): should not pop failure point on success for
- non-greedy matches.
+Tue Jan 10 15:31:55 2012 NARUSE, Yui <naruse@ruby-lang.org>
- * io.c (Init_IO): remove global_functions getc, readchar, ungetc,
- seek, tell, rewind.
+ * vm.c (vm_exec): refix r34162; suppress warning and add description.
-Sat Feb 20 22:54:26 1999 Yukihiro Matsumoto <matz@netlab.co.jp>
+Tue Jan 10 15:13:58 2012 NARUSE, Yui <naruse@ruby-lang.org>
- * numeric.c (rb_num2long): no implicit conversion from boolean.
+ * ext/readline/readline.c (readline_attempted_completion_function):
+ use rb_memerror().
-Sat Feb 20 09:58:42 1999 EGUCHI Osamu <eguchi@shizuokanet.ne.jp>
+Tue Jan 10 12:49:42 2012 NARUSE, Yui <naruse@ruby-lang.org>
- * numeric.c (flo_to_s): portable Infinity and NaN support.
+ * gc.c: in fact, i686-linux doesn't need to define _XOPEN_SOURCE 600.
-Sat Feb 20 07:13:31 1999 WATANABE Tetsuya <tetsu@jpn.hp.com>
+Tue Jan 10 12:44:11 2012 NARUSE, Yui <naruse@ruby-lang.org>
- * io.c (rb_file_sysopen): forgot to initialize a local variable.
+ * gc.c (ruby_mimmalloc): defined for objects need not rb_objspace,
+ but should return pointer suitable for ruby_xfree;
+ main vm and main thread.
+ patched by Sokolov Yura. https://github.com/ruby/ruby/pull/79
-Fri Feb 19 23:05:07 1999 Yukihiro Matsumoto <matz@netlab.co.jp>
+ * internal.h: ditto.
- * string.c (rb_str_subseq): range check changed.
+ * vm.c (Init_BareVM): use ruby_mimmalloc.
- * marshal.c: increment MARSHAL_MINOR for Time format change.
+ * ext/dl/cfunc.c: #include <ruby/util.h>.
- * time.c (time_old_load): support old marshal format.
+ * ext/syslog/syslog.c: use xfree because it is allocated by
+ ruby_strdup.
- * time.c (time_load): changed for new format Y/M/D/h/m/s/usec.
+Tue Jan 10 12:13:56 2012 Kazuhiro NISHIYAMA <zn@mbf.nifty.com>
- * time.c (time_dump): marshal dump format has changed.
+ * ext/readline/readline.c (readline_attempted_completion_function):
+ fix compile error.
-Fri Feb 19 00:25:57 1999 Yukihiro Matsumoto <matz@netlab.co.jp>
+Tue Jan 10 10:41:11 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * time.c (time_arg): should reject "sep\0" and such.
+ * ext/readline/readline.c (readline_attempted_completion_function):
+ empty completion result does not mean memory error.
- * time.c (time_plus): Time#+ should not receive Time object
- operand.
+Tue Jan 10 02:19:22 2012 CHIKANAGA Tomoyuki <nagachika00@gmail.com>
- * string.c (rb_str_substr): negative length raises exception now.
+ * test/ruby/test_io.rb (test_autoclose_true_closed_by_finalizer,
+ test_autoclose_true_closed_by_finalizer): skip if IO objects are
+ not recycled yet. [ruby-dev:45098] [Bug #5850]
- * array.c (beg_len): if end == -1, it points end of the array.
+Tue Jan 10 00:41:28 2012 CHIKANAGA Tomoyuki <nagachika00@gmail.com>
- * array.c (rb_ary_subseq): negative length raises exception now.
+ * lib/tempfile.rb (Tempfile#_close): clear @tempfile and @data[1] even
+ when exception is raised at @tempfile.close. [ruby-dev:45113]
-Thu Feb 18 20:57:04 1999 Tadayoshi Funaba <tadf@kt.rim.or.jp>
+ * lib/tempfile.rb (Tempfile#unlink): fix a typo.
- * time.c (rb_strftime): strftime() may return 0 on success too.
+Tue Jan 10 00:32:17 2012 CHIKANAGA Tomoyuki <nagachika00@gmail.com>
- * time.c (time_strftime): `\0' within format string should not be
- omitted in the result.
+ * gc.c (run_finalizer): clear rb_thread_t::errinfo when ignore
+ an exception under rb_protect(). [ruby-dev:45113]
- * time.c (rb_strftime): zero length format.
+Mon Jan 9 23:37:43 2012 CHIKANAGA Tomoyuki <nagachika00@gmail.com>
- * time.c (time_to_a): yday start with 1 now.
+ * ext/readline/readline.c (readline_attempted_completion_function):
+ fix typos.
- * time.c (time_zone): support for long timezone name.
+Mon Jan 9 20:55:34 2012 Narihiro Nakamura <authornari@gmail.com>
- * time.c (time_yday): yday start with 1 now.
+ * gc.c : don't embed struct heaps_slot to a heap block because it
+ can causes copy-on-write of memory page on heap block when its
+ free_next is rewritten.
- * time.c (time_minus): minus calculation was wrong.
+Mon Jan 9 20:26:33 2012 Tanaka Akira <akr@fsij.org>
- * time.c (time_minus): sec, usec should be at least `long', maybe
- they should be `time_t'.
+ * ext/pathname/pathname.c (path_entries): add document suggested by
+ the thread [ruby-core:41959] [Bug #5859].
- * time.c (time_plus): addition with float was wrong.
+Mon Jan 9 20:14:13 2012 Tanaka Akira <akr@fsij.org>
- * time.c (time_to_s): support for long timezone name.
+ * ext/socket/lib/socket.rb (family_addrinfo): don't require protocol
+ equality. For example, protocol 0 and IPPROTO_TCP is not problem
+ for TCP.
- * time.c (time_gm_or_local): too far future check moved.
+Mon Jan 9 20:08:52 2012 Tanaka Akira <akr@fsij.org>
- * time.c (time_arg): treat 2 digit year as 69-99 => 1969-1999,
- 00-68 => 2000-2068
+ * ext/socket/lib/socket.rb (family_addrinfo): return the given
+ addrinfo object.
+ Patch by Ippei Obayashi. [ruby-dev:45095] [Bug #5845]
-Thu Feb 18 03:56:47 1999 Yukihiro Matsumoto <matz@netlab.co.jp>
+Mon Jan 9 19:40:20 2012 NAKAMURA Usaku <usa@ruby-lang.org>
- * missing/fnmatch.c: moved to missing directory.
+ * test/zlib/test_zlib.rb (TestZlibGzipWriter#test_writer_wrap): set
+ binmode explicitly.
-Wed Feb 17 16:22:26 1999 Yukihiro Matsumoto <matz@netlab.co.jp>
+Mon Jan 9 14:42:41 2012 Narihiro Nakamura <authornari@gmail.com>
- * struct.c (rb_struct_alloc): actual initialization now be done in
- `initialize'.
+ * gc.c: free_slots is changed Singly linked list. clear
+ free_slots before sweep.
-Wed Feb 17 09:47:15 1999 okabe katsuyuki <hgc02147@nifty.ne.jp>
+Mon Jan 9 07:46:17 2012 NARUSE, Yui <naruse@ruby-lang.org>
- * regex.c (re_search): use mbclen() instead of ismbchar().
+ * gc.c: i686-linux needs to define _XOPEN_SOURCE 600 for posix_memalign.
- * re.c (rb_reg_s_quote): should handle mbchars properly.
+Mon Jan 9 04:24:59 2012 NARUSE, Yui <naruse@ruby-lang.org>
-Wed Feb 17 01:25:26 1999 Yukihiro Matsumoto <matz@netlab.co.jp>
+ * gc.c (rb_objspace_free): global_List is allocated with xmalloc.
+ patched by Sokolov Yura. https://github.com/ruby/ruby/pull/78
- * parse.y (yylex): stop comment concatenation by backslash follows
- after >= 0x80 char. may cause problem with Latin chars.
+ * dln_find.c: remove useless replacement of free.
- * eval.c (error_print): exception in rb_obj_as_string() caused
- SEGV. protect it by PUSH_TAG/POP_TAG.
+ * ext/readline/readline.c (readline_attempted_completion_function):
+ strings for readline must allocated with malloc.
- * error.c (exc_exception): `Exception#exception' should return self.
+ * process.c (run_exec_dup2): use free; see also r20950.
-Wed Feb 17 01:12:22 1999 Hirotaka Ichikawa <hirotaka.ichikawa@tosmec.toshiba.co.jp>
+ * re.c (onig_new_with_source): use malloc for oniguruma.
- * configure.in: BeOS patch.
+ * vm.c (ruby_vm_destruct): use free for VMs.
-Tue Feb 16 14:25:00 1999 Yukihiro Matsumoto <matz@netlab.co.jp>
+ * vm.c (thread_free): use free for threads.
- * regex.c (re_compile_pattern): should reallocate mbc space for
- character class unless current_mbctype is ASCII.
+Mon Jan 9 04:24:59 2012 NARUSE, Yui <naruse@ruby-lang.org>
-Mon Feb 15 15:48:30 1999 WATANABE Hirofumi <watanabe@ase.ptg.sony.co.jp>
+ * dln_find.c: remove useless replacement of free.
- * configure.in: specify `-Wl,-E' only for GNU ld.
+ * ext/readline/readline.c (filename_completion_proc_call):
+ matches should use xfree.
-Mon Feb 15 11:43:22 1999 GOTO Kentaro <gotoken@math.sci.hokudai.ac.jp>
+ * ext/readline/readline.c (username_completion_proc_call): ditto.
- * array.c (rb_inspecting_p): should return Qfalse.
+Mon Jan 9 01:12:35 2012 NARUSE, Yui <naruse@ruby-lang.org>
-Sun Feb 14 22:36:40 1999 EGUCHI Osamu <eguchi@shizuokanet.ne.jp>
+ * numeric.c (rb_enc_uint_char): raise RangeError when added codepoint
+ is invalid. [Feature #5855] [Bug #5863] [Bug #5864]
- * sprintf.c (rb_f_sprintf): `%G' was omitted.
+ * string.c (rb_str_concat): ditto.
-Sun Feb 14 12:47:48 1999 EGUCHI Osamu <eguchi@shizuokanet.ne.jp>
+ * string.c (rb_str_concat): set encoding as ASCII-8BIT when the string
+ is US-ASCII and the argument is an integer greater than 127.
- * numeric.c (Init_Numeric): allow divide by zero on FreeBSD.
+ * regenc.c (onigenc_mb2_code_to_mbclen): rearrange error code.
- * numeric.c (Init_Numeric): FloatDomainError added.
+ * enc/euc_jp.c (code_to_mbclen): ditto.
- * configure.in (AC_REPLACE_FUNCS): add checks for functions
- isinf, isnan, and finite.
+ * enc/shift_jis.c (code_to_mbclen): ditto.
-Sat Feb 13 01:24:16 1999 Yukihiro Matsumoto <matz@netlab.co.jp>
+Sun Jan 8 20:31:45 2012 Narihiro Nakamura <narihiro@netlab.jp>
- * eval.c (rb_thread_create_0): should protect th->thread.
+ * gc.c : consider header bytes which are used by malloc.
-Fri Feb 12 16:16:47 1999 Yasuhiro Fukuma <yasuf@big.or.jp>
+Sun Jan 8 11:54:43 2012 Narihiro Nakamura <authornari@gmail.com>
- * string.c (rb_str_inspect): wrong mbc position.
+ * gc.c (aligned_free): support MinGW. Patch by Hiroshi Shirosaki.
-Fri Feb 12 16:21:17 1999 Yukihiro Matsumoto <matz@netlab.co.jp>
+Sun Jan 8 11:43:05 2012 Narihiro Nakamura <authornari@gmail.com>
- * eval.c (rb_thread_fd_close):
+ * gc.c (slot_sweep): add a assertion instead of a debug print.
- * io.c (rb_io_fptr_close): tell scheduler that fd is closed.
+Sun Jan 8 01:18:19 2012 Ayumu AIZAWA <ayumu.aizawa@gmail.com>
- * io.c (rb_io_reopen): ditto.
+ * test/-ext-/old_thread_select/test_old_thread_select.rb:
+ avoid platform bug. [Bug #5858] [ruby-dev:45108]
- * io.c (READ_CHECK): check if closed after thread context switch.
+Sun Jan 8 00:46:34 2012 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
- * ext/socket/socket.c (bsock_close_read): do not check
- the return value from shutdown(2).
+ * gc.c: get rid of implicit narrowing conversion.
- * ext/socket/socket.c (bsock_close_write): ditto.
+Sun Jan 8 00:10:10 2012 NARUSE, Yui <naruse@ruby-lang.org>
- * ext/socket/socket.c (sock_new): need to dup(fd) for close_read
- and close_write.
+ * configure.in: check posix_memalign(3) and memalign(3).
- * parse.y (here_document): handle newlines within #{}.
+ * gc.c (aligned_malloc): use configure's result instead of
+ _POSIX_C_SOURCE and _XOPEN_SOURCE because they can't be used
+ to check availability at least on FreeBSD.
- * regex.h: should replace symbols for ruby.
+Sat Jan 7 22:25:50 2012 Narihiro Nakamura <authornari@gmail.com>
-Fri Feb 12 00:46:28 1999 Shugo Maeda <shugo@netlab.co.jp>
+ * gc.c: use Bitmap Marking algorithm to avoid copy-on-write of
+ memory pages. See [ruby-dev:45085] [Feature #5839]
+ [ruby-core:41916].
- * marshal.c (r_object): should update the method name in message.
+ * include/ruby/ruby.h : FL_MARK rename to FL_RESERVED1.
- * marshal.c (w_object): limit should be converted into Fixnum.
+ * node.h : ditto.
-Wed Feb 10 15:20:03 1999 Yukihiro Matsumoto <matz@netlab.co.jp>
+ * debug.c : ditto.
- * regex.c (re_match): empty pattern should not cause infinite
- pattern match loop.
+ * object.c (rb_obj_clone): FL_MARK move to a bitmap.
- * regex.c (re_compile_pattern): RE_OPTIMIZE_ANCHOR for /.*/, not
- for /(.|\n)/.
+ * class.c (rb_singleton_class_clone): ditto.
- * numeric.c (fix_pow): `fixnum**nil' should raise TypeError.
+Sat Jan 7 00:47:07 2012 CHIKANAGA Tomoyuki <nagachika00@gmail.com>
- * bignum.c (rb_big_pow): need to normalize results.
+ * configure.in: always define CANONICALIZATION_FOR_MATHN.
+ [ruby-dev:45100] [Bug #5852]
-Wed Feb 10 01:42:41 1999 EGUCHI Osamu <eguchi@shizuokanet.ne.jp>
+Fri Jan 6 23:11:20 2012 Ayumu AIZAWA <ayumu.aizawa@gmail.com>
- * numeric.c (fix_pow): `(5**1).type' should be Integer.
+ * include/ruby/version.h: RUBY_API_VERSION 2.0.0
-Tue Feb 9 01:22:49 1999 Yukihiro Matsumoto <matz@netlab.co.jp>
+Fri Jan 6 12:24:11 2012 NARUSE, Yui <naruse@ruby-lang.org>
- * parse.y (yylex): do not ignore newlines in mbchars.
+ * object.c (rb_inspect): raises Encoding::CompatibilityError if the
+ result is incompatible with the default external encoding.
+ [ruby-core:41931] [Bug #5848]
- * io.c (rb_file_s_open): mode can be specified by flags like
- open(2), e.g. File::open(path, File::CREAT|File::WRONLY).
+Thu Jan 5 15:26:15 2012 NAKAMURA Usaku <usa@ruby-lang.org>
- * io.c (rb_f_open): bit-wise mode flags for pipes
+ * win32/win32.c (check_valid_dir): strict checking of root.
+ GetDriveType() succeeds with non root directory as the argument,
+ even if MSDN says that the API needs the root directory.
+ this patch fixes a failure of test/ruby/test_file_exhaustive.rb.
- * io.c (Init_IO): bit flags for open.
+Thu Jan 5 12:15:55 2012 NARUSE, Yui <naruse@ruby-lang.org>
-Sat Feb 6 22:56:21 1999 Yukihiro Matsumoto <matz@netlab.co.jp>
+ * file.c (rb_file_join): separator is appended by array length - 1
+ times. patched by Benoit Daloze [ruby-core:41901] [Bug #5841]
- * string.c (rb_str_sub_bang): should not overwrite match data by
- regexp match within the block.
+Thu Jan 5 11:47:54 2012 NARUSE, Yui <naruse@ruby-lang.org>
- * string.c (rb_str_gsub_bang): ditto.
+ * lib/uri/common.rb (URI::Parser#initialize_regexp):
+ use \A \z instead of ^ $. [Bug #5843]
-Sat Feb 6 03:06:17 1999 Yukihiro Matsumoto <matz@netlab.co.jp>
+Wed Jan 4 17:55:53 2012 Ayumu AIZAWA <ayumu.aizawa@gmail.com>
- * re.c (match_getter): accessing $~ without matching caused SEGV.
+ * array.c (rb_ary_sample): add example for Array#sample
+ based on patch from https://github.com/ruby/ruby/pull/74
-Fri Feb 5 22:11:08 1999 EGUCHI Osamu <eguchi@shizuokanet.ne.jp>
+Wed Jan 4 14:24:33 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * parse.y (yylex): binary literal support, like 0b01001.
+ * string.c (str_nth_len): count ascii-only run at the end. this
+ bug appears only when single-byte-optimization is disabled due
+ to unknown coderange. [ruby-core:41896] [Bug #5836]
- * parse.y (yylex): octal numbers can contain `_'s.
+Wed Jan 4 11:32:07 2012 NAKAMURA Usaku <usa@ruby-lang.org>
- * parse.y (yylex): warns if non-octal number follows immediately
- after octal literal.
+ * win32/win32.c (check_valid_dir): special case for a root directory.
+ Reported by Masateru OKAMOTO at [Bug #5819].
- * parse.y (yylex): now need at least one digit after prefix such
- as 0x, or 0b.
+Wed Jan 4 00:19:54 2012 Kouhei Sutou <kou@cozmixng.org>
- * bignum.c (rb_str2inum): recognize binary numbers like 0b0101.
+ * lib/rexml/parsers/baseparser.rb: use private instead of _xxx
+ method name. This is Ruby code not Python code.
+ refs #5696
-Fri Feb 5 03:26:56 1999 Yasuhiro Fukuma <yasuf@big.or.jp>
+Tue Jan 3 23:57:37 2012 Ayumu AIZAWA <ayumu.aizawa@gmail.com>
- * ruby.c (proc_options): -e without program prints error.
+ * lib/rexml/parsers/baseparser.rb: rexml BaseParser uses
+ instance_eval unnecessarily on listener add.
+ patch from Charles Nutter. [Bug #5696] [ruby-core:41437]
-Fri Feb 5 00:01:50 1999 Yukihiro Matsumoto <matz@netlab.co.jp>
+Tue Jan 3 20:44:13 2012 Ayumu AIZAWA <ayumu.aizawa@gmail.com>
- * parse.y (terms): needed to clear heredoc_end.
+ * README: add comment for Git user. patch from Arun Agrawal.
+ * README.ja: ditto.
- * numeric.c (flo_div): allow float division by zero.
+Tue Jan 3 15:58:22 2012 Ayumu AIZAWA <ayumu.aizawa@gmail.com>
-Thu Feb 4 11:56:24 1999 Yukihiro Matsumoto <matz@netlab.co.jp>
+ * thread.c: changed documentation for "thread-local" variables.
+ patch from Julien Ammous.
- * missing/strtod.c: for compatibility.
+Tue Jan 3 15:50:12 2012 Ayumu AIZAWA <ayumu.aizawa@gmail.com>
- * configure.in (strtod): add strtod compatible check.
+ * process.c: Fix typo. patch from Aviv Ben-Yosef.
- * numeric.c (rb_num2long): missing/vsnprintf.c does not support
- floating points.
+Tue Jan 3 13:43:37 2012 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
- * numeric.c (flo_to_s): ditto.
+ * tool/merger.rb: allow r0123 style revision number.
-Wed Feb 3 23:02:12 1999 Yoshida Masato <yoshidam@yoshidam.net>
+Tue Jan 3 11:17:55 2012 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
- * regex.c (re_compile_pattern): use ismbchar() to get next char.
+ * tool/merger.rb (#version_up): version.h date should be Japanese
+ locale date.
- * regex.c (re_search): wrong mbchar shift.
+Mon Jan 2 22:08:00 2012 Akinori MUSHA <knu@iDaemons.org>
- * re.c (rb_reg_search): needed to reset $KCODE after match.
+ * tool/file2lastrev.rb (VCS::detect): Add support for Subversion
+ 1.7 which adopted a whole new working directory structure.
- * regex.c (re_compile_fastmap): mbchars should match with \w.
+ * tool/file2lastrev.rb (VCS::detect): Simply use .each instead of
+ .sort.reverse_each which looks too arbitrary. If you want SVN
+ to be tried first, then you just have to register it first as it
+ is right now.
-Wed Feb 3 22:35:12 1999 EGUCHI Osamu <eguchi@shizuokanet.ne.jp>
+Mon Jan 2 20:53:36 2012 Tanaka Akira <akr@fsij.org>
- * parse.y (yylex): too big float raise warning, not error.
+ * lib/securerandom.rb (random_bytes): use IO#read instead of
+ IO#readpartial to make the intent more clear.
-Tue Feb 2 23:41:42 1999 Yoshida Masato <yoshidam@yoshidam.net>
+Mon Jan 2 15:26:39 2012 Kazuki Tsujimoto <kazuki@callcc.net>
- * regex.c (re_match): wrong boundary.
+ * test/ruby/test_object.rb (test_send_with_block): add a normal case.
- * regex.c (IS_A_LETTER): re_mbctab[c] may not be 1 for mbc.
+Mon Jan 2 15:18:54 2012 Kazuki Tsujimoto <kazuki@callcc.net>
- * regex.c (re_search): mbchar support for shifting ranges.
+ * test/ruby/test_object.rb (test_send_with_block): moved from
+ bootstraptest/test_flow.rb.
- * regex.c (MBC2WC): wrong conversion.
+Mon Jan 2 15:10:11 2012 Kazuhiro NISHIYAMA <zn@mbf.nifty.com>
-Wed Feb 3 15:03:16 1999 Yukihiro Matsumoto <matz@netlab.co.jp>
+ * lib/test/unit/parallel.rb: use pack("m0") instead of
+ pack("m").gsub("\n","").
+ * lib/test/unit.rb (Test::Unit::Runner::Worker#run): ditto.
- * parse.y (parse_regx): need to escape parens if terminators are
- not any kind of parenthesis.
+Mon Jan 2 15:05:09 2012 Kazuhiro NISHIYAMA <zn@mbf.nifty.com>
- * parse.y (parse_qstring): ditto.
+ * lib/test/unit.rb (Test::Unit::Runner::Worker#run): use
+ File.basename with suffix instead of gsub.
- * parse.y (parse_string): ditto.
+Mon Jan 2 14:55:28 2012 Kazuhiro NISHIYAMA <zn@mbf.nifty.com>
-Tue Feb 2 17:11:26 1999 WATANABE Tetsuya <tetsu@jpn.hp.com>
+ * lib/test/unit.rb (Test::Unit::Runner#_run_parallel): find may
+ return nil and nil can not dup.
- * string.c (rb_str_gsub_bang): too small realloc condition.
+Sun Jan 1 12:23:10 2012 Akinori MUSHA <knu@iDaemons.org>
-Mon Feb 1 10:01:17 1999 EGUCHI Osamu <eguchi@shizuokanet.ne.jp>
+ * lib/shellwords.rb (Shellwords#shellescape): Drop the //n flag
+ that only causes warnings with no real effect. [Bug #5637]
- * parse.y (yylex): range check for the float literal.
+Sat Dec 31 06:28:37 2011 NARUSE, Yui <naruse@ruby-lang.org>
-Sat Jan 30 18:34:16 1999 Yukihiro Matsumoto <matz@netlab.co.jp>
+ * thread.c (rb_barrier_waiting): save the number of waiting threads
+ in RBASIC()->flags. [ruby-dev:45002] [Bug #5768]
- * ruby.c (usage): -h option to show brief command description.
+ * thread.c (rb_barrier_wait): increment and decrement around
+ rb_mutex_lock, and use rb_barrier_waiting().
-Sat Jan 30 08:45:16 1999 IKARASHI Akira <ikarashi@itlb.te.noda.sut.ac.jp>
+ * thread.c (rb_barrier_release): use rb_barrier_waiting().
- * lib/cgi-lib.rb: cookie support added.
+ * thread.c (rb_barrier_destroy): ditto.
-Sat Jan 30 13:38:24 1999 Yukihiro Matsumoto <matz@netlab.co.jp>
+Mon Dec 26 17:20:10 2011 NARUSE, Yui <naruse@ruby-lang.org>
- * regex.c (re_compile_pattern): mbchars should match with \w
- within character class. Was matching with \W.
+ * vm.c (vm_exec): add guard to prevent optimization for LLVM clang.
- * regex.c (re_match): \w should match with multi byte characters,
- not its first byte.
+Fri Dec 30 17:01:12 2011 Ayumu AIZAWA <ayumu.aizawa@gmail.com>
-Sat Jan 30 10:06:41 1999 Yoshida Masato <yoshidam@yoshidam.net>
+ * vm_eval.c (rb_f_send): fix obj.send() documentation issue.
+ [Bug #5125] [ruby-core:38633]
- * re.c (rb_reg_s_new): UTF-8 flag handle (/u, /U).
+Thu Dec 29 22:36:16 2011 CHIKANAGA Tomoyuki <nagachika00@gmail.com>
- * re.c (rb_kcode): $KCODE handle for UTF-8.
+ * lib/test/unit.rb (Test::Unit::Runner::Worker#_run_parallels): fix
+ premature exit when all workers' status are :ready or :prepare.
+ [ruby-dev:45061] [Bug #5822]
-Sat Jan 30 01:51:16 1999 Yukihiro Matsumoto <matz@netlab.co.jp>
+Thu Dec 29 01:51:13 2011 CHIKANAGA Tomoyuki <nagachika00@gmail.com>
- * array.c (rb_ary_delete_if): RTEST() missing.
+ * include/ruby/ruby.h: fix #error pragma. LLP64 platform is supported.
- * hash.c (delete_if_i): ditto.
+ * include/ruby/st.h: ditto.
- * enum.c (Init_Enumerable): select (=find_all), detect (=find)
- added as aliases.
+Wed Dec 28 11:22:45 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Fri Jan 29 21:32:19 1999 WATANABE Tetsuya <tetsu@jpn.hp.com>
+ * lib/fileutils.rb (FileUtils::Entry_#entries): use utility method
+ instead of typoed regexp. [ruby-core:41829] [Bug #5817]
- * hash.c (rb_f_setenv): SEGV caused by small typo.
+Wed Dec 28 02:08:04 2011 CHIKANAGA Tomoyuki <nagachika00@gmail.com>
-Fri Jan 29 00:15:58 1999 Yukihiro Matsumoto <matz@netlab.co.jp>
+ * vm_insnhelper.c (unknown_keyword_error): add GC guard to prevent
+ intermediate object from GC.
- * lib/parsedate.rb (parsedate): support date format like
- 23-Feb-93, which is required by HTTP/1.1.
+Tue Dec 27 22:34:54 2011 Shota Fukumori <sorah@tubusu.net>
- * variable.c (find_class_path): avoid calling rb_iv_set().
+ * lib/test/unit.rb (Worker#close): "closing IO if IO is closed"
+ should be "closing IO if IO isn't closed"
- * eval.c (backtrace): do not need to modify $SAFE internally.
+Tue Dec 27 22:04:27 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * variable.c (classname): inline __classid__ access.
+ * st.c (st_update): new function to lookup the given key and
+ update the value. [ruby-dev:44998]
- * eval.c (THREAD_ALLOC): needed to initialize wrapper.
+Tue Dec 27 21:17:33 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * lib/ftools.rb (makedirs): allows slash at the end of the path.
+ * node.h (rb_args_info): change pre_args_num and post_args_num as
+ int, to match with rb_iseq_t.
- * numeric.c (rb_fix_induced_from): ensure result to be Fixnum.
+ * parse.y (new_args_gen): check overflow.
-Thu Jan 28 17:31:43 1999 Yukihiro Matsumoto <matz@netlab.co.jp>
+Mon Dec 26 22:38:35 2011 Yusuke Endoh <mame@tsg.ne.jp>
- * numeric.c (flo_to_s): float format changed to "%16.10g".
+ * vm_insnhelper.c (unknown_keyword_error): make it kind a error
+ message when unknown keyword is given. It require more work.
+ See [ruby-core:40518] and [ruby-core:40541] in detail.
-Thu Jan 28 02:13:11 1999 Yoshinori Toki <toki@freedom.ne.jp>
+Mon Dec 26 22:31:07 2011 Yusuke Endoh <mame@tsg.ne.jp>
- * array.c (rb_ary_store): expand allocated buffer by 3/2.
+ * vm_core.h (struct rb_iseq_struct), compile.c (iseq_set_arguments),
+ iseq.c (rb_iseq_parameters), vm_insnhelper.c
+ (vm_callee_setup_arg_complex): support Method#parameters for keyword
+ arguments. The provisional spec is what Benoit Daloze proposed.
+ [ruby-core:40541]
-Wed Jan 27 17:50:02 1999 Kazuhiro HIWADA <hiwada@kuee.kyoto-u.ac.jp>
+ * test/ruby/test_keyword.rb: add a test for above.
- * bignum.c (dbl2big): raised error if double is too big to cast
- into long. check added.
+Mon Dec 26 22:15:27 2011 Yusuke Endoh <mame@tsg.ne.jp>
-Wed Jan 27 03:16:18 1999 Yukihiro Matsumoto <matz@netlab.co.jp>
+ * vm_core.h (struct rb_iseq_struct), compile.c (iseq_set_arguments,
+ iseq_compile_each), vm_insnhelper.c (vm_callee_setup_arg_complex):
+ implement keyword arguments. See [ruby-core:40290]
+ The feature is promised to be included in 2.0, but the detail spec
+ is still under discussion; this commit is a springboard for further
+ discussion. Please try it and give us feedback.
+ This commit includes fixes for some problems reported by Benoit
+ Daloze <eregontp AT gmail.com> [ruby-core:40518] and Marc-Andre
+ Lafortune <ruby-core-mailing-list AT marc-andre.ca>
+ [ruby-core:41772].
- * variable.c (rb_mod_const_at): can't list constants of the
- untainted objects in safe mode.
+ * iseq.c (iseq_free, prepare_iseq_build): bookkeeping.
- * class.c (method_list): can't list methods of untainted objects
- in safe mode.
+ * test/ruby/test_keyword.rb: add tests for keyword arguments.
-Tue Jan 26 02:40:41 1999 GOTO Kentaro <gotoken@math.sci.hokudai.ac.jp>
+ * test/ripper/dummyparser.rb (class DummyParser): temporal fix for
+ ripper test.
- * prec.c: Precision support for numbers.
+Mon Dec 26 22:00:17 2011 Yusuke Endoh <mame@tsg.ne.jp>
-Thu Jan 21 19:08:14 1999 Yukihiro Matsumoto <matz@netlab.co.jp>
+ * node.h, node.c, parse.y: implement a parser part for keyword
+ arguments.
+ This is a preparation for keyword argument (see [ruby-core:40290]).
- * eval.c (rb_f_raise): calls `exception' method, not `new'.
+ * gc.c (gc_mark_children): bookkeeping.
- * error.c (exc_exception): renamed from `new'.
+Mon Dec 26 21:03:18 2011 Yusuke Endoh <mame@tsg.ne.jp>
-Wed Jan 20 03:39:48 1999 Yukihiro Matsumoto <matz@netlab.co.jp>
+ * node.h, parse.y (new_args_gen), compile.c (iseq_set_arguments): use
+ struct rb_args_info instead of NODEs.
+ This is a preparation for keyword argument (see [ruby-core:40290]).
- * parse.y (yycompile): rb_in_compile renamed to ruby_in_compile.
+ * node.c (dump_node), gc.c (gc_mark_children, obj_free): bookkeeping.
- * ruby.c (load_file): define DATA if __END__ appeared in script.
+Mon Dec 26 20:59:51 2011 Yusuke Endoh <mame@tsg.ne.jp>
-Tue Jan 19 14:57:51 1999 Yukihiro Matsumoto <matz@netlab.co.jp>
+ * node.h, parse.y (lambda, f_larglist): remove NEW_LAMBDA hack.
+ This is a preparation for keyword argument (see [ruby-core:40290]).
- * parse.y (here_document): need to protect lex_lastline.
+Mon Dec 26 22:01:19 2011 Hiroshi Shirosaki <h.shirosaki@gmail.com>
- * parse.y (yylex): disable %//, %'', %``.
+ * io.c (rb_sys_fail_path): move the definition.
+ Move above for using it in set_binary_mode_with_seek_cur().
-Tue Jan 19 05:01:16 1999 Koji Arai <JCA02266@nifty.ne.jp>
+ * io.c (set_binary_mode_with_seek_cur): fix improper seek cursor.
+ Seeking file cursor with setting binary mode has possibility to
+ cause infinite loop. Fixed the bug and refined error handling.
+ Introduced at r34043.
- * array.c (beg_len): round range value too much.
+ And cleanups as below.
+ Remove unnecessary parentheses of `fptr`.
+ Use return value of setmode().
-Mon Jan 18 13:02:27 1999 Kuroda Jun <jkuro@dwe.co.jp>
+ * test/ruby/test_io_m17n.rb
+ (TestIO_M17N#test_seek_with_setting_binmode): add a test for above.
+ [ruby-core:41671] [Bug #5714]
- * hash.c (env_keys): strchr() may return NULL.
+Mon Dec 26 17:01:14 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Mon Jan 18 17:51:47 1999 Yukihiro Matsumoto <matz@netlab.co.jp>
+ * common.mk (LIBRUBY_A): depends on main.o since r33774.
+ [ruby-core:41786] [Bug #5796]
- * instruby.rb (wdir): install libruby.a in archdir.
+Mon Dec 26 13:07:08 2011 NAKAMURA Usaku <usa@ruby-lang.org>
- * lib/ftools.rb (install): removes file before installing.
+ * test/ruby/test_io.rb (TestIO#test_autoclose): Tempfile.new doesn't
+ accept the block argument.
-Mon Jan 18 16:55:31 1999 MAEDA shugo <shugo@aianet.ne.jp>
+Mon Dec 26 13:06:52 2011 Shota Fukumori <sorah@tubusu.net>
- * eval.c (rb_callcc): experimental continuation support.
+ * lib/test/unit.rb: Avoid zombie processes on "--separate" option
+ added at r34121.
-Sun Jan 17 19:45:37 1999 WATANABE Hirofumi <watanabe@ase.ptg.sony.co.jp>
+Mon Dec 26 04:01:23 2011 Martin Bosslet <Martin.Bosslet@googlemail.com>
- * pack.c (pack_pack): nil packing caused SEGV.
+ * ext/openssl/ossl_cipher.c: Update and complete documentation.
-Sat Jan 16 13:18:03 1999 Yukihiro Matsumoto <matz@netlab.co.jp>
+Sun Dec 25 23:16:11 2011 Shota Fukumori <sorah@tubusu.net>
- * string.c (rb_str_concat): character (fixnum) can be append to
- strings
+ * test/testunit/test_parallel.rb (test_separate): Test for "--separate"
+ option (r34121)
- * array.c (rb_ary_unshift): unshift returns array.
+Sun Dec 25 22:39:49 2011 Shota Fukumori <sorah@tubusu.net>
-Sat Jan 16 01:39:19 1999 Yoshida Masato <yoshidam@tau.bekkoame.ne.jp>
+ * lib/test/unit.rb (_run_parallel):
+ New option "--separate" for test/unit; when running tests with this
+ option, a job process will be restarted after one test file has done.
+ This means all test files will run with separated process.
- * string.c (rb_str_split_method): UTF-8 support.
+ * lib/test/unit/parallel.rb: Fix for above. Now parallel.rb puts
+ "ready!" for first ready, "ready" for afters.
- * regex.c: UTF-8 support.
+Sun Dec 25 00:02:15 2011 Luis Lavena <luislavena@gmail.com>
-Thu Jan 14 00:42:55 1999 Yukihiro Matsumoto <matz@netlab.co.jp>
+ * configure.in: change --with-ntver to --with-winnt-ver to be more
+ descriptive in the context. [ruby-core:41794]
- * string.c (rb_str_gsub_bang): forget to add offset for null match.
+Sat Dec 24 23:25:15 2011 Luis Lavena <luislavena@gmail.com>
- * eval.c (rb_thread_local_aset): can't modify in tainted mode.
+ * configure.in: add --with-ntver option to match win32/configure.bat
+ functionality. Set 0x0501 as default. [ruby-core:35010]
+ [ruby-core:35035]
- * hash.c (env_each_key): avoid generating temporary array.
+Sat Dec 24 12:38:53 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Wed Jan 13 23:58:50 1999 Yukihiro Matsumoto <matz@netlab.co.jp>
+ * proc.c (proc_call): get rid of optimization-out by clang.
- * hash.c (rb_f_setenv): name and value can be tainted.
+ * proc.c (rb_proc_call, rb_proc_call_with_block): ditto.
-Wed Jan 6 02:42:08 1999 Yukihiro Matsumoto <matz@netlab.co.jp>
+Sat Dec 24 10:56:32 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * bignum.c (Init_Bignum): forgot to define Bignum#===.
+ * ext/readline/readline.c (readline_readline): check if outstream
+ is closed to get rid of a bug of readline 6. [ruby-dev:45043]
+ [Bug #5803]
- * gc.c (gc_sweep): if add_heap() is called during GC, objects on
- allocated heap page(s) are not marked, should not be recycled.
+Sat Dec 24 06:59:49 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * gc.c (gc_sweep): should refer latest freelist.
+ * test/readline/test_readline.rb (test_line_buffer__point): use
+ lambda not to exit entire method by "return". or "next" for
+ proc. [ruby-dev:45042] [Bug #5802]
- * gc.c (id2ref): modified to support performance patch.
+Sat Dec 24 01:20:39 2011 Kazuki Tsujimoto <kazuki@callcc.net>
- * object.c (rb_obj_id): performance patch (no bignum for id).
+ * vm_eval.c (send_internal): PASS_PASSED_BLOCK_TH must be placed
+ just before calling rb_call0.
-Tue Jan 5 01:56:18 1999 Yukihiro Matsumoto <matz@netlab.co.jp>
+ * bootstraptest/test_flow.rb: add a test for above.
- * config.guess: merge up-to-date from autoconf 2.12.
+Sat Dec 24 00:55:16 2011 Tanaka Akira <akr@fsij.org>
- * array.c (rb_ary_join): avoid calling rb_protect_inspect() till
- it is really needed.
+ * lib/tempfile.rb (Tempfile#initialize): warn if a block is given.
- * object.c (rb_obj_inspect): show detailed information for the
- instance variables (infinite loop can avoid now).
+Fri Dec 23 16:14:30 2011 TAKAO Kouji <kouji@takao7.net>
- * struct.c (rb_struct_inspect): avoid infinite loop.
+ * ext/readline/readline.c (readline_attempted_completion_function):
+ in Readline module with GNU Readline 6 case, Readline module
+ resets completion_append_character to " ", after it executes
+ completion. So, Readline module stores
+ completion_append_character, and Readline module always sets it
+ after Readline module executes completion. [ruby-dev:43456]
+ [Feature #4635]
-Sun Jan 3 01:37:58 1999 Takao KAWAMURA <kawamura@ike.tottori-u.ac.jp>
+Fri Dec 23 15:59:05 2011 TAKAO Kouji <kouji@takao7.net>
- * misc/ruby-mode.el (ruby-end-of-defun): moved too much.
+ * ext/readline/readline.c (Init_readline): libedit check
+ rl_getc_function only when rl_initialize() is called, and
+ using_history() call rl_initialize(). This assignment should be
+ placed before using_history(). [ruby-core:40641] [Bug #5539]
- * misc/ruby-mode.el (ruby-mode-variables): set paragraph-separator
- for the mode.
+Fri Dec 23 10:14:47 2011 Tanaka Akira <akr@fsij.org>
- * misc/ruby-mode.el: proper font-lock for `def' and `nil' etc.
+ * test/thread/test_queue.rb (test_thr_kill): show the number of loop
+ run when the test failed.
-Sat Jan 2 17:09:06 1999 Yukihiro Matsumoto <matz@netlab.co.jp>
+Fri Dec 23 09:23:48 2011 Tanaka Akira <akr@fsij.org>
- * eval.c (rb_jump_tag): new api to invoke JUMP_TAG. tag values
- can obtained from rb_eval_string_protect()/rb_load_protect().
+ * test/test_pty.rb (test_pty_check_default): call PTY.check until
+ "cat" command is finished.
- * eval.c (rb_rescue): now catches all exceptions but SystemExit.
+Fri Dec 23 06:03:00 2011 Kazuhiro NISHIYAMA <zn@mbf.nifty.com>
- * eval.c (rb_eval_string_protect): eval string with protection.
+ * common.mk: add "check succeeded" message.
- * eval.c (rb_load_protect): load file with protection.
+ * README, README.ja: follow above change.
- * io.c (rb_io_puts): avoid infinite loop for cyclic arrays.
+Fri Dec 23 06:00:39 2011 Kazuhiro NISHIYAMA <zn@mbf.nifty.com>
- * eval.c (rb_thread_local_aref): thread local hash tables.
+ * ext/bigdecimal/bigdecimal.h: add satisfy cc-mode comment.
+ * util.c: ditto.
- * object.c (rb_equal): check exact equal before calling `=='.
+Fri Dec 23 00:08:25 2011 Tanaka Akira <akr@fsij.org>
-Thu Dec 31 22:28:53 1998 MAEDA shugo <shugo@aianet.ne.jp>
+ * test/test_pty.rb (test_pty_check_default): "cat" may not terminated
+ in the 0.1 second.
- * eval.c (rb_f_require): feature names should be provided with
- DLEXT extension.
+Thu Dec 22 23:37:25 2011 Tanaka Akira <akr@fsij.org>
- * marshal.c (Init_marshal): need to provide `marshal.so'.
+ * test/ruby/test_thread.rb (test_condvar_timed_wait): don't test the
+ maximum sleep time. Ruby is not a real-time system.
-Wed Dec 30 02:29:16 1998 Yukihiro Matsumoto <matz@netlab.co.jp>
+Thu Dec 22 22:37:45 2011 CHIKANAGA Tomoyuki <nagachika00@gmail.com>
- * variable.c (classname): do not call rb_ivar_set().
+ * thread_pthread.c (ping_signal_thread_list): remove return value.
+ * thread_pthread.c (check_signal_thread_list): add a new function to
+ check if signal thread list is empty.
+ * thread_pthread.c (thread_timer): check signal thread list after
+ timer_thread_function(). main thread might be added into signal thread
+ list during timer_thread_function().
- * eval.c (ruby_run): finalizers were called too early.
+Thu Dec 22 00:40:24 2011 CHIKANAGA Tomoyuki <nagachika00@gmail.com>
-Fri Dec 25 12:19:30 1998 Fukuda Masaki <fukuda@wni.co.jp>
+ * ext/bigdecimal/bigdecimal.c (VpMult, VpCtoV, VpSqrt): remove assigned
+ but unused variables.
- * gc.c (rb_gc_mark): should not return on FL_EXIVAR.
+Wed Dec 21 18:28:22 2011 NAKAMURA Usaku <usa@ruby-lang.org>
-Fri Dec 25 11:56:51 1998 Yukihiro Matsumoto <matz@netlab.co.jp>
+ * common.mk (newline.c, miniprelude.c): revert r33949 because the change
+ broke mswin build, and the changer said no reason about the change.
+ [ruby-dev:45016] [Bug #5783]
- * gc.c (gc_mark): proper scanning for temporary region.
+Wed Dec 21 12:35:24 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * eval.c (TMP_ALLOC): protection for C_ALLOCA was broken.
+ * ext/bigdecimal/bigdecimal.c (BigDecimal_s_allocate): follow
+ Allocation Framework. [Bug #5775]
-Thu Dec 24 18:26:04 1998 Yukihiro Matsumoto <matz@netlab.co.jp>
+Wed Dec 21 02:25:36 2011 Aaron Patterson <aaron@tenderlovemaking.com>
- * development version 1.3 released.
+ * ext/psych/emitter.c: fixing clang warnings. Thanks Joey!
-Thu Dec 24 00:17:00 1998 Yukihiro Matsumoto <matz@netlab.co.jp>
+Wed Dec 21 01:06:00 2011 Kazuhiro NISHIYAMA <zn@mbf.nifty.com>
- * eval.c (rb_load): top self should be set properly.
+ * ext/bigdecimal/README: Update redmine.ruby-lang.org to bugs.ruby-lang.org
+ * ext/socket/ancdata.c: ditto
+ * test/-ext-/wait_for_single_fd/test_wait_for_single_fd.rb: ditto
+ * test/syck/test_yaml.rb: ditto
+ * doc/ChangeLog-1.9.3: ditto
- * variable.c (classname): check __classpath__ if it is defined.
+Tue Dec 20 23:50:12 2011 Hiroshi Nakamura <nahi@ruby-lang.org>
- * variable.c (classname): invalid warning at -v with static linked
- ruby interpreter.
+ * PStore content update perf optimization. Patch by Masaki Matsushita.
+ See #5248.
- * eval.c (is_defined): modified for expr::Const support.
+ * lib/pstore.rb (save_data):
- * eval.c (rb_eval): invoke method expr::Const if expr is not class
- nor module.
+ * Delete inadequate Marshal check.
- * parse.y (primary): enable expr::identifier as method
- invocation.
+ * Deferred file truncation: when writing the new content, truncate
+ the saved file to the data size after writing the data, instead of
+ truncating whole bytes before writing data.
-Wed Dec 23 03:04:36 1998 Yukihiro Matsumoto <matz@netlab.co.jp>
+ * Deferred MD5 calculation: when comparing MD5 hash to check the
+ content modification, calculate MD5 hash of new data iif the
+ content length is differ from the old one.
- * regex.c (re_match): avoid too many loop pops for (?:..).
+ * Compare content size with String#bytesize instead of String#size.
-Tue Dec 22 18:01:08 1998 Yukihiro Matsumoto <matz@netlab.co.jp>
+Tue Dec 20 21:00:30 2011 Tadayoshi Funaba <tadf@dotrb.org>
- * experimental version 1.1d1 released.
+ * ext/date/date_core.c: uses to_integer instead.
+ * test/date/test_switch_hitter.rb: added a test.
-Mon Dec 21 01:33:03 1998 Yukihiro Matsumoto <matz@netlab.co.jp>
+Tue Dec 20 15:04:18 2011 Hiroshi Nakamura <nahi@ruby-lang.org>
- * eval.c (TMP_PROTECT): add volatile to ensure GC protection.
+ * Make sure to clear $! when ignoring an exception
- * string.c (rb_str_gsub_bang): calculate buffer size properly.
+ * ext/openssl/ossl.c (ossl_pem_passwd_cb0, ossl_verify_cb):
+ pem_passwd_cb and verify_cb ignores the exception raised in a
+ callback proc so it should clear $! for subsequent execution.
- * parse.y (lex_get_str): needed to return Qnil at EOS.
+ That's said, both subsequent processes for pem_passwd_cb and
+ verify_cb raises another exception before leaking $! to Ruby world.
+ We cannot test this fix in Ruby land.
- * eval.c (find_file): check policy modified, raise exception
- immediately for tainted load_path.
+ * test/openssl/test_pkey_rsa.rb
+ (test_read_private_key_pem_pw_exception): Test for pem_passwd_cb +
+ exception.
- * hash.c (rb_f_setenv): do not depend on setenv() nor putenv().
+Tue Dec 20 11:49:13 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Thu Dec 17 06:29:23 1998 Yukihiro Matsumoto <matz@netlab.co.jp>
+ * test/date/test_date_base.rb (test_jd): tests for
+ [ruby-dev:45008].
- * ext/tk/tkutil.c (tk_s_new): use rb_obj_instance_eval(), instead
- of rb_yield_0().
+Tue Dec 20 10:20:48 2011 NARUSE, Yui <naruse@ruby-lang.org>
- * eval.c (rb_f_require): forgot to call find_file in some cases.
+ * ext/date/date_core.c (wholenum): fix the type of the return value.
- * eval.c (rb_f_require): `require "feature.so"' to load dynamic
- libraries. old `require "feature.o"' is still OK.
+Tue Dec 20 05:03:24 2011 Eric Hodel <drbrain@segment7.net>
- * eval.c (rb_eval): yield without value dumped core.
+ * README.ja: Update redmine.ruby-lang.org to bugs.ruby-lang.org
+ * README: ditto
+ * common.mk: ditto
+ * man/erb.1: ditto
+ * man/irb.1: ditto
+ * man/ri.1: ditto
+ * man/ruby.1: ditto
+ * sparc.c: ditto
+ * tool/install-sh: ditto
-Wed Dec 16 16:28:31 1998 Yukihiro Matsumoto <matz@netlab.co.jp>
+Tue Dec 20 02:15:18 2011 Tadayoshi Funaba <tadf@dotrb.org>
- * experimental version 1.1d0 (pre1.2) released.
+ * ext/date/date_core.c: [ruby-dev:45008].
-Wed Dec 16 10:43:34 1998 Yukihiro Matsumoto <matz@netlab.co.jp>
+Sun Dec 18 18:52:37 2011 Naohisa Goto <ngotogenome@gmail.com>
- * regex.c (re_search): bound check before calling re_match().
+ * vm.c (vm_define_method): improve guard of iseq from GC. Fix
+ failure or segmentation fault in test_singleton_method(TestGc)
+ on sparc Solaris10 compiled with Oracle Solaris Studio 12.2.
+ [Bug #5762] [ruby-dev:45000] [Bug #4178]
-Tue Dec 15 13:59:01 1998 Yukihiro Matsumoto <matz@netlab.co.jp>
+Sun Dec 18 14:34:31 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * error.c (exc_to_s): returns class name for unset mesg.
+ * ext/bigdecimal/bigdecimal.c (Init_bigdecimal): does not follow
+ allocation framework right now. [ruby-core:41710] [Bug #5773]
- * error.c (exc_initialize): do not initialize @mesg by "".
+Sun Dec 18 12:42:48 2011 Aaron Patterson <aaron@tenderlovemaking.com>
- * parse.y (nextc): __END__ should handle CR+LF newlines.
+ * ext/psych/lib/psych/visitors/to_ruby.rb: BigDecimals can be restored
+ from YAML.
+ * ext/psych/lib/psych/visitors/yaml_tree.rb: BigDecimals can be dumped
+ to YAML.
+ * test/psych/test_numeric.rb: tests for BigDecimal serialization
-Wed Dec 9 13:37:12 1998 MAEDA shugo <shugo@aianet.ne.jp>
+Sun Dec 18 12:03:13 2011 Aaron Patterson <aaron@tenderlovemaking.com>
- * pack.c (encodes): use buffering for B-encoding.
+ * ext/psych/lib/psych/scalar_scanner.rb: Strings that look like dates
+ should be treated as strings and not dates.
- * pack.c (pack_pack): Q-encoding by 'M'.
+ * test/psych/test_scalar_scanner.rb: corresponding tests.
-Tue Dec 8 14:10:00 1998 Yukihiro Matsumoto <matz@netlab.co.jp>
+Sun Dec 18 09:43:21 2011 CHIKANAGA Tomoyuki <nagachika00@gmail.com>
- * variable.c (generic_ivar_get): any object can have instance
- variables now. great improvement.
+ * test/thread/test_queue.rb (test_thr_kill): extend timeout.
+ this test takes a long time at slow machine.
- * variable.c (rb_name_class): do not set __classpath__ by default,
- use __classid__ instead.
+Sun Dec 18 09:36:51 2011 CHIKANAGA Tomoyuki <nagachika00@gmail.com>
-Mon Dec 7 22:08:22 1998 Yukihiro Matsumoto <matz@netlab.co.jp>
+ * test/ruby/envutil.rb (invoke_ruby): remove :timeout option before
+ pass it to Kernel#spawn.
- * ruby.h (struct RFile): IO objects can have instance variables now.
+Fri Dec 16 17:18:38 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * parse.y (primary): allows `def obj::foo; .. end'.
+ * README, README.ja: 'make check' is preferable to 'make test'.
-Mon Dec 7 18:24:50 1998 WATANABE Tetsuya <tetsu@jpn.hp.com>
+Thu Dec 15 23:16:13 2011 CHIKANAGA Tomoyuki <nagachika00@gmail.com>
- * ruby.c (set_arg0): $0 support for HP-UX.
+ * error.c (builtin_type_name): don't return pointer to the buffer of
+ temporary String object.
-Mon Dec 7 01:30:28 1998 WATANABE Hirofumi <watanabe@ase.ptg.sony.co.jp>
+Thu Dec 15 17:56:58 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * dln.c (dln_strerror): better error messages on win32.
+ * io.c (argf_type): make typed data.
-Sat Dec 5 23:27:23 1998 Yukihiro Matsumoto <matz@netlab.co.jp>
+Thu Dec 15 17:40:28 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * parse.y (here_document): indentable here-doc delimiter by
- `<<-'. Proposed by Clemens <c.hintze@gmx.net>. Thanks.
+ * error.c (rb_check_type): fix typo.
-Thu Dec 3 16:50:17 1998 Yukihiro Matsumoto <matz@netlab.co.jp>
+Thu Dec 15 14:48:35 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * ext/extmk.rb.in (realclean): trouble on install.
+ * ext/strscan/strscan.c: use typed data with
+ onig_region_memsize().
-Sun Nov 29 22:25:39 1998 Takaaki Tateishi <ttate@jaist.ac.jp>
+Thu Dec 15 14:33:33 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * process.c (f_exec): check number of argument.
+ * error.c (rb_check_typeddata): refine error message with
+ including expected struct name.
-Thu Nov 26 17:27:30 1998 Yukihiro Matsumoto <matz@netlab.co.jp>
+Thu Dec 15 13:15:51 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * version 1.1c9 released.
+ * regcomp.c (onig_region_memsize): implemented for memsize_of().
-Wed Nov 25 13:07:12 1998 Yukihiro Matsumoto <matz@netlab.co.jp>
+ * ext/objspace/objspace.c (memsize_of): use it.
- * string.c (rb_str_dup): do not copy additional data (STR_NO_ORIG).
+Thu Dec 15 10:44:54 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * parse.y (yycompile): reduce known memory leak (hard to remove).
+ * array.c (rb_ary_reject_bang, rb_ary_delete_if): update rdoc.
+ documentation from Thomas Leitner <t_leitner AT gmx.at> in
+ [ruby-core:41616]. [Bug #5752]
-Wed Nov 25 03:41:21 1998 Yukihiro Matsumoto <matz@netlab.co.jp>
+Thu Dec 15 10:10:43 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * st.c (st_init_table_with_size): round size up to prime number.
+ * test/ruby/test_require.rb (test_race_exception): get rid of
+ not-guaranteed timing issue. [ruby-core:41655] [Bug #5754]
-Sat Nov 21 23:27:23 1998 Yukihiro Matsumoto <matz@netlab.co.jp>
+Wed Dec 14 21:58:42 2011 NAKAMURA Usaku <usa@ruby-lang.org>
- * hash.c (rb_hash_aset): reduce copying key strings.
+ * test/ruby/test_io_m17n.rb
+ (TestIO_M17N#test_{read_with_binmode_and_get[cs]}): only for Windows.
- * gc.c (looks_pointerp): declare as inline function if possible.
+Wed Dec 14 19:57:23 2011 NAKAMURA Usaku <usa@ruby-lang.org>
- * st.c (PTR_NOT_EQUAL): compare hash values first before calling
- comparing function.
+ * common.mk,Makefile.in,win32/Makefile.sub (ECHO1): move platform
+ specific hack from common.mk to Makefile.in (and win32/Makefile.sub).
+ [Bug #5711]
- * st.c (ADD_DIRECT): save hash value in entries to reduce hash
- calculation.
+ * lib/mkmf.rb: we can generate Makefile as we like.
- * string.c (rb_str_gsub_bang): avoid rb_scan_args() to speed-up.
+Wed Dec 14 19:22:33 2011 NAKAMURA Usaku <usa@ruby-lang.org>
- * string.c (rb_str_sub_bang): ditto.
+ * win32/win32.c, include/ruby/win32.h (rb_w32_fd_is_text): new function.
-Sat Nov 21 18:44:06 1998 Masaki Fukushima <fukusima@goto.info.waseda.ac.jp>
+ * win32/win32.c (init_stdhandle): set default mode of stdin as binmode.
- * time.c (time_s_now): had memory leak.
+ * io.c (set_binary_mode_with_seek_cur): new function to replace
+ SET_BINARY_MODE_WITH_SEEK_CUR macro. now returns previous mode of the
+ fd and take care of LF in rbuf.
- * ext/md5/md5init.c (md5_new): had memory leak.
+ * io.c (do_writeconv): set text mode when needed.
- * ext/md5/md5init.c (md5_clone): ditto.
+ * io.c (io_read): need to change the mode of the IO to binmode
+ temporally when the length for IO#read, because IO#read with length
+ must behave so.
-Fri Nov 20 23:23:23 1998 Yukihiro Matsumoto <matz@netlab.co.jp>
+ * test/ruby/test_io_m17n.rb (TestIO_M17N#test_{read_with_length,
+ read_with_length_binmode,get[cs]_and_read_with_binmode,
+ read_with_binmode_and_get[cs],read_write_with_binmode}): tests for
+ above changes.
- * lib/delegate.rb: do not propagate hash and eql?.
+ all patches are written by Hiroshi Shirosaki. [ruby-core:41496]
+ [Feature #5714]
-Thu Nov 19 01:40:52 1998 Yukihiro Matsumoto <matz@netlab.co.jp>
+Wed Dec 14 15:28:31 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * sample/ruby-mode.el (ruby-expr-beg): failed to find reserved
- word boundary.
+ * transcode.c (str_encode): about the extension of :fallback
+ option since 1.9.3.
- * eval.c (rb_eval): avoid calling `concat' method. calls
- rb_ary_concat() directly for efficiency.
+Wed Dec 14 12:19:59 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * eval.c (rb_eval): actual rest arguments extended arrays too much.
+ * load.c (load_unlock): release loading barrier and then remove it
+ from loading_table if it is not in-use. [Bug #5754]
-Wed Nov 18 14:30:24 1998 Yukihiro Matsumoto <matz@netlab.co.jp>
+ * thread.c (rb_barrier_release, rb_barrier_destroy): return
+ whether any other threads are waiting on it.
- * class.c (rb_define_global_function): global functions now be
- module function of the Kernel.
+Wed Dec 14 11:23:45 2011 NARUSE, Yui <naruse@ruby-lang.org>
-Wed Nov 18 10:48:09 1998 Yukihiro Matsumoto <matz@netlab.co.jp>
+ * thread_pthread.c (ubf_select): call rb_thread_wakeup_timer_thread()
+ only when it is not timer_thread. [Bug #5757] [ruby-dev:44985]
+ patched by Tomoyuki Chikanaga.
- * io.c (read_all): SEGV on large files.
+Wed Dec 14 10:20:08 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Tue Nov 17 18:11:20 1998 Yukihiro Matsumoto <matz@netlab.co.jp>
+ * load.c (load_lock): delete the loading barrier if it has been
+ destroyed.
- * version 1.1c8 released.
+ * thread.c (rb_barrier_wait): return nil for recursive lock
+ instead of false, to distinguish it from destroyed barrier.
-Tue Nov 17 16:58:47 1998 Yukihiro Matsumoto <matz@netlab.co.jp>
+Wed Dec 14 01:24:55 2011 okkez <okkez000@gmail.com>
- * parse.y (arg): assignment to attribute name start with capital
- should be allowed.
+ * thread_pthread.c (rb_thread_create_timer_thread): fix memory
+ leak. [ruby-dev:44904] [Bug #5688]
- * eval.c (thread_alloc): needed to mark terminated threads too.
+Wed Dec 14 00:01:15 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Tue Nov 17 12:33:48 1998 Motoyuki Kasahara <m-kasahr@sra.co.jp>
+ * parse.y (primary): point method name line. [ruby-core:40936]
+ [Bug #5614]
- * ext/extmk.rb.in (create_makefile): Set `libdir' to `@libdir@',
- Set `pkglibdir' to `$libdir/$(RUBY_INSTALL_NAME)'.
+Tue Dec 13 23:43:48 2011 CHIKANAGA Tomoyuki <nagachika00@gmail.com>
-Tue Nov 17 10:30:46 1998 Yukihiro Matsumoto <matz@netlab.co.jp>
+ * error.c (name_err_mesg_to_str): clear rb_thread_t::errinfo when
+ ignore exception under rb_protect(). [ruby-core:41612] [Bug #5755]
- * sprintf.c (f_sprintf): %l%%c -> %%l%c
+ * test/ruby/test_exception.rb (test_exception_in_name_error_to_str):
+ add a corresponding test.
-Tue Nov 17 01:08:50 1998 Yukihiro Matsumoto <matz@netlab.co.jp>
+Tue Dec 13 16:13:29 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * parse.y (ret_args): distinguish `a' and `*a' for the arguments
- of yield and return.
+ * load.c (load_unlock): all threads requiring one file should
+ share same loading barrier, so it must be kept alive while those
+ are waiting on it. [ruby-core:41618] [Bug #5754]
- * eval.c (rb_eval): flip3 should work like sed.
+Tue Dec 13 07:30:14 2011 Aaron Patterson <aaron@tenderlovemaking.com>
- * eval.c (rb_eval): flip{2,3} now have independent state for each
- scope to work fine with thread.
+ * lib/webrick/httpresponse.rb (setup_header): 1xx responses
+ are allowed to have Keep-Alive connections.
-Mon Nov 16 23:26:29 1998 Yukihiro Matsumoto <matz@netlab.co.jp>
+ * test/webrick/test_httpresponse.rb: corresponding test.
- * parse.y (primary): exec else clause if no exception raised.
+Tue Dec 13 07:13:28 2011 Aaron Patterson <aaron@tenderlovemaking.com>
-Sun Nov 15 15:44:07 1998 Tadayoshi Funaba <tadf@kt.rim.or.jp>
+ * lib/webrick/httpresponse.rb (setup_header): 204 and 304 responses
+ are allowed to have a Keep-Alive connection. [ruby-core:41581]
- * ext/extmk.rb.in (install): bug in target.
+ * test/webrick/test_httpresponse.rb: corresponding test.
-Sat Nov 14 11:02:05 1998 Motoyuki Kasahara <m-kasahr@sra.co.jp>
+Tue Dec 13 06:29:39 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * Makefile.in (install): Give the argument `$(DESTDIR)' to
- `instruby.rb'.
- * instruby.rb: Recognize ARG[0] as `destdir'.
- * instruby.rb: Give the argument `destdir' to `extmk.rb'.
- * ext/extmk.rb.in: Recognize ARG[1] as `$destdir'.
+ * parse.y (parser_magic_comment): should pass the proper value.
+ [ruby-dev:44984][Bug #5753]
- * instruby.rb: Create the installation directories (bindir, libdir,
- archdir, pkglibdir, archdir, and mandir) under `destdir', and
- install all files under there.
- * ext/extmk.rb.in: Likewise.
-
-Sat Nov 14 10:56:55 1998 Motoyuki Kasahara <m-kasahr@sra.co.jp>
+Tue Dec 13 05:50:07 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * instruby.rb: Add the variable `pkglibdir'.
- * instruby.rb: Set the variable `libdir' to `$(libdir)', not
- `$(libdir)/$(ruby_install_name)'. `libruby.so' and `libruby.so.LIB'
- are installed at `libdir'.
- * instruby.rb: Set the variable `archdir' to `$(pkglibdir)/$(arch)'.
+ * vm_insnhelper.c (vm_yield_setup_block_args): splat single
+ argument if optional arguments are defined not only mandatory or
+ post arguments. [ruby-core:41557] [Bug #5730]
-Fri Nov 13 19:43:29 1998 KIMURA Koichi <kbk@kt.rim.or.jp>
+Mon Dec 12 22:35:39 2011 Shugo Maeda <shugo@ruby-lang.org>
- * missing/nt.c (SafeFree): wrong free offset.
+ * parse.y (stmt_or_begin): changed the error message for BEGIN not
+ at toplevel. [ruby-dev:44963] [Bug #5738]
-Thu Nov 12 20:11:53 1998 Koji Arai <JCA02266@nifty.ne.jp>
+Mon Dec 12 17:29:01 2011 NARUSE, Yui <naruse@ruby-lang.org>
- * sample/ruby-mode.el: wrong highlight.
+ * README: Fixed SupportedPlatforms URL in the README.
+ patched by eMxyzptlk. https://github.com/ruby/ruby/pull/62
- * parse.y (parse_regx): newline in regexp was ignored.
+Mon Dec 12 17:26:51 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Wed Nov 11 10:54:57 1998 Yukihiro Matsumoto <matz@netlab.co.jp>
+ * load.c (rb_feature_p): lazy assigned load_path searched in
+ loading_table were not expanded, but all features, pushed to
+ loading table, are expanded. a patch by Yura Sokolov
+ <funny.falcon AT gmail.com> in [ruby-core:41545]. [Bug #5727]
- * parse.y (here_document): <<'FOO' should not escape anything.
+Mon Dec 12 15:41:03 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * parse.y (here_document): bare << here-doc available, even though
- it's deprecated.
+ * ext/stringio/stringio.c (strio_truncate): fix typo. patched by
+ Nick Howard <ndh AT baroquebobcat.com>.
+ https://github.com/ruby/ruby/pull/65
- * file.c (rb_file_s_readlink): return value should be tainted.
+Sun Dec 11 12:19:17 2011 Shugo Maeda <shugo@ruby-lang.org>
- * ext/etc/etc.c (setup_passwd): information (eg. GCOS name) should
- be tainted (modified at Perl Conference).
+ * lib/net/imap.rb: includes the sequence number of UID in a error
+ message. suggested by art lussos.
+ [ruby-core:41413] [Feature #5692]
-Tue Nov 10 00:22:11 1998 EGUCHI Osamu <eguchi@shizuokanet.ne.jp>
+Sun Dec 11 11:42:10 2011 Kazuki Tsujimoto <kazuki@callcc.net>
- * configure.in: elf support for FreeBSD 3.x
+ * ext/syslog/syslog.c: fix a typo. [ruby-core:41585] [Bug #5740]
-Tue Nov 10 00:05:43 1998 Yukihiro Matsumoto <matz@netlab.co.jp>
+Sun Dec 11 10:48:16 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * parse.y (yylex): here document available in eval.
+ * error.c (exit_initialize): deal with true and false as well as
+ Kernel#exit. [ruby-dev:44951] [Bug #5728]
-Mon Nov 9 17:55:19 1998 Yukihiro Matsumoto <matz@netlab.co.jp>
+Sun Dec 11 10:37:47 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * version 1.1c7 released.
+ * object.c (rb_check_to_int): new function to convert a VALUE to
+ an Integer if possible, but returns nil instead of raising an
+ exception otherwise.
-Fri Nov 6 19:25:27 1998 Takao KAWAMURA <kawamura@ike.tottori-u.ac.jp>
+Sun Dec 11 10:34:39 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * sample/ruby-mode.el: font-lock patch.
+ * process.c (rb_exit_status_code): extract from rb_f_exit_bang and
+ rb_f_exit. assume 0 to be success in Kernel#exit! too.
-Thu Nov 5 15:42:22 1998 Yukihiro Matsumoto <matz@netlab.co.jp>
+Fri Dec 9 19:24:31 2011 NARUSE, Yui <naruse@ruby-lang.org>
- * sample/README, lib/README: simple description for each file.
+ * enc/trans/iso-8859-16-tbl.rb: add ISO-8859-16 converter.
-Wed Nov 4 18:14:19 1998 Yukihiro Matsumoto <matz@netlab.co.jp>
+ * enc/trans/single_byte.trans: ditto.
- * eval.c (assign): attribute assignment should be called as public.
+Fri Dec 9 14:28:40 2011 NARUSE, Yui <naruse@ruby-lang.org>
-Tue Nov 3 23:36:39 1998 Yukihiro Matsumoto <matz@netlab.co.jp>
+ * file.c (file_path_convert): don't convert it when the path string is
+ ascii only. [ruby-core:41556] [Bug #5733]
+ tests are contributed by nobu.
- * string.c (rb_str_dump): dumps core for negative char value.
+Fri Dec 9 08:00:15 2011 Luis Lavena <luislavena@gmail.com>
- * regex.c (re_compile_pattern): out of boundary access for empty
- regexp.
+ * include/ruby/win32.h: undef stat to silence mingw-w64 stat
+ redefinition warnings (GCC 4.6.3).
-Mon Nov 2 22:54:01 1998 Yukihiro Matsumoto <matz@netlab.co.jp>
+Thu Dec 8 23:38:24 2011 CHIKANAGA Tomoyuki <nagachika00@gmail.com>
- * string.c (rb_str_aset): `str[str]' replaces first match.
+ * variable.c (set_const_visibility): clear inline-cache when constant's
+ visibility is modified. [ruby-dev:44929]
-Mon Nov 2 18:24:33 1998 Yukihiro Matsumoto <matz@netlab.co.jp>
+ * test/ruby/test_module.rb (test_private_constants_clear_inlinecache):
+ add test for it.
- * eval.c (thread_create): was accessing modified status.
+Thu Dec 8 23:26:11 2011 NAKAMURA Usaku <usa@ruby-lang.org>
-Sun Nov 1 01:18:52 1998 EGUCHI Osamu <eguchi@shizuokanet.ne.jp>
+ * ext/extmk.rb (extract_makefile): should sort after map, not before
+ it. in this case there is no difference, but we should write better
+ code. this bad smell was caught by nagachika.
- * gc.c (xrealloc): size 0 needs round up to 1.
+Thu Dec 8 22:31:13 2011 NAKAMURA Usaku <usa@ruby-lang.org>
-Sat Oct 31 23:18:34 1998 Yukihiro Matsumoto <matz@netlab.co.jp>
+ * ext/extmk.rb (extract_makefile): need to sort the array of current
+ srcs before comparing to the sorted old srcs.
+ fixed the problem that the configuring stage of exts were always
+ run, introduced at r33801.
- * string.c (rb_str_split_method): negative LIMIT means number of
- split fields are unlimited, as in perl.
+Thu Dec 8 13:26:24 2011 NAKAMURA Usaku <usa@ruby-lang.org>
- * string.c (rb_str_split_method): if LIMIT is unspecified,
- trailing null fields are stripped.
+ * test/rexml/test_order.rb (OrderTester#test_more_ordering): use
+ Zlib::GzipReader.open instead of Zlib::GzipReader.new with File.new.
+ fixed a test error on Windows introduced at r33946.
-Sat Oct 31 04:16:14 1998 Inaba Hiroto <inaba@st.rim.or.jp>
+Thu Dec 8 13:11:26 2011 NAKAMURA Usaku <usa@ruby-lang.org>
- * string.c (str_aref): regexp index SEGVed.
+ * test/ruby/test_process.rb (TestProcess#test_sete[gu]id): silently
+ skip if not implemented such functions (such as, on Windows).
+ fixed test errors on Windows introduced at r33953.
-Fri Oct 30 14:33:47 1998 Yukihiro Matsumoto <matz@netlab.co.jp>
+Thu Dec 8 12:57:50 2011 NAKAMURA Usaku <usa@ruby-lang.org>
- * re.c (reg_match): returns nil for unmatch.
+ * ext/socket/extconf.rb: forgotten to define HAVE_SOCKETPAIR for
+ windows.
+ fixed test errors on Windows introduced at r33947.
- * dir.c (dir_entries): new method.
+Thu Dec 8 12:11:06 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * eval.c (block_pass): do not push block, substitute it.
+ * configure.in (RUBY_WERROR_FLAG): append all warning flags which
+ are enabled to compile, so that printf format modifiers properly
+ fail. [ruby-core:41351] [Bug #5679]
-Fri Oct 30 01:28:52 1998 Yukihiro Matsumoto <matz@netlab.co.jp>
+Thu Dec 8 07:20:15 2011 Eric Hodel <drbrain@segment7.net>
- * range.c (range_check): avoid <=> check for Fixnums.
+ * doc/re.rdoc: Document difference between match and =~, options with
+ Regexp.new and global variables. Patch by Sylvain Daubert.
+ [Ruby 1.9 - Bug #5709]
- * array.c (rb_ary_aset): accept negative index.
+Thu Dec 8 06:53:10 2011 Eric Hodel <drbrain@segment7.net>
-Wed Oct 28 22:00:54 1998 Yukihiro Matsumoto <matz@netlab.co.jp>
+ * doc/re.rdoc: Fix example code to match documentation. Patch by
+ Jarno Lamberg. [Ruby 1.9 - Bug #5624]
- * regex.c (re_match): access out of boundary fixed.
+Wed Dec 7 19:04:22 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Wed Oct 28 11:37:42 1998 TAMITO <tommy@valley.ne.jp>
+ * configure.in (rpath): fix typo in the help string. a patch from
+ Yuji Yamano <yyamano AT kt.rim.or.jp> in [ruby-list:48568].
- * io.c (f_select): fd number comparison bug.
+Wed Dec 7 18:55:56 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Tue Oct 27 23:07:11 1998 Yukihiro Matsumoto <matz@netlab.co.jp>
+ * vm.c (vm_set_top_stack, vm_set_eval_stack): check for stack
+ overflow with stack_max before push new frame. [ruby-core:41520]
+ [Bug #5720]
- * sample/ruby-mode.el (ruby-parse-region): forgot to support %w()
- style array literal.
+ * vm.c (vm_set_main_stack): no stack overflow chances after
+ vm_set_eval_stack().
- * eval.c (rb_eval): unused block raises warning.
+Wed Dec 7 09:58:15 2011 Eric Hodel <drbrain@segment7.net>
-Mon Oct 26 09:37:53 1998 Yukihiro Matsumoto <matz@netlab.co.jp>
+ * ext/bigdecimal/bigdecimal.c: Document +@, -@, hash, INFINITY, Nan.
+ Patch by Sylvain Daubert. [Ruby 1.9 - Feature #5622]
- * eval.c (dvar_asgn_push): dvar pushed too many times if
- variable-in-block first appear in loops.
+Wed Dec 7 09:48:00 2011 Eric Hodel <drbrain@segment7.net>
-Sun Oct 25 22:59:27 1998 Yukihiro Matsumoto <matz@netlab.co.jp>
+ * io.c (Init_IO): Mention io/console methods. [Ruby 1.9 - Bug #5602]
+ * ext/io/console/console.c: Mention that io/console must be required
+ similar to lib/time.rb
- * regex.c (set_list_bits): was using wrong offset.
+Wed Dec 7 08:04:31 2011 Aaron Patterson <aaron@tenderlovemaking.com>
-Thu Oct 22 00:07:11 1998 Yukihiro Matsumoto <matz@netlab.co.jp>
+ * ext/psych/lib/psych.rb (module Psych): parse and load methods take
+ an optional file name that is used when raising Psych::SyntaxError
+ exceptions
+ * ext/psych/lib/psych/syntax_error.rb (module Psych): allow nil file
+ names and handle nil file names in the exception message
+ * test/psych/test_exception.rb (module Psych): Tests for changes.
- * eval.c (rb_obj_method): method retrieved from tainted object
- should be tainted too.
+Tue Dec 6 18:26:33 2011 Tanaka Akira <akr@fsij.org>
- * eval.c (method_call): safe_level should be restored during
- Method#call.
+ * ext/dbm/dbm.c: use db_version() instead of DB_VERSION_STRING to
+ detect runtime Berkeley DB version.
+ use dpversion instead of _QDBM_VERSION to detect runtime QDBM
+ version.
+ [ruby-dev:44948]
-Wed Oct 21 14:21:06 1998 Yukihiro Matsumoto <matz@netlab.co.jp>
+Tue Dec 6 12:30:41 2011 Tanaka Akira <akr@fsij.org>
- * io.c (Init_IO): new constants IO::SEEK_{SET,CUR,END}.
+ * ext/dbm/extconf.rb: detect gdbm_version in libgdbm.
- * io.c (rb_f_ungetc): ungetc pushes a char back into STDIN.
+ * ext/dbm/dbm.c: make DBM::VERSION more informative for gdbm, qdbm and
+ Berkeley DB 1.x. [ruby-dev:44944]
-Mon Oct 19 11:50:00 1998 Motoyuki Kasahara <m-kasahr@sra.co.jp>
+Tue Dec 6 07:26:37 2011 Eric Hodel <drbrain@segment7.net>
- * ext/extmk.rb: Load '@top_srcdir@/lib/find.rb', not
- '../lib/find.rb'.
- * ext/extmk.rb: Distinguish between `top_srcdir' and `topdir'.
- * Makefile.in (CFLAGS): Add `-I.'.
- * Makefile.in (lex.c): Give `@srcdir@/keywords' to gperf, not
- `keywords'.
- * instruby.rb: Use `CONFIG["bindir"]', instead of `prefix + "/bin"'.
- * instruby.rb: Use `CONFIG["libdir"]', instead of `prefix + "/lib"'.
- * instruby.rb Use `CONFIG["mandir"]', instead of `prefix + "/man"'.
- * instruby.rb (wdir): Add the variable to preserve the current
- working directory.
- * instruby.rb: Chdir to wdir before install `config.h' and
- `rbconfig.rb'.
+ * range.c: Improve documentation for Range. Patch by Chris Zetter.
+ [Ruby 1.9 - Bug #5656]
-Mon Oct 19 10:07:01 1998 EGUCHI Osamu <eguchi@shizuokanet.ne.jp>
+Mon Dec 5 19:08:04 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * eval.c (rb_eval): reduce recursive calls to rb_eval().
+ * regparse.c (PFETCH_READY): separate gcc specific trick.
-Fri Oct 16 15:31:45 1998 Yukihiro Matsumoto <matz@netlab.co.jp>
+Mon Dec 5 19:01:59 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * time.c (time_new_internal): timeval must be positive.
+ * process.c (proc_seteuid_m): fix argument.
-Thu Oct 15 13:54:48 1998 Yukihiro Matsumoto <matz@netlab.co.jp>
+ * test/ruby/test_process.rb (test_geteuid): fix typo.
- * parse.y (arg): local variables can be accessed within right side
- expression in assignment, notably in blocks.
+ * test/ruby/test_process.rb (test_getegid, test_set[eg]uid): add.
-Wed Oct 14 00:18:33 1998 Yukihiro Matsumoto <matz@netlab.co.jp>
+Mon Dec 5 18:56:55 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * array.c (Init_Array): Array#=== is now for equal check, not
- inclusion check.
+ * bignum.c (big_rshift), compile.c (validate_label,
+ iseq_build_from_ary_exception), cont.c (cont_capture), dir.c
+ (dir_open_dir), gc.c (objspace_each_objects), io.c (pipe_open)
+ (rb_io_advise), parse.y (parser_compile_string)
+ (rb_parser_compile_file), proc.c (binding_free), process.c
+ (rb_proc_exec_n, rb_seteuid_core, proc_setegid, rb_setegid_core)
+ (p_uid_exchange, p_gid_exchange), regparse.c (strdup_with_null),
+ signal.c (sig_dfl), vm.c (rb_iseq_eval, rb_iseq_eval_main),
+ vm_insnhelper.c (vm_expandarray): suppress
+ unused-but-set-variable warnings.
- * parse.y (when_args): `when a, *b' style new syntax for array
- expansion in `case'.
+ * class.c (rb_obj_methods), compile.c (iseq_compile_each),
+ iseq.c(iseq_load, rb_iseq_parameters), pack.c (pack_pack),
+ regcomp.c (is_not_included, update_string_node_case_fold),
+ transcode.c (rb_econv_open0, make_replacement),
+ vm_eval.c (raise_method_missing): remove unused variable.
-Tue Oct 13 14:30:32 1998 Yukihiro Matsumoto <matz@netlab.co.jp>
+ * signal.c (reserved_signal_p): static.
- * object.c (rb_obj_untaint): taint marks can be unset.
+Mon Dec 5 14:27:23 2011 NAKAMURA Usaku <usa@ruby-lang.org>
- * eval.c (rb_eval): taint propagation for embedded strings.
+ * include/ruby/{subst.h,win32.h}, ext/socket/rubysocket.h: revert
+ r33876. [ruby-core:41475] [Bug #5706]
-Mon Oct 12 13:27:15 1998 Yukihiro Matsumoto <matz@netlab.co.jp>
+ * ext/socket/extconf.rb: the alternative hack for [Bug #5675].
- * eval.c (rb_call0): check stack depth more frequently.
+Mon Dec 5 10:18:45 2011 NAKAMURA Usaku <usa@ruby-lang.org>
-Mon Oct 12 08:08:30 1998 Yukihiro Matsumoto <matz@netlab.co.jp>
+ * ext/zlib/zlib.c (rb_gzreader_initialize): revert a part of r33937.
+ 1st, to change the mode of an IO is very sensitive problem, so
+ the maintainer of this library should judge it.
+ 2nd, usually Zlib::GzipReader.new is not called directly. #initialize
+ is called via .open, and in the method the I/O is opened in binary
+ mode, so there is no problem without changing the mode in #initialize.
- * io.c (rb_p): can print even in secure mode.
+Sun Dec 4 22:53:12 2011 Tanaka Akira <akr@fsij.org>
-Sun Oct 11 22:50:13 1998 Yukihiro Matsumoto <matz@netlab.co.jp>
+ * lib/tempfile.rb: don't use lock directory. [ruby-dev:39197]
- * variable.c (rb_const_set): taint check for modification.
+Sun Dec 4 22:34:43 2011 Tanaka Akira <akr@fsij.org>
- * variable.c (rb_ivar_set): taint check for modification.
+ * lib/tempfile.rb (Tempfile::MAX_TRY): remove unused constant.
- * string.c (rb_str_modify): taint check for modification.
+Sun Dec 4 12:11:28 2011 Kazuki Tsujimoto <kazuki@callcc.net>
- * hash.c (rb_hash_modify): taint check for modification.
+ * lib/pp.rb: fix rdoc.
- * array.c (rb_ary_modify): taint check for modification.
+Sun Dec 4 12:03:16 2011 NARUSE, Yui <naruse@ruby-lang.org>
- * ruby.h (FL_TAINT): taint for all objects, not only strings.
+ * lib/delegate.rb (Delegator#methods): Kernel#methods receives
+ zero or one argument. [ruby-core:37118] [Bug #4882]
-Fri Oct 9 17:01:14 1998 Yukihiro Matsumoto <matz@netlab.co.jp>
+Sun Dec 4 10:15:00 2011 Luis Lavena <luislavena@gmail.com>
- * io.c (read_all): read() returns "" at immediate EOF.
+ * ext/zlib/zlib.c (rb_gzreader_initialize): use binary mode by default
+ under Windows. Patch by Hiroshi Shirosaki. [ruby-core:40706]
+ [Feature #5562]
- * io.c (io_read): read(nil) read all until EOF.
+ * include/ruby/encoding.h (void rb_econv_binmode): define NEWLINE
+ decorator.
-Thu Oct 8 13:32:13 1998 Yukihiro Matsumoto <matz@netlab.co.jp>
+ * io.c (rb_cloexec_fcntl_dupfd): Introduce NEED_READCONV and
+ NEED_WRITECONV to replace universal newline decorator by CRLF only
+ when required to improve file reading and writing under Windows.
+ Patch by Hiroshi Shirosaki. [ruby-core:40706] [Feature #5562]
+ * io.c (do_writeconv): adjust binary mode if required.
+ * io.c (read_all, appendline, swallow, rb_io_getline_1): ditto.
+ * io.c (io_getc, rb_io_each_codepoint, rb_io_ungetc): ditto.
+ * io.c (rb_io_binmode, rb_io_ascii8bit_binmode): ditto.
+ * io.c (rb_io_extract_modeenc, rb_sysopen): ditto.
+ * io.c (pipe_open, prep_stdio, io_encoding_set): ditto.
+ * io.c (rb_io_s_pipe, copy_stream_body): ditto.
- * time.c (time_dump): marshal can dump Time object now.
+ * test/ruby/test_io_m17n.rb (EOT): add test for pipe and stdin in
+ binary mode.
- * marshal.c (Init_marshal): rename marshal methods `_dump_to' to
- `_dump', `_load_from' to `_load'.
+ * win32/win32.c (init_stdhandle): remove O_BINARY from stdhandle
+ initialization.
+ * win32/win32.c (rb_w32_write): use FTEXT mode accordingly.
- * parse.y (rb_intern): "+=".intern generates proper symbol.
+Sat Dec 3 20:49:16 2011 Yusuke Endoh <mame@tsg.ne.jp>
-Mon Oct 5 18:31:53 1998 Yukihiro Matsumoto <matz@netlab.co.jp>
+ * variable.c (set_const_visibility): print a warning when no argument
+ is passwd to Module#private_constant. [ruby-list:48558]
- * version 1.1c6 released.
+ * vm_method.c (set_method_visibility): ditto for
+ Module#private_class_method.
-Fri Oct 2 14:22:33 1998 Yukihiro Matsumoto <matz@netlab.co.jp>
+Sat Dec 3 20:43:14 2011 Yusuke Endoh <mame@tsg.ne.jp>
- * regex.c (re_search): `/\s*(--)$/ =~ "- --"' did not match,
- because of wrong optimize condition.
+ * variable.c (set_const_visibility): Module#private_constant has
+ changed the visibility of only the first argument. Now it changes
+ all of them. [ruby-list:48558]
-Mon Oct 1 01:55:16 1998 Yukihiro Matsumoto <matz@netlab.co.jp>
+ * test/ruby/test_module.rb: add a test for above.
- * parse.y (rb_intern): should not raise exceptions.
+Sat Dec 3 07:17:29 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * parse.y (yylex): symbol like `:foo?=' should not be allowed.
+ * Makefile.in (CFLAGS): append ARCH_FLAG.
- * ext/extmk.rb.in: makes *.a for static link modules.
+ * configure.in (ARCH_FLAG): exclude from CFLAGS.
-Wed Sep 30 14:13:06 1998 Yukihiro Matsumoto <matz@netlab.co.jp>
+ * configure.in (UNIVERSAL_INTS): include short int. fix for
+ test/mkmf.
- * eval.c (rb_thread_start): supports making a subclass of the
- Thread class.
+Fri Dec 2 15:48:08 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Tue Sep 29 17:46:01 1998 Yukihiro Matsumoto <matz@netlab.co.jp>
+ * ext/bigdecimal/bigdecimal.c (VpAllocReal): reduce extra frac.
- * eval.c (rb_thread_join): join is now an instance method.
+Fri Dec 2 15:41:24 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Fri Sep 25 12:01:19 1998 Yukihiro Matsumoto <matz@netlab.co.jp>
+ * configure.in: check whether -pie or -Wl,-pie is valid as
+ LDFLAGS. [ruby-core:41438] [Bug#5697]
- * parse.y (yylex): `@foo!' should be an error.
+ * configure.in: use $linker_flag for LDFLAGS option which is not
+ limited to particular platforms.
-Thu Sep 24 14:55:06 1998 WATANABE Tetsuya <tetsu@jpn.hp.com>
+Thu Dec 1 23:21:58 2011 CHIKANAGA Tomoyuki <nagachika00@gmail.com>
- * ext/etc/etc.c (Init_etc): wrong field definition.
+ * thread_pthread.c (thread_timer): call prctl(PR_SET_NAME) only if
+ PR_SET_NAME is available.
-Thu Sep 17 17:09:05 1998 Yukihiro Matsumoto <matz@netlab.co.jp>
+Thu Dec 1 22:31:16 2011 Tanaka Akira <akr@fsij.org>
- * io.c (io_reopen): was creating FILE* for wrong fd.
+ * io.c (linux_get_maxfd): change local variable name.
-Tue Sep 15 05:28:11 1998 Koji Arai <JCA02266@nifty.ne.jp>
+Thu Dec 1 16:59:24 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * regex.c (re_compile_pattern): forgot to fixup for the pattern
- like (?=(A)|(B)).
+ * ext/socket/extconf.rb: add arguments for macro calls.
+ [ruby-core:41370] [Bug#5681]
-Tue Sep 15 01:06:08 1998 Yukihiro Matsumoto <matz@netlab.co.jp>
+Thu Dec 1 16:20:16 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * io.c (rb_io_gets_internal): do not set $_ by default, only
- gets/readline set the variable.
+ * lib/mkmf.rb (MakeMakefile#try_func): fix broken patch at r33834.
- * eval.c (rb_f_load): load toplevel class is set to anonymous
- module if safe_level >= 5, to encapsulate modification.
+Thu Dec 1 14:43:17 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * eval.c (rb_f_load): set frame properly.
+ * ext/bigdecimal/bigdecimal.h (Real): suppress false warning from
+ clang. [ruby-core:41418] [Bug#5693]
- * string.c (rb_str_each_line): do not set $_.
+Thu Dec 1 10:31:55 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Mon Sep 14 14:42:27 1998 Yukihiro Matsumoto <matz@netlab.co.jp>
+ * configure.in (LDFLAGS): -fstack-protector is always needed to
+ link static library created with it. [ruby-core:41387]
+ [Bug#5686]
- * regex.c (re_match): beginning and end of the string, do not
- automatically match `\b'.
+Thu Dec 1 07:03:51 2011 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
- * string.c (scan_once): consume at least on character.
+ * configure.in: add sys/prctl.h test.
+ * thread_pthread.c (thread_timer): call prctl(PR_SET_NAME) to change
+ thread name. It may help to debug.
- * regex.c (re_search): wrong behavior for negative range.
+Wed Nov 30 23:35:45 2011 NARUSE, Yui <naruse@ruby-lang.org>
-Sat Sep 12 21:21:26 1998 Koji Arai <JCA02266@nifty.ne.jp>
+ * variable.c (rb_path2class): don't raise NameError when the middle
+ constant of the path is not defined but defined on toplevel.
+ [ruby-core:41410] [Bug #5691]
- * regex.c (re_search): range value should be maintained.
+Wed Nov 30 20:02:02 2011 Martin Duerst <duerst@it.aoyama.ac.jp>
-Thu Sep 10 10:55:00 1998 Yukihiro Matsumoto <matz@netlab.co.jp>
+ * transcode.c: Simplified rb_econv_binmode, avoided a warning on cygwin.
- * parse.y (backref_error): yyerror does not understand formats.
+Wed Nov 30 08:57:07 2011 Eric Hodel <drbrain@segment7.net>
-Tue Sep 8 18:05:33 1998 Yukihiro Matsumoto <matz@netlab.co.jp>
+ * lib/mkmf.rb: Use MakeMakefile's rm_f to avoid conflict with Rake or
+ FileUtils.
+ * test/ruby/test_module.rb: Hide MakeMakefile's inclusion in Object
- * version 1.1c5 released.
+Wed Nov 30 09:12:43 2011 NAKAMURA Usaku <usa@ruby-lang.org>
-Tue Sep 8 10:03:39 1998 Yukihiro Matsumoto <matz@netlab.co.jp>
+ * lib/rdoc/encoding.rb (RDoc::Encoding.read_file): fixup newline chars
+ on Windows.
+ see https://github.com/rdoc/rdoc/issues/87
- * string.c (str_each_line): wrong line splitting with newline at
- top of the string.
+ * test/rdoc/test_rdoc_markup_pre_process.rb
+ (TestRDocMarkupPreProcess#test_include_file,
+ TestRDocMarkupPreProcess#test_include_file_encoding_incompatible):
+ follow above change.
- * string.c: non bang methods return copied string.
+Wed Nov 30 09:09:37 2011 Aaron Patterson <aaron@tenderlovemaking.com>
- * eval.c (f_END): needed to initialize frame->argc;
+ * ext/psych/parser.c (parse): parse method can take an option file
+ name for use in exception messages.
+ * test/psych/test_parser.rb: corresponding tests.
-Fri Sep 4 11:27:40 1998 Yukihiro Matsumoto <matz@netlab.co.jp>
+Tue Nov 29 09:07:59 2011 Eric Hodel <drbrain@segment7.net>
- * bignum.c (bigadd): proper sign combination.
+ * lib/mkmf.rb: Fix indentations of constants at end of module.
+ Document some constants.
- * regex.c (re_search): wrong return value for \A.
+Tue Nov 29 09:58:23 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Thu Sep 3 14:08:14 1998 Yukihiro Matsumoto <matz@netlab.co.jp>
+ * io.c (rb_write_error2): suppress unused variable warning.
- * version 1.1c4 released.
+Tue Nov 29 07:45:26 2011 Eric Hodel <drbrain@segment7.net>
-Tue Sep 1 10:47:16 1998 Yukihiro Matsumoto <matz@netlab.co.jp>
+ * lib/mkmf.rb: Wrap comments to 78 columns and clean up formatting.
- * regex.c (slow_search): do not compare llen and blen. llen may
- be longer than blen, if little contains 0xff.
+Tue Nov 29 05:54:18 2011 Eric Hodel <drbrain@segment7.net>
- * regex.c (mbctab_euc): set 0x8e as multibyte character.
+ * lib/mkmf.rb: Wrap mkmf.rb in module MakeMakefile to clean up Object
+ documentation. [Ruby 1.9 - Feature #5658]
+ * ext/extmk.rb: Use MakeMakefile::CONFIG instead of Object::CONFIG
+ * test/mkmf/base.rb: ditto
- * string.c (str_inspect): mask character for octal output.
+Tue Nov 29 00:08:57 2011 Yuki Sonoda (Yugui) <yugui@yugui.jp>
-Mon Aug 31 15:32:41 1998 Yukihiro Matsumoto <matz@netlab.co.jp>
+ * common.mk (INSTRUBY_ARGS): added --mantype to apply mdoc2man.rb
+ to man pages. Fixes #5598.
+ (do-install-nodoc, do-install-local, do-install-man,
+ dont-install-nodoc, dont-install-local, dont-install-man):
+ No longer needs --mantype.
- * regex.c (re_search): use calculated offset if exactn is the
- first opcode in the compiled regexp.
+ Reported by Rainer Orth <ro AT cebitec.uni-bielefeld.de>,
+ patch by George Koehler <xkernigh AT netscape.net>.
- * regex.c (bm_search): use Boyer-Moore search for simple search.
+Mon Nov 28 22:26:31 2011 NAKAMURA Usaku <usa@ruby-lang.org>
- * regex.c (must_instr): wrong length check if pattern includes
- byte escape by 0xff.
+ * test/rake/test_rake_directory_task.rb
+ (TestRakeDirectoryTask#test_directory_win32): shouldn't create any
+ file/directory on root directory. create on @tempdir (= Dir.pwd).
+ see https://github.com/jimweirich/rake/issues/91
- * regex.c (re_compile_pattern): need not to check current_mbctype.
+Mon Nov 28 12:57:29 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Sat Aug 29 16:31:40 1998 Yukihiro Matsumoto <matz@netlab.co.jp>
+ * io.c (rb_write_error2): fwrite() returns ssize_t.
- * eval.c (rb_check_safe_str): avoid calling rb_id2name() in normal
- cases to speed-up.
+Mon Nov 28 12:47:19 2011 NAKAMURA Usaku <usa@ruby-lang.org>
- * eval.c (thread_raise): do not save context of terminated thread.
+ * parse.y (nodetype, nodeline): static. these functions are for
+ debugging, and not intend to be public.
- * regex.c (re_compile_pattern): mask \nnn over 256.
+Mon Nov 28 12:37:54 2011 NAKAMURA Usaku <usa@ruby-lang.org>
-Sat Aug 29 02:09:46 1998 Koji Arai <JCA02266@nifty.ne.jp>
+ * gc.c (initial_params): static. it seems to be forgotten at r33501.
- * sprintf.c (f_sprintf): wrong buffer size check.
+Mon Nov 28 12:32:24 2011 NAKAMURA Usaku <usa@ruby-lang.org>
-Fri Aug 28 01:57:04 1998 Yukihiro Matsumoto <matz@netlab.co.jp>
+ * include/ruby/win32.h, win32/win32.c (GetCurrentThreadHandle): remove
+ unused old API.
- * regex.c (re_compile_pattern): accepts (?ix-ix) and (?ix-ix:...).
+Mon Nov 28 12:29:20 2011 NAKAMURA Usaku <usa@ruby-lang.org>
-Fri Aug 28 12:25:33 1998 Hiroshi Igarashi <igarashi@ueda.info.waseda.ac.jp>
+ * win32/mkexports.rb (Exports#initialize): remove old symbol name.
- * ruby.c (ruby_require_modules): load modules in appearing order.
+Mon Nov 28 12:15:28 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Fri Aug 28 01:57:04 1998 Yukihiro Matsumoto <matz@netlab.co.jp>
+ * win32/mkexports.rb (Exports#read_substitution): need to read
+ from subst.h too. [Bug #5675]
- * regex.c (re_compile_pattern): accepts (?ix-ix) and (?ix-ix:...).
+Mon Nov 28 11:46:35 2011 NAKAMURA Usaku <usa@ruby-lang.org>
-Thu Aug 27 12:54:28 1998 Yukihiro Matsumoto <matz@netlab.co.jp>
+ * io.c (rb_io_flush): release GVL during fsync() on Windows.
- * version 1.1c3 released.
+Mon Nov 28 11:00:25 2011 NAKAMURA Usaku <usa@ruby-lang.org>
-Wed Aug 26 14:40:56 1998 Yukihiro Matsumoto <matz@netlab.co.jp>
+ * include/ruby/subst.h: typo of r33876.
- * eval.c (rb_eval): check whether ruby_class is properly set,
- before accessing it.
+Mon Nov 28 10:36:00 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * eval.c (rb_obj_instance_eval): ruby_class should be Qnil for
- special objects like Fixnums.
+ * include/ruby/subst.h: moved Windows specific substitutions from
+ win32.h.
- * ext/tkutil/tkutil.c (Init_tkutil): removes calls to
- rb_yield_0(). used instance_eval() instead in the tk.rb.
+ * ext/socket/rubysocket.h: include ruby/subst.h. [Bug #5675]
-Wed Aug 26 11:47:00 1998 Yukihiro Matsumoto <matz@netlab.co.jp>
+Mon Nov 28 10:20:58 2011 NAKAMURA Usaku <usa@ruby-lang.org>
- * regex.c (re_match): pop non-greedy stack elements on success.
+ * win32/{Makeilfe.sub,win32.c} (FILE_COUNT, FILE_READPTR): move the
+ definitions from config.h to win32.c. I dared to have left such
+ macros, for other future compiler support.
+ [ruby-core:41313] [Bug #5674]
-Wed Aug 26 09:25:35 1998 WATANABE Hirofumi <watanabe@ase.ptg.sony.co.jp>
+Mon Nov 28 09:28:30 2011 NAKAMURA Usaku <usa@ruby-lang.org>
- * ruby.h: add #define environ for cygwin32.
+ * win32/win32.c (rb_w32_uchmod): typo. [Bug#5671] [ruby-dev:44898]
-Tue Aug 25 08:57:41 1998 Yukihiro Matsumoto <matz@netlab.co.jp>
+ * test/ruby/test_file.rb (TestFile#test_chmod_m17n): test of above bug.
- * array.c (rb_ary_sort_bang): temporarily freeze sorting array.
+Sun Nov 27 21:25:33 2011 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
-Mon Aug 24 18:46:44 1998 WATANABE Hirofumi <watanabe@ase.ptg.sony.co.jp>
+ * configure.in: added -fno-strict-overflow. it suppress annoying
+ -Wstrict-overflow warning.
- * dln.c (dln_find_1): path check was too strict.
+Sun Nov 27 20:58:02 2011 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
-Mon Aug 24 15:28:11 1998 WATANABE Hirofumi <watanabe@ase.ptg.sony.co.jp>
+ * io.c (rb_write_error2): get rid of warning on linux. fwrite
+ of glibc is tagged __attribute__ ((__warn_unused_result__))
+ if _FORTIFY_SOURCE != 0.
+ * vm_dump.c (rb_vm_bugreport): ditto.
- * parse.y (f_arglist): opt_nl added after f_args.
+Sun Nov 27 19:09:02 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Fri Aug 21 01:06:01 1998 Yukihiro Matsumoto <matz@netlab.co.jp>
+ * configure.in (stack_protector): disable on mingw. [Bug#5676]
- * ext/socket/socket.c: grand renaming on socket.c.
+ * Makefile.in (DLDFLAGS): also needs -fstack-protector.
+ [Bug#5676]
- * ext/socket/socket.c (inet_aton): supply inet_aton for those
- systems that do not have it.
+Sun Nov 27 14:13:33 2011 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
- * ext/socket/socket.c (setipaddr): use inet_aton instead of
- inet_addr.
+ * configure.in: add -fstack-protector into XLDFLAGS as well as
+ XCFLAGS if stack-protector is used.
- * ext/socket/socket.c (tcp_s_gethostbyname): new method: works
- like Socket.gethostbyname but returning array contains ip-addrs
- as octet decimal string format like "127.0.0.1".
+Sun Nov 27 13:09:25 2011 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
- * ext/socket/socket.c (mkhostent): return format changed to
- [host, aliases, type, ipaddr..] as documented.
+ * configure.in: workaround to avoid MacOS X build error.
+ Maybe autoconf 2.61 is slightly buggy. [ruby-core:41316]
-Wed Aug 19 00:31:09 1998 Yukihiro Matsumoto <matz@netlab.co.jp>
+Sun Nov 27 04:57:11 2011 NARUSE, Yui <naruse@ruby-lang.org>
- * io.c (io_ctl): forgot to place TRAP_END at right position.
+ * configure.in (--no-undefined): r33840 breaks FreeBSD and DragonFly
+ with gcc 4.4 or later. Their environ is in /usr/libexec/ld-elf.so.1,
+ so it will be false negative.
-Fri Aug 14 11:01:47 1998 Yukihiro Matsumoto <matz@netlab.co.jp>
+Sun Nov 27 04:55:45 2011 NARUSE, Yui <naruse@ruby-lang.org>
- * eval.c (call_trace_func): save __FILE__, __LINE__ before
- executing trace_func, since trace function should not corrupt
- line number information.
+ * lib/net/http.rb (Net::HTTP::SSL_IVNAMES): rerefix 33701.
+ SSL_ATTRIBUTES stores names for set_params, they are symbol.
+ SSL_IVNAMES stores instance variable names.
-Thu Aug 13 15:09:02 1998 Yukihiro Matsumoto <matz@netlab.co.jp>
+Sun Nov 27 00:16:07 2011 Tanaka Akira <akr@fsij.org>
- * array.c (ary_s_new): was marking unallocated region on GC.
+ * io.c (copy_stream_body): use 0666 for permission argument for open.
+ [ruby-core:40865]
-Tue Aug 11 11:57:35 1998 Yukihiro Matsumoto <matz@netlab.co.jp>
+Sat Nov 26 23:01:38 2011 Martin Bosslet <Martin.Bosslet@googlemail.com>
- * version 1.1c2 released.
+ * test/openssl/test_engine.rb: remove side effect of generic engine
+ load by explicitly loading software-based "openssl" engine for
+ all tests.
-Mon Aug 10 14:05:30 1998 Yukihiro Matsumoto <matz@netlab.co.jp>
+Sat Nov 26 20:41:48 2011 NARUSE, Yui <naruse@ruby-lang.org>
- * process.c (f_system): removed fflush(stdin).
+ * lib/net/http.rb (Net::HTTP.get_response): enable use_ssl
+ if given URI object is https.
+ patched by Mark Ferlatte [ruby-core:40665] [Bug #5545]
-Fri Aug 7 17:44:44 1998 Yukihiro Matsumoto <matz@netlab.co.jp>
+ * lib/net/http.rb (Net::HTTP.post_form): ditto.
- * error.c (err_snprintf): replace sprintf for fixed sized buffer,
- with snprintf to avoid buffer over-run. For systems which does
- dot provide snprintf, missing/snprintf.c added.
+Sat Nov 26 20:01:18 2011 NARUSE, Yui <naruse@ruby-lang.org>
-Wed Aug 5 00:47:35 1998 Yukihiro Matsumoto <matz@netlab.co.jp>
+ * lib/net/http.rb (Net::HTTP::SSL_ATTRIBUTES): refix 33701.
+ store instance variable symbol names.
- * re.c (rb_reg_search): recycle match object.
+Sat Nov 26 15:40:25 2011 URABE Shyouhei <shyouhei@ruby-lang.org>
-Mon Aug 3 09:17:55 1998 Yukihiro Matsumoto <matz@netlab.co.jp>
+ * .travis.yml (script): should be ./configure
- * string.c (rb_str_gsub_bang): do not allocate temporary string.
+Sat Nov 26 15:39:18 2011 URABE Shyouhei <shyouhei@ruby-lang.org>
- * string.c (rb_str_sub_bang): use inline replace.
+ * .travis.yml (before_script): wrong name, sorry.
-Wed Jul 29 00:36:08 1998 Yukihiro Matsumoto <matz@netlab.co.jp>
+Sat Nov 26 15:31:34 2011 URABE Shyouhei <shyouhei@ruby-lang.org>
- * hash.c (hash_s_new): the default value can be specified.
+ * .travis.yml (before-script): autoconf required.
- * hash.c (hash_default): method to set the default value.
+Sat Nov 26 15:24:05 2011 URABE Shyouhei <shyouhei@ruby-lang.org>
- * hash.c (hash_aref): now returns the default value.
+ * .travis.yml: Travis enable.
-Tue Jul 28 13:03:25 1998 Yukihiro Matsumoto <matz@netlab.co.jp>
+Sat Nov 26 10:47:50 2011 Martin Bosslet <Martin.Bosslet@googlemail.com>
- * array.c (ary_s_new): argument to specify initial value is added.
+ * ext/openssl/extconf.rb: remove checks for available functions.
+ * ext/openssl/missing.h: ditto.
+ Thanks, Tim Mooney for reporting this!
+ [Bug #5432] [ruby-core:40088]
- * array.c (ary_s_new): specifies size, not capacity.
+Sat Nov 26 10:22:28 2011 Martin Bosslet <Martin.Bosslet@googlemail.com>
-Mon Jul 27 12:39:34 1998 Yukihiro Matsumoto <matz@netlab.co.jp>
+ * ext/openssl/ossl_ssl.c: add comment on where to find implementation
+ of OpenSSL::SSL::SSLSocket#session.
- * string.c (str_replace): zero fill for expansion gap.
+Sat Nov 26 05:00:25 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * regex.c (mbctab_euc): set flags on for 0xA1-0xFE. suggested by
- <inaba@st.rim.or.jp>.
+ * configure.in (--no-undefined): RUBY_TRY_CFLAGS does nothing for
+ linker flags. use RUBY_TRY_LDFLAGS.
- * string.c (str_inspect): consider current_mbctype.
+Fri Nov 25 11:37:07 2011 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
-Sun Jul 26 15:37:11 1998 Tadayoshi Funaba <tadf@kt.rim.or.jp>
+ * io.c (ioctl_narg_len, linux_iocparm_len): reinstantiate linux
+ specific narg length calculation.
+ * test/ruby/test_io.rb (test_ioctl_linux2): add new test for old and
+ unstructured ioctl.
- * array.c (ary_s_new): Array.new(1<<30) dumps core.
+Fri Nov 25 10:39:14 2011 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
-Fri Jul 24 13:40:19 1998 Yukihiro Matsumoto <matz@netlab.co.jp>
+ * Makefile.in (EXTLDFLAGS): export it.
+ * configure.in: add --no-undefined if --enable-shared is specified.
+ Gentoo enabled this option long time. Also, export EXTLDFALGS.
- * version 1.1c1 released.
+Fri Nov 25 08:48:35 2011 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
-Fri Jul 24 02:10:22 1998 Yukihiro Matsumoto <matz@netlab.co.jp>
+ * configure.in: turn on PIE if --enable-shared is not specified.
- * marshal.c (r_bytes2): allocated buffer size was too short.
+Fri Nov 25 08:05:07 2011 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
- * marshal.c (w_object): saves all options, not only casefold flag.
+ * configure.in: add -fstack-protector. It help to protect us from
+ stack smashing attack.
- * re.c (reg_clone): now copies options properly.
+Fri Nov 25 08:03:28 2011 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
- * re.c (reg_get_kcode): code number was wrong.
+ * configure.in: add -D_FORTIFY_SOURCE=2. It provide some compile
+ time and runtime check for security.
-Thu Jul 23 13:11:32 1998 Yukihiro Matsumoto <matz@netlab.co.jp>
+Fri Nov 25 08:00:23 2011 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
- * eval.c (rb_attr): argument should be symbol or string.
+ * lib/mkmf.rb: get rid of warnings of mkmf.rb if -Wmissing-declarations
+ and/or -Wold-style-definition warnings if specified.
+ Patch by Nikolai Weibull. Thank you! [Bug #5459] [ruby-core:40200]
-Wed Jul 22 11:59:34 1998 Yukihiro Matsumoto <matz@netlab.co.jp>
+Fri Nov 25 07:46:09 2011 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
- * regex.c (calculate_must_string): wrong offset added.
+ * configure.in: add -Wall always.
-Wed Jul 22 11:59:59 1998 Yukihiro Matsumoto <matz@netlab.co.jp>
+Thu Nov 24 20:02:40 2011 Tanaka Akira <akr@fsij.org>
- * st.c (rehash): still had a GC problem. fixed.
+ * test/openssl/test_engine.rb: use IO#reopen to restore stderr.
-Tue Jul 21 13:19:30 1998 Yukihiro Matsumoto <matz@netlab.co.jp>
+Thu Nov 24 19:59:56 2011 Tanaka Akira <akr@fsij.org>
- * eval.c (gc_mark_threads): crashed on GC before thread allocation.
+ * io.c (rb_io_reopen): re-initialize buffering mode for stdout and
+ stderr.
- * st.c (rehash): GC during rehash caused SEGV.
+Thu Nov 24 11:12:48 2011 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
-Tue Jul 21 01:25:10 1998 Yukihiro Matsumoto <matz@netlab.co.jp>
+ * io.c (rb_io_fsync,rb_io_fdatasync): release GVL during fsync().
+ fsync() and fdatasync() may take a long time on slow disks and/or
+ if there is much dirty data.
+ Patch by Eric Wong. [Feature #5665] [ruby-core:41247]
- * sprintf.c (f_sprintf): integer formatter totally re-written.
+Thu Nov 24 10:05:02 2011 Martin Bosslet <Martin.Bosslet@googlemail.com>
- * sprintf.c (remove_sign_bits): support uppercase hexadecimal.
+ * test/openssl/test_engine.rb: Suppress output from 'openssl'
+ engine's RC4 cipher.
+ [Bug #5633] [ruby-core:41026]
-Sat Jul 18 00:14:13 1998 Yukihiro Matsumoto <matz@netlab.co.jp>
+Thu Nov 24 08:05:02 2011 Martin Bosslet <Martin.Bosslet@googlemail.com>
- * sprintf.c (f_sprintf): proper sign position for %X and %O.
+ * ext/openssl/ossl_pkey_dsa.c: remove redundant colon from error
+ message.
+ * ext/openssl/ossl_ssl.c: ditto.
+ * ext/openssl/ossl_pkey_rsa: ditto.
+ patched by Eric Hodel [Bug #5604] [ruby-core:40896]
-Fri Jul 17 14:10:20 1998 Yukihiro Matsumoto <matz@netlab.co.jp>
+Wed Nov 23 20:03:43 2011 NARUSE, Yui <naruse@ruby-lang.org>
- * version 1.1c0 released.
+ * io.c (ioctl_narg_len): don't use _IOC_SIZE macro on Linux.
+ On Linux some constants for ioctl(2) doesn't include the size of
+ its return value and 16bit value; for example FIONREAD 0x541B.
+ Moreover the manual, ioctl_list(2), says "Note that the size
+ bits are very unreliable: in lots of cases they are wrong,
+ either because of buggy macros using sizeof(sizeof(struct)),
+ or because of legacy values."
+ So we shouldn't use it.
-Fri Jul 17 08:01:49 1998 Tadayoshi Funaba <tadf@kt.rim.or.jp>
+Tue Nov 22 18:07:32 2011 NAKAMURA Usaku <usa@ruby-lang.org>
- * process.c (f_exec): Check_SafeStr() added.
+ * win32/win32.c (_pioinfo): need to declare _pioinfo() before using
+ _osfhnd and other macros which uses _pioinfo() internally.
- * process.c (f_system): Check_SafeStr() moved before fork().
+Tue Nov 22 17:49:45 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Thu Jul 16 22:58:48 1998 Yukihiro Matsumoto <matz@netlab.co.jp>
+ * win32/win32.c (_pioinfo): make an inline function.
- * string.c (scan_once): substrings to the block should not be
- tainted. use reg_nth_match(), not str_substr().
+Tue Nov 22 11:26:08 2011 NARUSE, Yui <naruse@ruby-lang.org>
- * string.c (str_substr): needed to transfer taint.
+Tue Nov 22 11:33:58 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Thu Jul 16 16:15:57 1998 Yukihiro Matsumoto <matz@netlab.co.jp>
+ * win32/win32.c (dupfd): argument of _osfhnd and so on should not
+ have side effect.
- * gc.c (xmalloc): object allocation count added to GC trigger.
+Tue Nov 22 11:26:08 2011 NARUSE, Yui <naruse@ruby-lang.org>
- * eval.c (thread_save_context): avoid marking uninitialized stack
- in thread_mark. GC may be triggered by REALLOC_N().
+ * bignum.c (rb_big_divide): refix of r33536. Don't change behavior of Bignum#/.
+ [ruby-core:40429] [Bug #5490]
-Wed Jul 15 15:11:57 1998 Yukihiro Matsumoto <matz@netlab.co.jp>
+Tue Nov 22 10:46:57 2011 NARUSE, Yui <naruse@ruby-lang.org>
- * experimental release 1.1b9_31.
+ * numeric.c (ruby_float_step): improve floating point calculations.
+ [ruby-core:35753] [Bug #4576]
-Wed Jul 15 15:05:27 1998 Yukihiro Matsumoto <matz@netlab.co.jp>
+ * numeric.c (ruby_float_step): correct the error of floating point
+ numbers on the excluding case.
+ patched by Masahiro Tanaka [ruby-core:39608]
- * eval.c (thread_create): exit() and abort() in threads now
- forwarded to main_thread.
+ * numeric.c (ruby_float_step): use the end value when the current
+ value is greater than or equal to the end value.
+ patched by Akira Tanaka [ruby-core:39612]
-Tue Jul 14 14:03:47 1998 Yukihiro Matsumoto <matz@netlab.co.jp>
+Tue Nov 22 06:59:21 2011 Tanaka Akira <akr@fsij.org>
- * variable.c (obj_instance_variables): list names that is not
- instance variables.
+ * test/ruby/test_io.rb (test_fcntl_dupfd): there is no known platform
+ which don't have F_DUPFD. [ruby-dev:44874]
- * gc.c (GC_MALLOC_LIMIT): choose smaller limit value.
+Tue Nov 22 04:46:22 2011 Aaron Patterson <aaron@tenderlovemaking.com>
-Mon Jul 13 12:39:38 1998 Yukihiro Matsumoto <matz@netlab.co.jp>
+ * ext/psych/lib/psych.rb: remove autoload from psych
+ * ext/psych/lib/psych/json.rb: ditto
- * object.c (str2cstr): should not return NULL.
+Tue Nov 22 00:44:59 2011 Tanaka Akira <akr@fsij.org>
-Fri Jul 10 11:51:46 1998 Yukihiro Matsumoto <matz@netlab.co.jp>
+ * test/ruby/test_io.rb (test_fcntl_dupfd): the argument of F_DUPFD is
+ minimum file descriptor.
- * parse.y (gettable): needed to add dyna_in_block() check.
+Tue Nov 22 00:25:17 2011 Tanaka Akira <akr@fsij.org>
-Thu Jul 9 17:38:23 1998 Yukihiro Matsumoto <matz@netlab.co.jp>
+ * io.c (linux_get_maxfd): get rid of a warning.
- * experimental release 1.1b9_30.
+Mon Nov 21 23:39:14 2011 Tanaka Akira <akr@fsij.org>
-Thu Jul 9 16:01:48 1998 Yukihiro Matsumoto <matz@netlab.co.jp>
+ * io.c (linux_get_maxfd): new function to find maximum fd on Linux.
+ (rb_close_before_exec): use linux_get_maxfd.
- * sprintf.c (fmt_setup): format specifier for long needed.
+Mon Nov 21 06:16:24 2011 NARUSE, Yui <naruse@ruby-lang.org>
- * sprintf.c (f_sprintf): ditto.
+ * cont.c (fiber_switch): ignore fiber context switch
+ because destination fiber is same as current fiber.
+ With out this, it may segv on FreeBSD 9.
+ patched by Koichi Sasada.
- * numeric.c (fix2str): ditto.
+Sun Nov 20 23:22:42 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * eval.c (thread_create): no more ITIMER_REAL.
+ * ext/extmk.rb (extract_makefile, extmake): regenerate makefiles
+ if globbed source file list is changed.
- * eval.c (thread_create): thread finalization needed before
- aborting thread if thread_abort is set.
+ * lib/mkmf.rb (create_makefile): store ORIG_SRCS.
-Wed Jul 8 18:17:33 1998 Yukihiro Matsumoto <matz@netlab.co.jp>
+Sun Nov 20 22:43:03 2011 NARUSE, Yui <naruse@ruby-lang.org>
- * bignum.c (big_pow): abandon power by bignum (too big).
+ * enc/unicode.c (PROPERTY_NAME_MAX_SIZE): +1.
+ reported by Ken Takata. [ruby-dev:44894][Bug #5652]
-Tue Jul 7 13:58:43 1998 Yukihiro Matsumoto <matz@netlab.co.jp>
+Sun Nov 20 11:01:28 2011 Tanaka Akira <akr@fsij.org>
- * eval.c (rb_catch): add C level catch/throw feature.
+ * lib/set.rb (SortedSet.setup): remove old_init after initialize
+ method is redefined. The remove before redefinition makes the
+ warning prevention fragile. [ruby-dev:44892]
-Mon Jul 6 15:18:09 1998 Yukihiro Matsumoto <matz@netlab.co.jp>
+Sun Nov 20 04:01:45 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * parse.y (arg): proper return values for `||=' and `&&='.
+ * Makefile.in (enc/unicode/name2ctype.h): remove duplicated
+ ifdefs.
-Fri Jul 3 16:05:11 1998 Yukihiro Matsumoto <matz@netlab.co.jp>
+Sat Nov 19 19:31:47 2011 Tanaka Akira <akr@fsij.org>
- * experimental release 1.1b9_29.
+ * time.c (TIME_COPY_GMT): copy vtm.utc_offset and vtm.zone too.
+ patch by Tomoyuki Chikanaga.
+ [ruby-dev:44827] [Bug #5586]
-Fri Jul 3 11:20:46 1998 Yukihiro Matsumoto <matz@netlab.co.jp>
+Sat Nov 19 16:36:57 2011 Tanaka Akira <akr@fsij.org>
- * marshal.c (r_byte): byte should not extend sign bit.
+ * test/net/http/test_http.rb: remove temporally files in ensure clause.
- * numeric.c (fix_mul): use FIX2LONG() instead of FIX2INT() for
- 64bit architectures.
+Sat Nov 19 08:18:41 2011 Tanaka Akira <akr@fsij.org>
- * marshal.c (r_bytes): remove weird casting between pointer and int.
+ * test/net/http/test_http.rb: remove temporally files.
- * process.c (proc_setsid): new method Process#setsid().
+Fri Nov 18 17:18:16 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Thu Jul 2 12:49:21 1998 Yukihiro Matsumoto <matz@netlab.co.jp>
+ * ext/io/console/console.c (console_raw, console_set_raw)
+ (console_getch): optional parameters. [EXPERIMENTAL]
- * marshal.c (w_object): remove `write_bignum' label for 64bit
- architectures.
+Fri Nov 18 16:12:11 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * marshal.c (r_bytes): needs int, not long.
+ * ext/io/console/console.c (console_cooked, console_set_cooked):
+ new methods to reset cooked mode. [EXPERIMENTAL]
-Wed Jul 1 14:21:06 1998 Yukihiro Matsumoto <matz@netlab.co.jp>
+Fri Nov 18 13:20:26 2011 NAKAMURA Usaku <usa@ruby-lang.org>
- * numeric.c (flo_plus): should not allow addition with strings.
+ * test/unit/assertions.rb (MINI_DIR): quick dirty hack to get rid of
+ warnings when using assert/assert_respond_to.
-Wed Jul 1 13:09:01 1998 Keiju ISHITSUKA <keiju@rational.com>
+Fri Nov 18 13:03:38 2011 NAKAMURA Usaku <usa@ruby-lang.org>
- * numeric.c (num_uminus): wrong coerce direction.
+ * io.c (rb_cloexec_open): set O_NOINHERIT instead of O_CLOEXEC if it is
+ available (for Windows).
-Tue Jun 30 10:13:44 1998 Yukihiro Matsumoto <matz@netlab.co.jp>
+ * win32/win32.c (fcntl): on F_DUPFD, determine the inheritance of the
+ new handle by O_NOINHERIT flag of original fd.
- * io.c (f_p): accepts arbitrary number of arguments.
+Fri Nov 18 08:00:41 2011 Ryan Davis <ryand-ruby@zenspider.com>
- * eval.c (rb_yield_0): there's some case that iterator_p() returns
- true even if the_block was not set. check added.
+ * lib/minitest/*: Imported minitest 2.8.1 (r6750)
+ * test/minitest/*: ditto
+ * configure.in: Improved gcc-llvm error message to help people migrate.
-Tue Jun 30 01:05:20 1998 Yukihiro Matsumoto <matz@netlab.co.jp>
+Thu Nov 17 20:43:34 2011 Tanaka Akira <akr@fsij.org>
- * eval.c (BEGIN_CALLARGS): adjust the_block before evaluating the
- receiver's value and the arguments.
+ * ext/dbm/extconf.rb: revert a part of the patch in [ruby-dev:41531].
+ don't use db.h with other headers. [ruby-dev:44884].
-Fri Jun 26 18:02:50 1998 Yukihiro Matsumoto <matz@netlab.co.jp>
+Thu Nov 17 20:23:03 2011 NAKAMURA Usaku <usa@ruby-lang.org>
- * experimental release 1.1b9_28.
+ * benchmark/bm_io_select[23].rb: use Process::RLIMIT_NOFILE only when
+ it is defined. if it is not defined, assume 64 as the max of fds.
-Fri Jun 26 11:01:26 1998 WATANABE Hirofumi <watanabe@ase.ptg.sony.co.jp>
+Thu Nov 17 10:36:46 2011 Aaron Patterson <aaron@tenderlovemaking.com>
- * string.c (str_aset_method): needed to convert to string.
+ * ext/psych/lib/psych.rb (load_file): make sure opened yaml files are
+ also closed. [ruby-core:41088]
-Thu Jun 25 02:05:50 1998 Yukihiro Matsumoto <matz@netlab.co.jp>
+Wed Nov 16 18:13:52 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * regex.c (re_search): optimize for `.*' at beginning of the
- pattern.
+ * Makefile.in (LIBRUBY_A): check if generated linked library is
+ valid for extconf.
- * regex.c (re_search): optimize for character class repeat at
- beginning of the pattern.
+Wed Nov 16 13:51:40 2011 NAKAMURA Usaku <usa@ruby-lang.org>
- * regex.c (re_compile_pattern): detect optimization potential for
- the compiled patterns.
+ * bignum.c (rb_big2ulong): need to calc in unsigned long, because
+ the range of VALUE is larger than it on LLP64 platform, such as Win64.
+ this change fixes the failures of test/-ext-/num2int.
-Thu Jun 25 00:02:26 1998 WATANABE Hirofumi <watanabe@ase.ptg.sony.co.jp>
+Wed Nov 16 12:02:47 2011 NAKAMURA Usaku <usa@ruby-lang.org>
- * re.c (reg_s_new): flag value was wrong.
+ * test/webrick/test_cgi.rb (TestWEBrickCGI#start_cgi_server): there are
+ no guarantee of existence of RbConfig::CONFIG['LIBPATHENV'].
+ it only exists in Unix-like environments.
-Wed Jun 24 23:45:06 1998 Yukihiro Matsumoto <matz@netlab.co.jp>
+ * test/webrick/test_filehandler.rb
+ (WEBrick::TestFileHandler#test_script_disclosure): ditto.
- * regex.c (re_search): wrong anchor handling for reverse search.
+Wed Nov 16 11:34:20 2011 NAKAMURA Usaku <usa@ruby-lang.org>
-Wed Jun 24 02:18:57 1998 Yukihiro Matsumoto <matz@netlab.co.jp>
+ * io.c (argf_next_argv): wrong timing of setting ecflags.
+ fixed the failure of TestArgf#test_textmode introduced at r33662.
- * parse.y (mlhs): `((a,b)),c = [[1,2]],3' assigns a=1,b=2,c=3.
+Wed Nov 16 10:45:00 2011 NAKAMURA Usaku <usa@ruby-lang.org>
-Tue Jun 23 11:46:16 1998 Yukihiro Matsumoto <matz@netlab.co.jp>
+ * ext/-test-/num2int/num2int.c: remove an unnecessary and wrong decl
+ of rb_stdout. it's declared in ruby.h correctly.
- * parse.y (yylex): `&&=' and `||=' added.
+Wed Nov 16 10:26:41 2011 NAKAMURA Usaku <usa@ruby-lang.org>
-Sat Jun 20 02:53:50 1998 Yukihiro Matsumoto <matz@netlab.co.jp>
+ * bignum.c (rb_big2ull): add a cast to get rid of a VC++ warning.
- * parse.y (assignable): nesting local variables should have higher
- priority than normal local variables for assignment too.
+Wed Nov 16 09:39:27 2011 NARUSE, Yui <naruse@ruby-lang.org>
-Fri Jun 19 18:28:19 1998 Yukihiro Matsumoto <matz@netlab.co.jp>
+ * lib/minitest/unit.rb (assert_raises): experimental fix to run
+ correctly on chkbuild over 64bit linux. call exception_details only
+ when the detail is really needed to avoid create needless inspect
+ under ulimit-ed environment.
- * experimental release 1.1b9_27.
+Wed Nov 16 06:34:30 2011 Tanaka Akira <akr@fsij.org>
-Fri Jun 19 14:34:49 1998 Yukihiro Matsumoto <matz@netlab.co.jp>
+ * test/ruby/test_thread.rb (test_condvar_timed_wait): use
+ assert_operator.
- * eval.c (assign): support hack for nested multiple assignment.
+Tue Nov 15 21:56:25 2011 Tanaka Akira <akr@fsij.org>
- * parse.y (mlhs): nested multiple assignment.
+ * test/ruby/test_sleep.rb (test_sleep_5sec): 0.1sec tolerance is too
+ small for busy environment.
- * eval.c (rb_eval): in-block variables now honors static scope.
+Tue Nov 15 20:08:55 2011 Tanaka Akira <akr@fsij.org>
- * configure.in: RSHIFT check moved to configure.
+ * io.c, thread.c, ext/pty/pty.c, ext/fiddle/closure.c: use
+ __linux__ macro for consistency.
-Thu Jun 18 16:46:04 1998 Yukihiro Matsumoto <matz@netlab.co.jp>
+Tue Nov 15 14:45:15 2011 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
- * experimental release 1.1b9_26.
+ * include/ruby/ruby.h(NUM2LONG, NUM2INT, NUM2SHORT, NUM2LL,
+ INT2NUM, UINT2NUM, LONG2NUM, ULONG2NUM, NUM2CHR): wrap by
+ macros.
-Thu Jun 18 13:37:19 1998 Yukihiro Matsumoto <matz@netlab.co.jp>
+Tue Nov 15 13:38:14 2011 Naohisa Goto <ngotogenome@gmail.com>
- * file.c (file_s_ftype): uses lstat(2) instead of stat(2).
+ * include/ruby/defines.h (FLUSH_REGISTER_WINDOWS): move sparc asm code
+ to a separate file sparc.c for preventing inlining optimization.
+ Patched by Jurij Smakov. [Bug #5244] [ruby-core:40685]
+ * sparc.c (rb_sparc_flush_register_windows): ditto.
+ * configure.in: ditto.
- * dir.c (dir_s_glob): there can be buffer overrun, check added.
+Tue Nov 15 13:11:35 2011 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
- * eval.c (f_binding): handles in-block variables declared after
- binding's generation.
+ * include/ruby/ruby.h: get rid of gcc specific rb_long2int(),
+ NUM2LONG(), NUM2INT(), NUM2SHORT(), NUM2LL(), INT2NUM(),
+ UINT2NUM(), LONG2NUM(), ULONG2NUM() and NUM2CHR()
+ implementation. Because 1) They don't make any better code
+ at all. 2) Inline function have a better debugger supoort.
- * numeric.c (flo_floor): floor, ceil, round added to Float.
+Tue Nov 15 09:58:25 2011 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
-Wed Jun 17 11:20:00 1998 Yukihiro Matsumoto <matz@netlab.co.jp>
+ * test/ruby/test_io.rb (TestIO#test_fcntl_dupfd): fix OpenBSD test
+ failure. [ruby-dev:44872]
- * parse.y (gettable): nesting local variables should have higher
- priority than normal local variables.
+Tue Nov 15 09:50:21 2011 NARUSE, Yui <naruse@ruby-lang.org>
-Tue Jun 16 12:30:46 1998 Yukihiro Matsumoto <matz@netlab.co.jp>
+ * regcomp.c (print_indent_tree): fix double printing of ENCLOSE_OPTION
+ children bug. patched by Suraj Kurapati. [ruby-core:40964]
- * bignum.c (str2inum): handles `+ddd'.
+Tue Nov 15 01:53:48 2011 Ayumu AIZAWA <ayumu.aizawa@gmail.com>
- * struct.c (make_struct): name parameter can be nil for unnamed
- structures.
+ * test/ruby/test_io.rb (test_fcntl_dupfd): fix test error on
+ SnowLeopard. Pointed out by CHIKANAGA Tomoyuki. [ruby-dev:44866]
-Mon Jun 15 16:30:10 1998 Yukihiro Matsumoto <matz@netlab.co.jp>
+Mon Nov 14 22:06:02 2011 Tanaka Akira <akr@fsij.org>
- * object.c (class_s_inherited): prohibiting to make subclass of
- class Class.
+ * ext/openssl/ossl_pkey.c (ossl_pkey_new_from_file): set close-on-exec
+ flag.
- * object.c (module_s_new): support for making subclass of Module.
+ * ext/openssl/ossl_x509cert.c (rb_fd_fix_cloexec): ditto.
- * parse.y (yycompile): clear eval_tree before compiling.
+Mon Nov 14 14:54:17 2011 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
-Fri Jun 12 17:58:18 1998 Yukihiro Matsumoto <matz@netlab.co.jp>
+ * bignum.c (rb_big2ull): fix 32bit platform breakage. we must
+ not assume sizeof(VALUE) == sizeof(LONG_LONG).
+ * test/-ext-/num2int/test_num2int.rb (class TestNum2int):
+ fix false assumption on 32bit platform.
- * eval.c (eval): write back the_dyna_var into the block.
+Mon Nov 14 14:52:54 2011 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
-Thu Jun 11 18:19:18 1998 Yukihiro Matsumoto <matz@netlab.co.jp>
+ * numeric.c (rb_fix2ushort): fix typo. use num rb_num2ushort()
+ instead of num2uint().
- * experimental release 1.1b9_25.
+Sun Nov 13 10:31:03 2011 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
- * eval.c (dvar_add_compiling): register dyna_var at compile time.
+ * include/ruby/ruby.h: add #ifdef comment.
- * regex.c (re_compile_pattern): RE_DUP_MAX iteration is too big.
+Sun Nov 13 10:28:18 2011 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
-Wed Jun 10 15:12:04 1998 Yukihiro Matsumoto <matz@netlab.co.jp>
+ * include/ruby/ruby.h: add NUM2SHORT(), NUM2USHORT() macros.
+ * numeric.c: ditto.
- * io.c (io_eof): do not block other threads.
+ * test/-ext-/num2int/test_num2int.rb: add testcases for NUM2SHORT().
+ * ext/-test-/num2int/num2int.c: ditto.
- * signal.c (trap): reserve SIGALRM for thread.
+Sun Nov 13 10:23:48 2011 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
- * eval.c (thread_create): use ITIMER_REAL also to avoid system
- call blocking.
+ * bignum.c (rb_big2ull): fix off-by-twice bug of NUM2ULL.
+ * test/-ext-/num2int/test_num2int.rb (class TestNum2int):
+ fix a testcase too.
- * io.c (f_syscall): add TRAP_BEG, TRAP_END around system calls.
+Sun Nov 13 10:22:44 2011 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
- * io.c (io_ctl): add TRAP_BEG, TRAP_END around system calls.
+ * test/-ext-/num2int/test_num2int.rb (class TestNum2int):
+ add FIXNUM tests.
- * enum.c (enum_collect): did not collect false values.
+Sun Nov 13 09:57:29 2011 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
- * array.c (ary_new2): forgot to initialize capa field.
+ * numeric.c (check_uint): fix off-by-one bug of NUM2UINT.
+ * bignum.c (rb_big2ulong): fix off-by-one bug of NUM2ULONG.
-Tue Jun 9 18:36:15 1998 WATANABE Hirofumi <watanabe@ase.ptg.sony.co.jp>
+ * test/-ext-/num2int/test_num2int.rb: add a testcase for NUM2INT()
+ NUM2UINT(), NUM2LONG(), NUM2ULONG(), NUM2LL and NUM2ULL().
+ * ext/-test-/num2int/depend: ditto.
+ * ext/-test-/num2int/extconf.rb: ditto.
+ * ext/-test-/num2int/num2int.c: ditto.
- * string.c (str_split_method): split dumped core for "\xff".
+Sun Nov 13 23:47:29 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Tue Jun 9 16:22:12 1998 Yukihiro Matsumoto <matz@netlab.co.jp>
+ * ext/dbm/extconf.rb: use convertible_int.
- * experimental release 1.1b9_24.
+Sun Nov 13 23:45:57 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Tue Jun 9 16:04:07 1998 WATANABE Hirofumi <watanabe@ase.ptg.sony.co.jp>
+ * lib/mkmf.rb (checking_for): should not modify the result.
- * ext/kconv/kconv.c (kconv_guess): more precise decision for EUC,
- using jless algorithm (3 sequential EUC hiragana characters).
+ * lib/mkmf.rb (have_struct_member): accept compiler options.
-Tue Jun 9 15:12:44 1998 Yukihiro Matsumoto <matz@netlab.co.jp>
+ * lib/mkmf.rb (convertible_int): add restricted support of struct
+ member, and TYPEOF_ macro.
- * ext/kconv/kconv.c (kconv_guess): wrong guess for EUC as SJIS in
- some cases (0xe0 - 0xef).
+Sun Nov 13 23:21:24 2011 Tanaka Akira <akr@fsij.org>
- * gc.c (xmalloc): insert size check for big (negative in signed)
- allocation size.
+ * ext/gdbm/gdbm.c (fgdbm_reorganize): set close-on-exec flag after
+ gdbm_reorganize(). gdbm_reorganize() opens a new database internally.
-Tue Jun 9 02:54:51 1998 Yukihiro Matsumoto <matz@netlab.co.jp>
+Sun Nov 13 19:57:18 2011 Tanaka Akira <akr@fsij.org>
- * lib/parsedate.rb: wday moved to the last in the return values.
+ * ext/dbm/extconf.rb: rollback for each headers for each libraries.
-Mon Jun 8 10:40:16 1998 Yukihiro Matsumoto <matz@netlab.co.jp>
+Sun Nov 13 16:24:48 2011 Tanaka Akira <akr@fsij.org>
- * string.c (str_split_method): split dumped core for "\0".
+ * ext/dbm/extconf.rb: treat libc as a choice for a library which
+ provide ndbm API.
-Sat Jun 6 22:50:52 1998 Yukihiro Matsumoto <matz@netlab.co.jp>
+Sun Nov 13 15:40:43 2011 Tanaka Akira <akr@fsij.org>
- * regex.c (calculate_must_string): wrong condition for
- {start,stop}_nowidth.
+ * ext/dbm/extconf.rb: duplicate $libs and $defs when save them.
- * regex.c (re_match): various features imported from GNU regex.c
- 0.12, such as nested grouping, avoiding infinite loop with empty
- match, etc.
+Sun Nov 13 12:43:48 2011 Tanaka Akira <akr@fsij.org>
- * regex.c (register_info_type): now use union.
+ * ext/dbm/extconf.rb: rollback $libs and $defs when db detection is
+ failed. It fixes -lgdbm -lqdbm when the system has qdbm and gdbm
+ without gdbm_compat.
- * regex.c (re_search): more precise anchor(^) check.
+Sat Nov 12 21:14:51 2011 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
-Wed Jun 3 18:07:54 1998 Yukihiro Matsumoto <matz@netlab.co.jp>
+ * test/webrick/test_cgi.rb (class TestWEBrickCGI): respect
+ RbConfig::CONFIG["LIBPATHENV"]. [Bug #5135] [ruby-core:38653]
+ * test/webrick/test_filehandler.rb (class WEBrick): ditto.
- * re.c (reg_raise): check rb_in_compile, not rb_in_eval.
+Sat Nov 12 20:57:29 2011 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
-Mon Jun 1 05:26:06 1998 WATANABE Tetsuya <tetsu@jpn.hp.com>
+ * test/ruby/test_io.rb (test_fcntl_dupfd): skip if Fcntl::DUPFD
+ is not defined. Pointed out by CHIKANAGA Tomoyuki. Thanks.
- * string.c (trnext): casting to signed char* needed.
+Sat Nov 12 17:26:10 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Tue Jun 2 16:00:12 1998 Yukihiro Matsumoto <matz@netlab.co.jp>
+ * io.c (do_ioctl, ioctl_narg_len, setup_narg, rb_ioctl): use
+ ioctl_req_t.
- * ext/socket/socket.c (udp_addrsetup): error check enhanced.
+Sat Nov 12 17:01:49 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * ext/socket/socket.c (sock_s_getservbyaname): use strtoul(), if
- possible.
+ * ext/dbm/extconf.rb (headers.db_check): reduce duplicated code.
-Sat May 30 07:10:02 1998 Yukihiro Matsumoto <matz@netlab.co.jp>
+Sat Nov 12 15:59:42 2011 Tanaka Akira <akr@fsij.org>
- * re.c (reg_prepare_re): no more needless regular expression
- recompile on casefold conditions.
+ * ext/dbm/extconf.rb: dbm_clearerr should be available in all ndbm
+ implementation. If it is not available, it is caused by
+ header/library mismatch such that Berkeley DB header & gdbm library.
-Thu May 28 18:02:55 1998 Yukihiro Matsumoto <matz@netlab.co.jp>
+ * ext/dbm/dbm.c (fdbm_store): use dbm_clearerr() unconditionally.
+ gdbm 1.9 provides it as a real function instead of a empty macro.
- * object.c (nil_plus): no more `+' method for nil.
+Sat Nov 12 13:35:33 2011 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
-Wed May 27 17:33:46 1998 Yukihiro Matsumoto <matz@netlab.co.jp>
+ * bootstraptest/runner.rb: don't suppress SIGINT.
+ [Feature #5612] [ruby-dev:44856]
- * hash.c (hash_fetch): new method.
+Sat Nov 12 11:20:36 2011 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
- * regex.c (re_search): check whether translate table is set.
+ * io.c (fcntl_narg_len): introduce narg calculation for fcntl instead
+ of hard coded 256.
+ * io.c (setup_narg): ditto.
-Tue May 26 11:39:50 1998 Yukihiro Matsumoto <matz@netlab.co.jp>
+Sat Nov 12 11:19:35 2011 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
- * experimental release 1.1b9_23.
+ * test/ruby/test_io.rb (test_fcntl_dupfd): add another fcntl test.
- * parse.y (yylex): no UPLUS/UMINUS for 1st argument if
- parenthesises are omitted.
+Sat Nov 12 11:18:17 2011 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
-Tue May 26 01:09:55 1998 Yukihiro Matsumoto <matz@netlab.co.jp>
+ * test/ruby/test_io.rb (test_fcntl_lock_freebsd): add a testcase
+ of fcntl lock for freebsd.
- * regex.c (re_compile_pattern): (?XI) for turns off the
- corresponding option.
+Sat Nov 12 11:16:32 2011 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
-Mon May 25 12:38:56 1998 Yukihiro Matsumoto <matz@netlab.co.jp>
+ * io.c (ioctl_narg_len): Linux doesn't have IOCPARM_LEN macro, but
+ has _IOC_SIZE. support it.
- * regex.c (re_compile_pattern): inline i option (?i).
+Sat Nov 12 11:13:18 2011 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
- * regex.c (re_compile_pattern): inline x option (?x).
+ * io.c (rb_ioctl): don't expose our sanity check value to ruby script.
+ It may change string value meaning if the value is string.
+ (e.g. MacOS X has F_GETPATH ioctl)
+ * io.c (rb_fcntl): ditto.
- * regex.c (re_compile_pattern): x option for regexp.
+Sat Nov 12 11:06:02 2011 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
- * dir.c (dir_s_open): returns block's evaluated value.
+ * io.c (ioctl_req_t): Type of req argument of ioctl() depend on platform.
+ Moreover almost all linux ioctl can't be represented by 32bit integer
+ (i.e. MSB is 1). We need wrap ioctl argument type.
+ [Bug #5429] [ruby-dev:44589]
+ * io.c (struct ioctl_arg): ditto.
+ * io.c (rb_ioctl): ditto.
+ * test/ruby/test_io.rb (test_ioctl_linux): add a testcase for ioctl
- * io.c (f_open): returns block's evaluated value.
+Sat Nov 12 11:00:42 2011 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
- * ext/curses/curses.c (curses_addstr): nil argument caused SEGV.
+ * io.c (struct io_cntl_arg): remove io_p member.
+ * io.c (nogvl_fcntl, do_fcntl, rb_fcntl): separated from ioctl functions.
+ * io.c (nogvl_io_cntl): remove fcntl depended logic.
+ * io.c (io_cntl): ditto.
+ * io.c (rb_io_ctl): ditto.
+ * io.c (rb_io_ioctl): ditto.
-Fri May 22 11:52:45 1998 Yukihiro Matsumoto <matz@netlab.co.jp>
+Sat Nov 12 10:59:49 2011 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
- * regex.c (re_compile_pattern): push mark on (?:), so that
- laststart check for {a,b} can be done.
+ * io.c (setup_narg): fix off by one bug.
-Thu May 21 17:31:16 1998 Yukihiro Matsumoto <matz@netlab.co.jp>
+Sat Nov 12 10:56:43 2011 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
- * regex.c (re_match): wrong match (too non-greedy) for `{a,b}?'.
+ * io.c (+setup_narg): factor out length calculation logic.
+ * io.c (rb_io_ctl): ditto.
- * io.c (io_lineno): new method IO#lineno, IO#lineno=.
+Sat Nov 12 10:52:17 2011 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
-Wed May 20 06:04:43 1998 MAEDA shugo <shugo@aianet.ne.jp>
+ * io.c (+ioctl_narg_len) new helper function.
+ * io.c (rb_io_ctl): don't use ioctl specific length check
+ if caller is fcntl.
- * BeOS patch.
+Fri Nov 11 23:00:46 2011 Tanaka Akira <akr@fsij.org>
-Wed May 20 16:32:19 1998 Yukihiro Matsumoto <matz@netlab.co.jp>
+ * ext/dbm/extconf.rb: db_prefix is not required now.
- * bignum.c (BIGDN): use RSHIFT(), instead of mere `>>'.
+Fri Nov 11 21:13:30 2011 Tanaka Akira <akr@fsij.org>
-Tue May 19 16:36:26 1998 Yukihiro Matsumoto <matz@netlab.co.jp>
+ * ext/gdbm/gdbm.c (fgdbm_initialize): use GDBM_CLOEXEC if available.
- * experimental release 1.1b9_22.
+Fri Nov 11 21:00:05 2011 Tanaka Akira <akr@fsij.org>
-Tue May 19 16:31:57 1998 Yukihiro Matsumoto <matz@netlab.co.jp>
+ * ext/dbm/extconf.rb: fix dbm_pagfno and dbm_dirfno detection with
+ Berkeley DB. Macro definitions needs arguments to detect correctly.
+ SIZEOF_DSIZE needs -DDB_DBM_HSEARCH because db.h defines datum type
+ only if DB_DBM_HSEARCH is defined.
- * parse.y (assignable): specification changed for in-block
- variable definition.
+Fri Nov 11 18:41:57 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * eval.c (dyna_var_asgn): error in in-block variables' compile
- time definition.
+ * process.c (proc_seteuid): separate an internal wrapper function
+ from the method implementation.
- * parse.y (str_extend): wrong nesting detection.
+Fri Nov 11 17:21:15 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Tue May 19 09:47:55 1998 WATANABE Hirofumi <watanabe@ase.ptg.sony.co.jp>
+ * lib/mkmf.rb (have_library, find_library, have_func): allow
+ arguments of function to be checked.
- * numeric.c (num2int): re-defined (extensions may use this).
+Fri Nov 11 17:09:45 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Mon May 18 16:40:50 1998 MAEDA shugo <shugo@aianet.ne.jp>
+ * vm_dump.c (HAVE_BACKTRACE): fallback to 0.
- * error.c (get_syserr): BeOS support.
+ * vm_dump.c (rb_vm_bugreport): show "Other runtime information"
+ header only when available.
- * configure.in: modified for BeOS.
+ * vm_dump.c (rb_vm_bugreport): get rid of modifying the content of
+ VM directly.
- * string.c (str_dump): do not call isascii().
+ * vm_dump.c (rb_vm_bugreport): check if vm is non-null.
+ Pointed out by Ikegami Daisuke <ikegami.da@gmail.com>.
+ Thank you.
- * sprintf.c (remove_sign_bits): forgot to initialize end pointer.
+Fri Nov 11 12:36:37 2011 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
- * glob.c: #include <alloca.h> added.
+ * io.c (pipe_open): Remove fflush(stdin). it's no effect.
+ Pointed out by Ikegami Daisuke <ikegami.da@gmail.com>.
+ Thank you.
-Mon May 18 14:52:21 1998 Yukihiro Matsumoto <matz@netlab.co.jp>
-
- * experimental release 1.1b9_21.
+Fri Nov 11 07:33:30 2011 Eric Hodel <drbrain@segment7.net>
-Mon May 18 03:27:57 1998 MAEDA shugo <shugo@aianet.ne.jp>
+ * lib/net/http.rb (Net::HTTP::SSL_ATTRIBUTES): Use symbol keys instead
+ of string keys to avoid duplicating parameters in
+ OpenSSL::SSL:SSLContext#set_params.
- * file.c (file_s_expand_path): optional second argument
- `default_directory' added.
+Thu Nov 10 15:02:37 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Sat May 16 22:06:52 1998 WATANABE Hirofumi <watanabe@ase.ptg.sony.co.jp>
+ * lib/mkmf.rb (have_library, have_func, have_var, have_header):
+ add compiler option parameter.
- * error.c (RAISE_ERROR): wrong error message
+Thu Nov 10 07:45:16 2011 Eric Hodel <drbrain@segment7.net>
-Fri May 15 14:43:25 1998 Yukihiro Matsumoto <matz@netlab.co.jp>
+ * ext/openssl/lib/openssl/ssl.rb (class OpenSSL::SSL::SSLContext):
+ Document #set_params.
- * experimental release 1.1b9_20.
+Wed Nov 9 11:36:53 2011 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
-Thu May 14 14:44:21 1998 WATANABE Hirofumi <watanabe@ase.ptg.sony.co.jp>
+ * thread_pthread.c (gvl_yield): don't prevent concurrent sched_yield().
+ [Bug #5130] [ruby-core:38647]
- * sun4 cc patches for intern.h and regex.h.
+Wed Nov 9 23:20:22 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Thu May 14 14:03:16 1998 Yukihiro Matsumoto <matz@netlab.co.jp>
+ * io.c (rb_update_max_fd): fstat(2) can fail with other than
+ EBADF. [ruby-dev:44837] [Bug #5593]. Cf.
+ http://pubs.opengroup.org/onlinepubs/9699919799/functions/fstat.html
- * random.c (RANDOM_MAX): guessing proper maximum value for random
- numbers.
+ * io.c (rb_sysopen): max fd is updated in rb_sysopen_internal()
+ already.
- * random.c (f_rand): use drand48 if possible.
+Wed Nov 9 22:13:38 2011 NAKAMURA Usaku <usa@ruby-lang.org>
-Wed May 13 19:05:20 1998 MAEDA shugo <shugo@aianet.ne.jp>
+ * test/ruby/test_file.rb (TestFile#test_utime_with_minus_time_segv):
+ fixed previous commit.
- * BeOS patches for io.c, error.c and config.guess.
+Wed Nov 9 19:53:45 2011 NAKAMURA Usaku <usa@ruby-lang.org>
-Wed May 13 14:56:23 1998 Yukihiro Matsumoto <matz@netlab.co.jp>
+ * test/ruby/test_file.rb (TestFile#test_utime_with_minus_time_segv):
+ add test for r33685.
- * experimental release 1.1b9_19.
+Wed Nov 9 19:00:44 2011 Koichi Sasada <ko1@atdot.net>
- * most of the Mac and BeOS patches merged, except path separators.
+ * test/ruby/test_fiber.rb: add tests for r33684 (Fiber#resume).
- * error.c (err_append): generated SyntaxError was String.
+Wed Nov 9 16:40:49 2011 NAKAMURA Usaku <usa@ruby-lang.org>
- * ruby.h: xxx2INT, xxx2UINT checks values as int, not long.
+ * win32/win32.c (unixtime_to_filetime): should check the return value
+ of localtime(). reported by snowjail at gmail.com.
+ [ruby-dev:44838] [Bug #5596]
- * ruby.h: remove typedef's. INT, UINT, UCHAR, USHORT.
+Thu Nov 9 13:17:25 2011 Koichi Sasada <ko1@atdot.net>
-Tue May 12 17:38:00 1998 Yukihiro Matsumoto <matz@netlab.co.jp>
+ * cont.c (rb_fiber_m_transfer, rb_fiber_resume): prohibit using
+ "resume" after "transfer" method are used. You should not mix
+ "resume" fiber and "transfer" fiber.
+ [Bug #5526]
- * experimental release 1.1b9_18.
+ * NEWS: add information about this change.
-Tue May 12 11:38:08 1998 Yukihiro Matsumoto <matz@netlab.co.jp>
+Wed Nov 9 11:40:37 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * error.c (syserr_errno): returns errno of the SystemCallError.
+ * template/Doxyfile.tmpl (INCLUDE_PATH): add srcdir and include.
+ [ruby-core:40843] [Bug #5597]
- * error.c (rb_sys_fail): saves errno in the Exception.
+Wed Nov 9 11:02:54 2011 NARUSE, Yui <naruse@ruby-lang.org>
- * error.c (set_syserr): no need to protect syserr_list.
+ * thread.c (do_select): fix cast, tv_sec is time_t.
- * error.c (rb_sys_fail): no more bufsize limit.
+Wed Nov 9 10:32:20 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * error.c (set_syserr): integer value of errno can be accessed by
- Errno::EXXX::Errno.
+ * configure.in: should not use test -e for portability.
+ [ruby-core:40841] [Bug #5594]
-Sun May 10 03:10:33 1998 WATANABE Tetsuya <tetsu@jpn.hp.com>
+Wed Nov 9 04:52:16 2011 Aaron Patterson <aaron@tenderlovemaking.com>
- * io.c (io_tell etc.): moved from File class to IO class.
+ * ext/psych/lib/psych/tree_builder.rb: dump complex numbers,
+ rationals, etc with reference ids.
+ * ext/psych/lib/psych/visitors/yaml_tree.rb: ditto
+ * ext/psych/lib/psych/visitors/to_ruby.rb: loading complex numbers,
+ rationals, etc with reference ids.
+ * test/psych/test_object_references.rb: corresponding tests
-Fri May 8 12:26:37 1998 Yukihiro Matsumoto <matz@netlab.co.jp>
+Tue Nov 8 23:34:37 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * pack.c (pack_unpack): should be unsigned int (was signed int).
+ * ext/dbm/dbm.c (fdbm_fetch, fdbm_key, fdbm_delete, fdbm_store)
+ (fdbm_has_key, fdbm_has_value): get rid of overflow.
-Thu May 7 16:34:10 1998 Yukihiro Matsumoto <matz@netlab.co.jp>
+ * ext/gdbm/gdbm.c (rb_gdbm_fetch2, rb_gdbm_nextkey)
+ (rb_gdbm_delete, fgdbm_store, fgdbm_has_key): ditto.
- * pack.c (pack_pack): `V', `N' uses newly created NUM2UINT().
+ * ext/dbm/dbm.c (fdbm_delete_if): hide intermediate objects.
- * ruby.h (NUM2UINT): new macro.
+ * ext/gdbm/gdbm.c (fgdbm_delete_if): ditto.
- * bignum.c (big2uint): try to convert bignum into UINT.
+ * ext/dbm/extconf.rb: check size of datum.dsize to get rid of
+ overflow.
- * re.c (reg_match): needed to return false for match with nil.
+Tue Nov 8 23:30:21 2011 NARUSE, Yui <naruse@ruby-lang.org>
- * gc.c (obj_free): wrong condition to free string.
+ * addr2line.c (PATH_MAX): define if not defined. [ruby-core:40840]
-Wed May 6 21:08:08 1998 WATANABE Hirofumi <watanabe@ase.ptg.sony.co.jp>
+Tue Nov 8 23:26:49 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * ruby.c (ruby_process_options): modified for DJGPP.
+ * ext/tk/tcltklib.c (rb_thread_critical): fix type.
-Wed May 6 15:48:03 1998 Yukihiro Matsumoto <matz@netlab.co.jp>
+ * ext/tk/tcltklib.c (eventloop_sleep, lib_eventloop_core): int is
+ enough for micro seconds. may need to check overflow in the
+ setter though.
- * experimental release 1.1b9_17.
+ * ext/tk/tcltklib.c (RSTRING_LENINT): check overflow if necessary.
-Wed May 6 01:37:39 1998 Yukihiro Matsumoto <matz@netlab.co.jp>
+ * ext/tk/tcltklib.c (RbTk_ALLOC_N): wrapper for ckalloc() which
+ takes an int.
- * eval.c: remove global variable `errat'.
+ * ext/tk/tcltklib.c (ip_ruby_cmd_receiver_get, tcltklib_compile_info):
+ get rid overflow.
- * eval.c (rb_longjmp): embed error position information in the
- exception object.
+ * ext/tk/tcltklib.c (tcltklib_compile_info): constified.
-Sat May 2 12:20:02 1998 Yukihiro Matsumoto <matz@netlab.co.jp>
+Tue Nov 8 20:50:45 2011 Tanaka Akira <akr@fsij.org>
- * re.c (reg_search): supports reverse search.
+ * test/dbm/test_dbm.rb: split tests for read only database.
- * string.c (str_index_method): does update $~ etc.
+ * test/gdbm/test_gdbm.rb: ditto.
- * eval.c (f_load): needed to clear the_dyna_vars.
+Tue Nov 8 18:59:07 2011 Tanaka Akira <akr@fsij.org>
- * eval.c (dyna_var_asgn): do not push dyna_var, which is id == 0.
+ * ext/pty/pty.c (MasterDevice): define only when used.
+ (SlaveDevice): ditto.
+ (deviceNo): ditto.
- * error.c (Init_Exception): NotImplementError is no longer
- StandardError, which is not handled by default rescue.
+Tue Nov 8 17:59:24 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Fri May 1 00:35:51 1998 Yukihiro Matsumoto <matz@netlab.co.jp>
+ * include/ruby/ruby.h (rb_long2int): define as a macro always, so
+ that cpp conditionals can tell if it is provided.
- * ruby.c (proc_options): `-d' turns on verbose flag too.
+Tue Nov 8 17:30:50 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * error.c (exception): last argument may be the superclass of the
- defining exception(s).
+ * lib/mkmf.rb (cpp_command): remove multiple -arch flags since cpp
+ cannot work.
- * io.c (Init_IO): EOFError is now subclass of the IOError.
+Tue Nov 8 14:50:55 2011 NAKAMURA Usaku <usa@ruby-lang.org>
- * io.c (Init_IO): forgot to define IOError.
+ * io.c (io_fwrite): call rb_w32_write_console() only if FMODE_TTY is
+ set. this is the one of the reason of IO writing slowness of Windows
+ in 1.9.3 or later.
- * error.c (Init_Exception): old Exception class renamed to
- StandardError. Exception now replaces old GlobalExit.
+Tue Nov 8 11:01:04 2011 NARUSE, Yui <naruse@ruby-lang.org>
- * error.c (Init_Exception): Exception is now the root of the
- Global Exits. There's no longer GlobalExit class.
+ * ext/pty/pty.c (get_device_once): FreeBSD 8 supported O_CLOEXEC flag
+ for posix_openpt, but FreeBSD 9's posix_openpt doesn't support
+ O_CLOEXEC and fails if specified.
- * util.c (ruby_mktemp): check TMP, TMPDIR first.
+Tue Nov 8 02:36:45 2011 NAKAMURA Usaku <usa@ruby-lang.org>
-Thu Apr 30 01:08:35 1998 Yukihiro Matsumoto <matz@netlab.co.jp>
+ * include/ruby/encoding.h (ECONV_NEWLINE_DECORATOR_READ_MASK,
+ ECONV_NEWLINE_DECORATOR_WRITE_MASK): new macro.
- * lib/tk.rb: call 'unknown', if proc not defined.
+ * io.c (rb_io_extract_modeenc, pipe_open, prep_stdio, argf_next_argv):
+ set TEXTMODE_NEWLINE_DECORATOR_ON_WRITE for textmode on creating IO
+ if the flag is available.
- * eval.c (handle_rescue): default rescue handles `Exceptional' not
- only the instance of the `Exception's.
+ * io.c (make_writeconv): drop decorators for reading.
- * eval.c (f_raise): exception can be any object.
+ * io.c (make_readconv): drop decorators for writing.
- * time.c (time_gm_or_local): call time_gmtime or time_localtime.
+ * io.c (do_writeconv): existing writeconv is not the condition to raise
+ ArgumentError. should check textmode or not.
- * eval.c (f_raise): raises TypeError if the class which is not a
- subclass of String is specified (checked in exc_new()).
+ * test/ruby/test_io_m17n.rb
+ (TestIO_M17N#test_{cr,lf,crlf}_decorator_on_stdout): test above
+ changes.
- * error.c (exc_new): need to check whether invalid class (not a
- subclass of String) is specified.
+Mon Nov 7 22:03:47 2011 Tanaka Akira <akr@fsij.org>
-Wed Apr 29 21:05:44 1998 WATANABE Hirofumi <eban@os.rim.or.jp>
+ * ext/gdbm/gdbm.c (fgdbm_initialize): set close-on-exec flag.
- * ruby.c (proc_options): option '-e' via tempfile.
+Mon Nov 7 20:31:52 2011 Aaron Patterson <aaron@tenderlovemaking.com>
-Tue Apr 28 15:27:58 1998 Yukihiro Matsumoto <matz@netlab.co.jp>
+ * ext/psych/lib/psych/scalar_scanner.rb: make sure strings that look
+ like base 60 numbers are serialized as quoted strings.
+ * test/psych/test_string.rb: test for change.
- * experimental release 1.1b9_16.
+Mon Nov 7 20:26:37 2011 Aaron Patterson <aaron@tenderlovemaking.com>
-Tue Apr 28 00:07:38 1998 Yukihiro Matsumoto <matz@netlab.co.jp>
+ * test/psych/test_yamlstore.rb: make test case inherit from MiniTest,
+ load psych/helper so that psych is loaded.
- * eval.c (obj_is_proc): type check predicate.
+Mon Nov 7 20:18:29 2011 Aaron Patterson <aaron@tenderlovemaking.com>
- * eval.c (obj_is_block): ditto.
+ * test/psych/test_yamldbm.rb: Test case should inherit from MiniTest,
+ load psych/helper so that psych and friends are loaded.
-Mon Apr 27 16:59:17 1998 Yukihiro Matsumoto <matz@netlab.co.jp>
+Mon Nov 7 20:15:44 2011 Tanaka Akira <akr@fsij.org>
- * ext/gtk/gtk.c (Init_gtk): use timeout, not idle to avoid
- consuming CPU too much.
+ * ext/dbm/extconf.rb: check dbm_pagfno() and dbm_dirfno().
- * lib/tk.rb: use tcltklib#_invoke instead of `_eval'.
+ * ext/dbm/dbm.c: use above to set close-on-exec flag.
-Mon Apr 27 16:59:17 1998 Yukihiro Matsumoto <matz@netlab.co.jp>
+Mon Nov 7 20:05:16 2011 NAKAMURA Usaku <usa@ruby-lang.org>
- * array.c (ary_sort): use dup, not clone.
+ * io.c (io_fflush): remove fsync().
-Mon Apr 27 13:46:27 1998 Tadahiro Maebashi <maebashi@iij.ad.jp>
+ * io.c (rb_io_flush, rb_io_rewind): fsync() here.
- * ext/tcltklib/tcltklib.c (ip_invoke): invoke tcl command
- directly. need not worry about escaping tcl characters.
+ these changes reduces fsync() calls to improve performance.
+ first reported at [ruby-list:48515] by ak7 at mail.goo.ne.jp .
+ [Bug #5585]
-Mon Apr 27 12:04:43 1998 Yukihiro Matsumoto <matz@netlab.co.jp>
+Mon Nov 7 19:43:10 2011 Tanaka Akira <akr@fsij.org>
- * random.c (f_rand): do not call srand() implicitly.
+ * io.c (rb_close_before_exec): use F_MAXFD if available.
+ F_MAXFD is available on NetBSD since NetBSD 2.0.
-Fri Apr 24 14:35:45 1998 Yukihiro Matsumoto <matz@netlab.co.jp>
+Mon Nov 7 19:25:16 2011 NAKAMURA Usaku <usa@ruby-lang.org>
- * experimental release 1.1b9_15.
+ * test/ruby/test_io_m17n.rb
+ (TestIO_M17N#test_default_stdout_stderr_mode): new test for
+ r33627-33629. see [backport #5565]
- * parse.y (assignable): dyna_var_asgn actually defines nested
- local variables in outer context.
+Mon Nov 7 01:14:22 2011 Ayumu AIZAWA <ayumu.aizawa@gmail.com>
- * random.c (f_rand): call srand(), if it has not called yet.
+ * lib/debug.rb: add help for 'pp' and 'r[estart]'. patch
+ from Sho Hashimoto. [Bug #5093] [ruby-dev:44222]
- * random.c (f_srand): use tv_usec as the default seed.
+Sun Nov 6 14:49:58 2011 Tanaka Akira <akr@fsij.org>
- * eval.c (rb_eval): values of nested local variables should be
- independent.
+ * ext/socket/rubysocket.h (rsock_recvmsg): declared.
- * eval.c (rb_yield_0): local variables wrong nested conditions.
+ * ext/socket/ancdata.c (rsock_recvmsg): extracted from
+ nogvl_recvmsg_func.
+ (nogvl_recvmsg_func): use rsock_recvmsg.
-Wed Apr 22 23:27:17 1998 Yukihiro Matsumoto <matz@netlab.co.jp>
+ * ext/socket/unixsocket.c (recvmsg_blocking): use rsock_recvmsg.
- * io.c (select_get_io): get IO object by `to_io'.
+Sun Nov 6 03:22:36 2011 Martin Bosslet <Martin.Bosslet@googlemail.com>
- * io.c (io_to_io): method to retrieve IO object, from delegating
- object for example.
+ * test/openssl/test_engine.rb: add test for engine cipher. RC4 is used
+ because AES is not supported by the "openssl" engine currently.
-Wed Apr 22 16:52:37 1998 Yukihiro Matsumoto <matz@netlab.co.jp>
+Sun Nov 6 00:11:52 2011 Tanaka Akira <akr@fsij.org>
- * experimental release 1.1b9_14.
+ * lib/test/unit.rb (Test::Unit::Options#non_options): options[:ruby]
+ should be an array. This fixes
+ "./ruby test/runner.rb test/testunit/test_parallel.rb"
+ [ruby-dev:44782]
- * string.c (str_modify): check for embedded pointer reference.
+Sat Nov 5 20:30:30 2011 Martin Duerst <duerst@it.aoyama.ac.jp>
- * gc.c (obj_free): ditto.
+ * insns.def: Some fixes and tweaks to English explanations
- * pack.c (pack_pack): p/P template to embed pointers.
+Sat Nov 5 19:11:50 2011 Tanaka Akira <akr@fsij.org>
-Wed Apr 22 00:07:10 1998 Tadayoshi Funaba <tadf@kt.rim.or.jp>
+ * io.c (rb_cloexec_fcntl_dupfd): don't clear try_dupfd_cloexec if
+ fcntl(F_DUPFD) failed as fcntl(F_DUPFD_CLOEXEC).
- * array.c (ary_rindex): embarrassing typo.
+Sat Nov 5 18:05:12 2011 Tanaka Akira <akr@fsij.org>
-Tue Apr 21 12:31:48 1998 Yukihiro Matsumoto <matz@netlab.co.jp>
+ * ext/socket/socket.c (rsock_socketpair0): refactored.
- * experimental release 1.1b9_13.
+Sat Nov 5 17:55:52 2011 Tanaka Akira <akr@fsij.org>
- * configure.in (RUBY_LIB): supports --program-{prefix,suffix}.
+ * ext/socket/init.c (rsock_socket0): don't clear try_sock_cloexec if
+ SOCK_CLOEXEC is not a reason for EINVAL.
- * array.c (ary_rindex): new method.
+Sat Nov 5 16:27:52 2011 Kazuki Tsujimoto <kazuki@callcc.net>
- * io.c (io_binmode): should return self.
+ * ext/pathname/lib/pathname.rb, ext/tk/lib/multi-tk.rb,
+ ext/tk/sample/demos-en/widget, lib/benchmark.rb, lib/irb/cmd/fork.rb,
+ lib/mkmf.rb, lib/net/ftp.rb, lib/net/smtp.rb, lib/open3.rb,
+ lib/pstore.rb, lib/rexml/element.rb, lib/rexml/light/node.rb,
+ lib/rinda/tuplespace.rb, lib/rss/maker/base.rb,
+ lib/rss/maker/entry.rb, lib/scanf.rb, lib/set.rb, lib/shell.rb,
+ lib/shell/command-processor.rb, lib/shell/process-controller.rb,
+ lib/shell/system-command.rb, lib/uri/common.rb: remove unused block
+ arguments to avoid creating Proc objects.
-Tue Apr 21 08:23:04 1998 Tadayoshi Funaba <tadf@kt.rim.or.jp>
+Sat Nov 5 15:45:04 2011 Tanaka Akira <akr@fsij.org>
- * parse.y (here_document): calling parse_string with wrong
- arguments.
+ * ext/socket/init.c (rsock_socket0): extract single socket() call with
+ CLOEXEC handling from rsock_socket.
- * struct.c (struct_aset): problem member assignment with name.
+Sat Nov 5 13:49:40 2011 Kazuki Tsujimoto <kazuki@callcc.net>
-Mon Apr 20 14:47:49 1998 Yukihiro Matsumoto <matz@netlab.co.jp>
+ * lib/pathname.rb (Pathname#find): return an enumerator if
+ no block is given.
- * experimental release 1.1b9_12.
+ * test/pathname/test_pathname.rb: add tests for above.
- * time.c (time_arg): args may be string (support for reduced
- implicit type conversion).
+ [ruby-dev:44797] [Feature #5572]
- * lib/base64.rb: changed to use pack/unpack with `m' template.
+Sat Nov 5 11:18:12 2011 Tanaka Akira <akr@fsij.org>
-Mon Apr 20 06:23:20 1998 Yukihiro Matsumoto <matz@netlab.co.jp>
+ * ext/socket/socket.c (rsock_socketpair0): don't clear
+ try_sock_cloexec if SOCK_CLOEXEC is not a reason for EINVAL.
- * variable.c (mod_remove_const): new method.
+Fri Nov 4 14:08:19 2011 Hiroshi Nakamura <nahi@ruby-lang.org>
-Sat Apr 18 03:53:27 1998 Yukihiro Matsumoto <matz@netlab.co.jp>
+ * ext/openssl/ossl_pkey_rsa.c (rsa_generate): [SECURITY] Set RSA
+ exponent value correctly. Awful bug. This bug caused exponent of
+ generated key to be always '1'. By default, and regardless of e
+ given as a parameter.
- * hash.c (hash_each_with_index): removed. use Enumerable's
- each_with_index instead.
+ !!! Keys generated by this code (trunk after 2011-09-01) must be
+ re-generated !!! (ruby_1_9_3 is safe)
- * class.c (rb_include_module): check for super modules, since
- module's included modules may be changed.
+ * test/openssl/test_pkey_rsa.rb: Add tests for default exponent and
+ specifying exponent by a parameter.
-Fri Apr 17 21:50:47 1998 WATANABE Hirofumi <watanabe@ase.ptg.sony.co.jp>
+Fri Nov 4 01:31:25 2011 Martin Bosslet <Martin.Bosslet@googlemail.com>
- * marshal.c (r_long): r_byte() may return signed byte.
+ * test/openssl/test_engine.rb: add first tests for builtin "openssl"
+ engine.
-Fri Apr 17 11:58:30 1998 NAGAI Hidetoshi <nagai@dumbo.ai.kyutech.ac.jp>
+Fri Nov 4 08:41:26 2011 Martin Bosslet <Martin.Bosslet@googlemail.com>
- * ext/tcltklib/tcltklib.c (lib_mainloop): thread and interrupt check.
+ * ext/openssl/extconf.rb:
+ * ext/openssl/ossl_engine.c: add some missing OpenSSL engines.
+ Thanks, Yui Naruse, for providing the patch!
+ [Bug #5548] [ruby-core:40670]
-Fri Apr 17 11:06:30 1998 Yukihiro Matsumoto <matz@netlab.co.jp>
+Fri Nov 4 04:54:10 2011 NAKAMURA Usaku <usa@ruby-lang.org>
- * eval.c (find_file): try to fopen() to check whether file exists.
+ * win32/configure.bat: disable delayed expansion of enironment variable.
+ [Bug #5517] [ruby-core:40531]
- * ruby.c (load_file): ditto.
+Fri Nov 4 03:45:22 2011 NAKAMURA Usaku <usa@ruby-lang.org>
- * struct.c (struct_aset): struct member can be set by member name.
+ * io.c (make_writeconv): fixed typo of previous commit.
-Fri Apr 17 00:47:19 1998 WATANABE Hirofumi <watanabe@ase.ptg.sony.co.jp>
+Fri Nov 4 01:56:30 2011 NAKAMURA Usaku <usa@ruby-lang.org>
- * ext/extmk.rb.in: added m68k-human support
+ * io.c (make_writeconv): unversal_newline converter is for reading.
+ so, if the io is text mode and has ECONV_UNIVERSAL_NEWLINE_DECORATOR
+ flag, use crlf_newline converter for writing.
+ this change fixes the problem about the luck of CR up Kernel.p and
+ Kernel.puts to stdout/stderr on Windows.
- * file.c (LOCK_SH): defines moved.
+Fri Nov 4 01:04:48 2011 NARUSE, Yui <naruse@ruby-lang.org>
- * array.c (ary_flatten_bang): simplified loop.
+ * ext/readline/readline.c (Init_readline): like r18313, libedit's
+ replace_history_entry may use offset instead of which.
+ so introduce history_replace_offset_func and initialize it.
-Thu Apr 16 16:52:01 1998 Yukihiro Matsumoto <matz@netlab.co.jp>
+ * ext/readline/readline.c (hist_set): use history_replace_offset_func.
- * experimental release 1.1b9_11.
+Fri Nov 4 00:53:35 2011 NARUSE, Yui <naruse@ruby-lang.org>
- * lib/tk.rb: thread support (experimental - maybe slow).
+ * ext/readline/readline.c (Init_readline): fix wrong condition.
- * eval.c (rb_longjmp): trace event on exception in raising
- context, just before raising exception.
+Thu Nov 3 23:53:04 2011 NAKAMURA Usaku <usa@ruby-lang.org>
- * struct.c (struct_s_members): forgot to check singletons.
+ * encoding.c (rb_locale_charmap): ignore calling nl_langinfo_codeset()
+ on Windows except cygwin. [experimental]
- * struct.c (struct_aref): members can be accessed by names too.
+Thu Nov 3 22:45:09 2011 Tanaka Akira <akr@fsij.org>
- * array.c (ary_flatten): new method.
+ * ext/socket/socket.c (rsock_socketpair0): extracted from
+ rsock_socketpair to set close-on-exec flag for each socketpair()
+ call.
- * eval.c (rb_longjmp): prints exception information with `-d'.
+Thu Nov 3 22:12:41 2011 CHIKANAGA Tomoyuki <nagachika00@gmail.com>
- * object.c (any_to_s): remove class name restriction.
+ * ext/socket/init.c (rsock_socket): set close-on-exec flag when
+ SOCK_CLOEXEC is not available.
-Thu Apr 16 01:38:02 1998 Yukihiro Matsumoto <matz@netlab.co.jp>
+Thu Nov 3 08:36:00 2011 Martin Bosslet <Martin.Bosslet@googlemail.com>
- * file.c (thread_flock): do not block other threads.
+ * test/openssl/test_engine.rb: call Engine::cleanup on exit.
+ Patch provided by Yui Naruse, thanks!
+ [Bug #5547] [ruby-core:40669]
- * eval.c (thread_trap_eval): signals are now delivered to the
- current thread again. In case that the current thread is dead,
- signals are forwarded to the main thread.
+Wed Nov 2 21:36:00 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * string.c (str_new4): need not to duplicate frozen strings.
+ * complex.c (nucomp_rationalize): fix function. [ruby-core:40667]
+ [Bug #5546]
-Wed Apr 15 08:33:47 1998 Tadayoshi Funaba <tadf@kt.rim.or.jp>
+Wed Nov 2 08:16:45 2011 Tanaka Akira <akr@fsij.org>
- * struct.c (struct_inspect): remove restriction for struct names.
+ * lib/webrick/utils.rb: fix fcntl call.
-Wed Apr 15 02:55:02 1998 Kazuya 'Sharl' Masuda <sharl@www.ufo.co.jp>
+ * lib/drb/unix.rb: ditto.
- * x68 patches to config.sub, ext/extmk.rb.in
+Wed Nov 2 00:43:59 2011 Ayumu AIZAWA <ayumu.aizawa@gmail.com>
-Wed Apr 15 01:22:56 1998 Yukihiro Matsumoto <matz@netlab.co.jp>
+ * test/psych/test_yamldbm.rb: avoid platform dependency.
+ patch by Naohisa Goto. [ruby-dev:44763] [Bug #5535]
+ * test/syck/test_yamldbm.rb: ditto.
- * string.c (str_dup_frozen): do not duplicate frozen strings.
+Wed Nov 2 00:14:15 2011 Shugo Maeda <shugo@ruby-lang.org>
- * parse.y (yylex): allow nested parenthesises.
+ * test/ruby/test_marshal.rb: renamed methods duplicated with those
+ of marshaltestlib.rb.
- * io.c (obj_displayln): prints newline after `display'ing the
- receiver.
+Tue Nov 1 22:08:27 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * io.c (io_puts): avoid generating "\n" each time. use RS_default
- instead.
+ * configure.in: reject llvm-gcc.
- * io.c (f_p): ditto.
+Tue Nov 1 21:39:00 2011 NARUSE, Yui <naruse@ruby-lang.org>
-Tue Apr 14 22:18:17 1998 Tadayoshi Funaba <tadf@kt.rim.or.jp>
+ * io.c (rb_cloexec_pipe): remove workaround of r33587.
+ The bug of NetBSD is fixed on Mon Oct 31 21:31:29 UTC 2011.
+ http://gnats.netbsd.org/cgi-bin/query-pr-single.pl?number=45545
- * struct.c (struct_aref): should not subtract negative index.
+Tue Nov 1 19:49:08 2011 Tanaka Akira <akr@fsij.org>
-Tue Apr 14 11:34:50 1998 Yukihiro Matsumoto <matz@netlab.co.jp>
+ * io.c (rb_io_reopen): call rb_fd_fix_cloexec instead of
+ rb_maygvl_fd_fix_cloexec.
- * experimental release 1.1b9_10.
+Tue Nov 1 19:00:30 2011 Tanaka Akira <akr@fsij.org>
- * parse.y: token names prefixed by `t'.
+ * io.c (rb_io_reopen): call rb_maygvl_fd_fix_cloexec after freopen().
- * struct.c (struct_s_def): supports subclassing of Struct.
+Tue Nov 1 17:17:26 2011 NARUSE, Yui <naruse@ruby-lang.org>
- * io.c (io_s_new): supports subclassing of IO.
+ * file.c (file_expand_path): reset coderange after expanding path.
-Mon Apr 13 11:07:39 1998 Yukihiro Matsumoto <matz@netlab.co.jp>
+Tue Nov 1 14:55:29 2011 NARUSE, Yui <naruse@ruby-lang.org>
- * eval.c (f_binding): need to restore method name.
+ * io.c (nogvl_io_cntl): rb_cloexec_fcntl_dupfd's 2nd argument is int.
- * eval.c (rb_call0): raises SystemStackError, not Fatal.
+ * process.c (move_fds_to_avoid_crash): ditto.
- * io.c (obj_display): same as `print self'.
+Tue Nov 1 13:14:33 2011 NARUSE, Yui <naruse@ruby-lang.org>
- * io.c (f_p): can now be called in the method form.
+ * vsnprintf.c (BSD_vfprintf): support 'll' prefix.
- * re.c (reg_regsub): needed to be mbchar aware.
+ * vsnprintf.c (__sfeof): rename to avoid the collision with NetBSD's
+ one.
-Mon Apr 13 13:18:32 1998 Yukihiro Matsumoto <matz@netlab.co.jp>
+ * vsnprintf.c (__sferror): ditto.
- * eval.c (thread_trap_eval): all signals delivered to main_thread.
+ * vsnprintf.c (__sclearerr): ditto.
-Mon Apr 13 12:47:03 1998 TAKAHASHI Masayoshi <maki@inac.co.jp>
+ * vsnprintf.c (__sfileno): ditto.
- * re.c (kcode_set_option): did not set SJIS on SJIS condition.
+Tue Nov 1 12:36:16 2011 Tanaka Akira <akr@fsij.org>
-Sun Apr 12 22:14:07 1998 Kazunori NISHI <kazunori@swlab.csce.kyushu-u.ac.jp>
+ * internal.h (rb_maygvl_fd_fix_cloexec): change the visibility for
+ ext/socket.
- * array.c (ary_uniq_bang): should be `==', not `='. embarrassing.
+Tue Nov 1 12:00:53 2011 Tanaka Akira <akr@fsij.org>
-Sat Apr 11 02:13:30 1998 Yukihiro Matsumoto <matz@netlab.co.jp>
+ * io.c (rb_maygvl_fd_fix_cloexec): renamed from fd_set_cloexec.
- * array.c (ary_subseq): SEGVed for `[][1,1]'.
+ * internal.h (rb_maygvl_fd_fix_cloexec): declared.
-Fri Apr 10 21:29:06 1998 Tadayoshi Funaba <tadf@kt.rim.or.jp>
+ * ext/socket/init.c (cloexec_accept): use rb_maygvl_fd_fix_cloexec.
+ (rsock_s_accept_nonblock): use rb_update_max_fd.
+ (rsock_s_accept): use rb_update_max_fd.
- * array.c (ary_subseq): add check for beg larger than array length.
+Tue Nov 1 08:24:40 2011 Tanaka Akira <akr@fsij.org>
-Wed Apr 8 17:24:11 1998 MAEDA shugo <shugo@po.aianet.ne.jp>
+ * ext/socket/init.c (cloexec_accept): new function to use accept4 if
+ available.
+ (rsock_s_accept_nonblock): use cloexec_accept.
+ (accept_blocking): ditto.
- * dir.c (dir_s_open): can be called with block (like IO#open).
+ * ext/socket/extconf.rb: check accept4.
- * dir.c (dir_s_chdir): print directory path on error.
+Tue Nov 1 07:31:55 2011 Tanaka Akira <akr@fsij.org>
- * dir.c (dir_s_chroot): ditto
+ * ext/socket/ancdata.c (nogvl_recvmsg_func): use MSG_CMSG_CLOEXEC if
+ available.
- * dir.c (Init_Dir): needed to override `new'.
+ * ext/socket/unixsocket.c (recvmsg_blocking): ditto.
-Thu Apr 9 18:24:58 1998 Yukihiro Matsumoto <matz@netlab.co.jp>
+Tue Nov 1 05:59:41 2011 Tanaka Akira <akr@fsij.org>
- * experimental release 1.1b9_09.
+ * ext/socket/socket.c (rsock_socketpair): use SOCK_CLOEXEC if
+ available.
- * string.c (str_cmp): do not depend on sentinel at the end of the
- strings.
+Tue Nov 1 02:56:17 2011 NAKAMURA Usaku <usa@ruby-lang.org>
- * string.c (str_chomp_bang): forgot to set the sentinel.
+ * ruby.c (load_file_internal): convert the encoding of load path if
+ needed by platform. calling open() was replaced by rb_cloexec_open()
+ at r33549, but the function expected UTF-8 pathname on Windows.
+ (open() expected "locale" pathname.)
+ reported by taco via IRC.
-Wed Apr 8 00:59:13 1998 Yukihiro Matsumoto <matz@netlab.co.jp>
+ * ruby.c (load_file): change the type of the 2nd parameter to pass its
+ encoding to load_file_internal().
- * bignum.c (big2int): converted int may be too big to fit in
- signed int.
+ * ruby.c (process_options, rb_load_file): follow above change.
+ NOTE: we should pass encoding information to rb_load_file().
- * parse.y (arg): `foo += 1' should not cause an error.
+Mon Oct 31 23:49:38 2011 Tanaka Akira <akr@fsij.org>
- * variable.c (rb_const_defined): returned false even if the
- constant is defined at the top level.
+ * ext/socket/socket.c (rsock_socketpair): extracted from
+ rsock_sock_s_socketpair.
- * eval.c (f_local_variables): dyna_var->id may be null. should
- have checked before calling str_new2().
+Mon Oct 31 23:31:53 2011 Tanaka Akira <akr@fsij.org>
-Tue Apr 7 01:15:15 1998 Kaneko Naoshi <wbs01621@mail.wbs.or.jp>
+ * ext/socket/init.c (rsock_socket): use SOCK_CLOEXEC if available.
- * re.c (reg_regsub): need to check string boundary.
+Mon Oct 31 21:47:44 2011 NARUSE, Yui <naruse@ruby-lang.org>
-Tue Apr 7 19:19:12 1998 Yukihiro Matsumoto <matz@netlab.co.jp>
+ * io.c (rb_cloexec_pipe): NetBSD 6.0 will support pipe2(2),
+ but its return value is -1 or larger than 0.
- * string.c (str_cmp): returns either 1, 0, -1.
+Mon Oct 31 22:04:54 2011 Tanaka Akira <akr@fsij.org>
- * array.c (ary_cmp): should check array length, too
+ * ext/dbm/dbm.c (fdbm_initialize): use O_CLOEXEC if available.
-Tue Apr 7 18:50:16 1998 Yukihiro Matsumoto <matz@netlab.co.jp>
+Mon Oct 31 21:47:48 2011 Tanaka Akira <akr@fsij.org>
- * experimental release 1.1b9_08.
+ * include/ruby/intern.h (rb_fd_fix_cloexec): renamed from
+ rb_fd_set_cloexec.
-Tue Apr 7 18:31:27 1998 WATANABE Hirofumi <watanabe@ase.ptg.sony.co.jp>
+ * io.c: follow the above renaming.
- * instruby.rb (mandir): dll installation for cygwin32
+ * ext/pty/pty.c: ditto.
-Tue Apr 7 01:16:45 1998 Yukihiro Matsumoto <matz@netlab.co.jp>
+ * ext/socket/init.c: ditto.
- * config.sub (maybe_os): TOWNS support?
+ * ext/socket/socket.c: ditto.
- * config.guess: too strict check for libc versions on linuxes.
+ * ext/socket/ancdata.c: ditto.
- * experimental release 1.1b9_07.
+ * ext/socket/unixsocket.c: ditto.
- * array.c (ary_cmp): compare each element using `<=>'.
+Mon Oct 31 21:02:43 2011 Tanaka Akira <akr@fsij.org>
- * hash.c (hash_each_with_index): yields [value, key] pair.
+ * lib/resolv.rb (Resolv::DNS): retry IO.select for premature wakeup.
- * class.c (class_protected_instance_methods): list protected
- method names.
+Mon Oct 31 20:14:22 2011 Tanaka Akira <akr@fsij.org>
- * class.c (ins_methods_i): exclude protected methods.
+ * io.c (fd_set_cloexec): clear CLOEXEC flag for standard file
+ descriptors.
+ (rb_cloexec_dup): use rb_cloexec_fcntl_dupfd.
+ (rb_cloexec_fcntl_dupfd): use F_DUPFD_CLOEXEC if available.
- * eval.c (PUSH_BLOCK): dynamic variables can be accessed from
- eval() with bindings.
+Mon Oct 31 19:14:11 2011 Tanaka Akira <akr@fsij.org>
-Mon Apr 6 14:49:06 1998 Yukihiro Matsumoto <matz@netlab.co.jp>
+ * test/resolv/test_dns.rb: don't check maximum slept time.
+ ruby doesn't guarantee the maximum time because it is not a
+ realtime application.
- * eval.c (thread_yield): must return evaluated value.
+Mon Oct 31 13:10:06 2011 NAKAMURA Usaku <usa@ruby-lang.org>
-Fri Apr 3 13:07:29 1998 Yukihiro Matsumoto <matz@netlab.co.jp>
+ * win32/win32.c (setfl): extract from fcntl().
- * eval.c (thread_schedule): context switch bypassed on wrong
- conditions.
+ * win32/win32.c (dupfd): new function to support F_DUPFD. based on a
+ patch written by akr.
- * variable.c (rb_name_class): set classname by id before String
- class is initialized (1.0 behavior restored).
+ * win32/win32.c (fcntl): use above functions.
-Fri Apr 3 11:25:45 1998 Yukihiro Matsumoto <matz@netlab.co.jp>
+ * include/ruby/win32.h (F_DUPFD): define. [experimental]
- * numeric.c (num2int): no implicit conversion from string.
+ * include/ruby/win32.h (F_SETFL): change the value to correspond with
+ other platforms.
- * numeric.c (num2int): check whether `to_i' returns an Integer.
+Mon Oct 31 12:37:50 2011 Tanaka Akira <akr@fsij.org>
- * numeric.c (num_zero_p): new method.
+ * ext/pty/pty.c (get_device_once): use O_CLOEXEC for posix_openpt if
+ available.
- * numeric.c (num_nonzero_p): new method. returns the receiver if
- it's not zero.
+Mon Oct 31 12:05:24 2011 Tanaka Akira <akr@fsij.org>
- * eval.c (obj_instance_eval): the_class should be the object's
- singleton class.
+ * io.c (rb_cloexec_dup2): check oldfd == newfd at first.
+ pointed by KOSAKI Motohiro. [ruby-dev:44713]
- * error.c (exc_s_new): message is converted into a string.
+Mon Oct 31 10:50:26 2011 NAKAMURA Usaku <usa@ruby-lang.org>
-Thu Apr 2 18:31:46 1998 Yukihiro Matsumoto <matz@netlab.co.jp>
+ * io.c (rb_cloexec_fcntl_dupfd): this function needs F_DUPFD.
- * eval.c (obj_call_init): every object call `initialize'.
+ * io.c (nogvl_io_cntl): use rb_cloexec_fcntl_dupfd() only if the
+ platform has F_DUPFD.
-Wed Apr 1 08:51:53 1998 Tadayoshi Funaba <tadf@kt.rim.or.jp>
+Mon Oct 31 00:50:00 2011 Luis Lavena <luislavena@gmail.com>
- * parse.y (stmt): UNTIL_MOD should be for stmt, not only for expr.
+ * configure.in: check -fno-omit-frame-pointer acceptance and usage
+ under MinGW. [ruby-core:39957] [Bug #5407]
-Wed Apr 1 01:20:31 1998 Yukihiro Matsumoto <matz@netlab.co.jp>
+Mon Oct 31 00:16:11 2011 Tanaka Akira <akr@fsij.org>
- * object.c (true_and): boolean operators &, | and ^.
+ * include/ruby/intern.h (rb_cloexec_fcntl_dupfd): declared.
-Tue Mar 31 13:23:58 1998 Yukihiro Matsumoto <matz@netlab.co.jp>
+ * io.c (rb_cloexec_fcntl_dupfd): new function.
+ (nogvl_io_cntl): use rb_cloexec_fcntl_dupfd.
- * array.c (ary_compact_bang): returns nil, if it does not modify
- the array like String's bang methods.
+ * process.c (move_fds_to_avoid_crash): use rb_cloexec_fcntl_dupfd.
- * array.c (ary_uniq_bang): new method to remove duplicate items.
+Sun Oct 30 22:46:46 2011 Tanaka Akira <akr@fsij.org>
- * eval.c (bind_s_new): new method.
+ * configure.in: check pipe2.
- * numeric.c (num2int): raise exception if Fixnums too big to
- convert into `int' in case that sizeof(int) < sizeof(INT).
+ * io.c (rb_cloexec_pipe): use pipe2 if available.
- * string.c (str_center): SEGV on negative width.
+Sun Oct 30 22:32:44 2011 Tanaka Akira <akr@fsij.org>
- * eval.c (eval): forgot to set sourcefile.
+ * ruby.c (fill_standard_fds): use fstat() instead of fcntl(F_GETFD)
+ for MinGW. reported by Luis Lavena. [ruby-core:40526] [Bug #5516]
-Mon Mar 30 11:12:29 1998 Yukihiro Matsumoto <matz@netlab.co.jp>
+Sun Oct 30 21:12:47 2011 Tanaka Akira <akr@fsij.org>
- * file.c (f_test): raises exception for unknown command.
+ * include/ruby/intern.h (rb_cloexec_pipe): declared.
- * eval.c (Init_eval): `class_eval': alias to the module_eval.
+ * io.c (rb_cloexec_pipe): new function.
+ (rb_pipe): use rb_cloexec_pipe.
-Mon Mar 30 18:50:42 1998 Tadayoshi Funaba <tadf@kt.rim.or.jp>
+ * thread_pthread.c (rb_thread_create_timer_thread): use
+ rb_cloexec_pipe.
- * string.c (str_capitalize_bang): did not check string modification.
+Sun Oct 30 20:06:07 2011 Tanaka Akira <akr@fsij.org>
- * string.c (str_delete_bang): wrong conversion.
+ * io.c (rb_cloexec_dup): refine control flow.
+ (rb_cloexec_dup2): ditto.
- * string.c (str_intern): typo in error message.
+Sun Oct 30 18:45:50 2011 Tanaka Akira <akr@fsij.org>
-Mon Mar 30 01:44:13 1998 Yukihiro Matsumoto <matz@netlab.co.jp>
+ * ruby.c (fill_standard_fds): new function to open closed standard
+ file descriptors.
+ (ruby_sysinit): call fill_standard_fds.
- * eval.c (obj_instance_eval): accepts block as evaluation body.
- No compilation needed each time.
+Sun Oct 30 10:50:36 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * eval.c (mod_module_eval): ditto
+ * tool/rbinstall.rb (install_recursive, bin-comm): split mere
+ string not path name. [ruby-core:40462] [Bug #5492]
- * file.c (file_s_umask): umask did not return old values, if no
- argument given.
+Sun Oct 30 10:47:20 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Sun Mar 29 00:54:23 1998 Yukihiro Matsumoto <matz@netlab.co.jp>
+ * io.c (rb_cloexec_dup, rb_cloexec_dup2): CLOEXEC has been set if
+ dup3 succeeded.
- * eval.c (f_throw): nil returned always.
+Sun Oct 30 09:58:48 2011 Tanaka Akira <akr@fsij.org>
-Sat Mar 28 20:40:12 1998 Yukihiro Matsumoto <matz@netlab.co.jp>
+ * io.c (rb_cloexec_dup): don't allocate standard file descriptors.
- * experimental release 1.1b9_06.
+Sun Oct 30 08:29:51 2011 Tanaka Akira <akr@fsij.org>
-Sat Mar 28 16:07:11 1998 WATANABE Hirofumi <watanabe@ase.ptg.sony.co.jp>
+ * io.c (rb_cloexec_dup2): don't set CLOEXEC for standard file
+ descriptors.
- * io.c (io_closed): should not cause exception for closed IO.
+Sun Oct 30 07:47:10 2011 Tanaka Akira <akr@fsij.org>
- * string.c (str_tr): returned nil for success.
+ * configure.in: check dup3.
-Sat Mar 28 00:47:19 1998 Yukihiro Matsumoto <matz@netlab.co.jp>
+ * io.c (rb_cloexec_dup2): use dup3 if available.
- * eval.c (f_local_variables): new method to return an array of
- local variable names.
+Sat Oct 29 22:06:37 2011 Tanaka Akira <akr@fsij.org>
- * variable.c (obj_instance_variables): now returns an array of
- variable names, as described in the reference.
+ * include/ruby/intern.h (rb_cloexec_dup2): declared.
- * eval.c (rb_attr): honors default method visibility of the
- current scope.
+ * io.c (rb_cloexec_dup2): new function.
+ (io_reopen): use rb_cloexec_dup2.
-Fri Mar 27 13:49:27 1998 Yukihiro Matsumoto <matz@netlab.co.jp>
+Sat Oct 20 21:08:18 2011 Tajima Akio <artonx@yahoo.co.jp>
- * experimental release 1.1b9_05.
+ * win32/Makefile.sub (CONFIG_H): have stdint.h if VC2010.
+ [Bug #5243]
- * ruby.c (ruby_prog_init): `site_ruby' added to load_path.
+Sat Oct 29 20:59:08 2011 Tanaka Akira <akr@fsij.org>
- * ruby.c (ruby_prog_init): load-path order changed. Paths in
- the RUBYLIB environment variable comes first in non-tainted
- mode.
+ * io.c (rb_cloexec_dup): use F_DUPFD_CLOEXEC if available.
-Thu Mar 26 11:51:09 1998 Yukihiro Matsumoto <matz@netlab.co.jp>
+Sat Oct 29 20:00:26 2011 Tanaka Akira <akr@fsij.org>
- * eval.c (rb_call): new feature: `protected' methods.
+ * include/ruby/intern.h (rb_cloexec_dup): declared.
- * string.c (str_dump): new method.
+ * io.c (rb_cloexec_dup): new function.
+ (ruby_dup): use rb_cloexec_dup.
- * eval.c (block_pass): block argument can be nil, which means no
- block is supplied for the method.
+ * ext/pty/pty.c (pty_getpty): use rb_cloexec_dup.
-Wed Mar 25 21:20:13 1998 Tadayoshi Funaba <tadf@kt.rim.or.jp>
+ * ext/openssl/ossl_bio.c (ossl_obj2bio): ditto.
- * string.c (str_reverse_bang): string copied to wrong place.
+Sat Oct 29 16:11:34 2011 Tanaka Akira <akr@fsij.org>
-Wed Mar 25 08:12:07 1998 Yukihiro Matsumoto <matz@netlab.co.jp>
+ * ext/sdbm/_sdbm.c (sdbm_prep): use O_CLOEXEC if available.
- * numeric.c (flo_modulo): caused SEGV if left operand is not a
- float value.
+Sat Oct 29 14:26:56 2011 Tanaka Akira <akr@fsij.org>
- * eval.c (f_eval): optional third and fourth argument to specify
- file-name and line-number.
+ * io.c (rb_cloexec_open): use O_CLOEXEC if available.
- * eval.c (eval): file-name and line-number set properly.
+Sat Oct 29 12:57:15 2011 Tanaka Akira <akr@fsij.org>
- * parse.y (assign_in_cond): literal assignment is now warning, not
- compile error.
+ * process.c (ruby_setsid): use rb_cloexec_open.
+ (rb_daemon): ditto.
- * error.c (Warn): Warn() always print message, OTOH Waring()
- prints when verbose flag is set.
+ * ruby.c (load_file_internal): ditto.
-Tue Mar 24 12:50:06 1998 Yukihiro Matsumoto <matz@netlab.co.jp>
+ * file.c (rb_file_s_truncate): ditto.
+ (file_load_ok): ditto.
- * ruby.c (ruby_prog_init): `.' should come last in the load-path.
+ * random.c (fill_random_seed): ditto.
- * eval.c (Init_eval): `__send__', alias for `send'.
+ * ext/pty/pty.c (chfunc): ditto.
+ (get_device_once): ditto.
-Mon Mar 23 12:44:12 1998 Yukihiro Matsumoto <matz@netlab.co.jp>
+ * ext/io/console/console.c (console_dev): ditto.
- * string.c (str_chomp_bang): now takes `rs' as an argument.
+Sat Oct 29 10:40:19 2011 Tanaka Akira <akr@fsij.org>
- * eval.c (thread_free): main_thread should not be freed.
+ * include/ruby/intern.h (rb_cloexec_open): declared.
-Fri Mar 20 16:40:34 1998 Yukihiro Matsumoto <matz@netlab.co.jp>
+ * io.c (fd_set_cloexec): extracted from rb_fd_set_cloexec.
+ (rb_cloexec_open): new function.
+ (sysopen_func): use rb_cloexec_open.
+ (rb_sysopen_internal): use rb_update_max_fd instead of
+ rb_fd_set_cloexec.
- * string.c (str_chomp_bang): chomp! (and other ! methods) returns
- nil if it does not modify the string.
+Sat Oct 29 09:05:07 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * string.c (str_sub_iter_s): should check last pattern since it
- may be matched to null.
+ * thread_pthread.h: no Structured Exception Handling like macros.
+ [ruby-core:40432] [Bug #5491]
-Thu Mar 19 13:48:55 1998 Yukihiro Matsumoto <matz@netlab.co.jp>
+Fri Oct 28 22:05:34 2011 Tanaka Akira <akr@fsij.org>
- * experimental release 1.1b9_04.
+ * ext/sdbm/_sdbm.c: RCS $Id$ removed.
- * parse.y (yylex): `10e0.9' should cause syntax error.
+Thu Oct 27 18:58:00 2011 NARUSE, Yui <naruse@ruby-lang.org>
-Wed Mar 18 17:46:31 1998 Yukihiro Matsumoto <matz@netlab.co.jp>
+ * parse.y (parser_nextc): set encoding for the buffer of ripper.
- * ruby.c (load_file): new file object constant DATA. Only
- available for the script from the file.
+Fri Oct 28 06:06:08 2011 Tanaka Akira <akr@fsij.org>
- * regex.c (re_match): forwarding failure point popped too much.
+ * ext/sdbm/_sdbm.c (sdbm_prep): set FD_CLOEXEC flags for file
+ descriptors.
+ (fd_set_cloexec): new function.
-Tue Mar 17 18:23:06 1998 Yukihiro Matsumoto <matz@netlab.co.jp>
+Fri Oct 28 03:01:27 2011 Aaron Patterson <aaron@tenderlovemaking.com>
- * math.c (math_frexp): newly added.
+ * vm_insnhelper.c (vm_call_cfunc): adding back useless hack. For some
+ reason, this fixes CFP errors on OS X 10.7.
- * math.c (math_ldexp): ditto.
+Fri Oct 28 00:09:31 2011 Tanaka Akira <akr@fsij.org>
- * bignum.c (bigdivmod): calculates modulo.
+ * ext/sdbm/_sdbm.c (sdbm_prep): refactored for less nesting.
- * numeric.c (fix_remainder): returns reminder, formerly introduced
- as modulo.
+Thu Oct 27 18:28:18 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * numeric.c (fix_modulo): calculates proper `modulo'.
+ * configure.in (RUBY_DEFINE_IF): revert r33534 partially to get
+ rid of AS_ECHO which is not available in autoconf 2.61.
+ [ruby-dev:44702]
- * bignum.c (bigdivmod): wrong sign for reminder.
+Thu Oct 27 16:10:46 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Mon Mar 16 17:07:28 1998 Yukihiro Matsumoto <matz@netlab.co.jp>
+ * bignum.c (rb_big_divide): raise ZeroDivisionError if divisor is
+ zero, as well as Fixnum. [ruby-core:40429] [Bug #5490]
- * experimental release 1.1b9_03.
+Thu Oct 27 14:56:22 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Mon Mar 16 16:33:53 1998 WATANABE Hirofumi <watanabe@ase.ptg.sony.co.jp>
+ * configure.in (RUBY_FUNC_ATTRIBUTE): unset temporary variable.
- * io.c (pipe_finalize): needed to add pipe_finalize to pipes on
- cygwin32.
+ * configure.in (RUBY_STACK_GROW_DIRECTION): substitute CPU name as
+ shell variable name. based on the patch by The Written Word Inc. at
+ [ruby-core:40421]. [Bug #5488]
-Mon Mar 16 14:11:06 1998 Yukihiro Matsumoto <matz@netlab.co.jp>
+Thu Oct 27 09:57:56 2011 NARUSE, Yui <naruse@ruby-lang.org>
- * class.c (ins_methods_i): needed to consider NOEX_UNDEF.
+ * include/ruby/ruby.h (SIZE_MAX): define SIZE_MAX if not defined.
+ patched by The Written Word Inc. [ruby-core:40422] [Bug #5489]
-Mon Mar 16 13:23:53 1998 WATANABE Hirofumi <watanabe@ase.ptg.sony.co.jp>
+Thu Oct 27 08:47:38 2011 Martin Bosslet <Martin.Bosslet@googlemail.com>
- * io.c (io_check_closed): check for `fptr->f2 == NULL'.
+ * ext/psych/parser.c: remove unused variable.
- * io.c (io_fptr_close): ditto.
+Thu Oct 27 08:38:41 2011 Martin Bosslet <Martin.Bosslet@googlemail.com>
-Mon Mar 16 11:49:25 1998 Yukihiro Matsumoto <matz@netlab.co.jp>
+ * ext/openssl/extconf.rb: add -Wall flag by default when compiler is
+ GCC.
- * io.c (pipe_atexit): free()ing referencing pipe_list.
+Wed Oct 26 15:24:25 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * range.c (range_length): returns zero, if the first is greater
- than the last.
+ * file.c (rb_file_join): honor input encodings than ASCII-8BIT.
+ [ruby-core:40338] [Bug #5483]
- * signal.c (trap_restore_mask): restore signal mask before raising
- exceptions and throws.
+Tue Oct 25 21:52:31 2011 Tanaka Akira <akr@fsij.org>
-Fri Mar 13 13:49:24 1998 Yukihiro Matsumoto <matz@netlab.co.jp>
+ * include/ruby/defines.h: use "__sparc" instead of "sparc" and
+ "__sparc__".
- * experimental release 1.1b9_02.
+ * dln.c: ditto.
- * object.c (mod_clone): need to dups constants and instance
- variables.
+ [ruby-dev:44694]
- * eval.c (rb_eval): forgot to initialize body for NODE_DEFS.
+Tue Oct 25 06:34:39 2011 Eric Hodel <drbrain@segment7.net>
- * eval.c (rb_eval): retrieve self from calling frame, since self
- changes sometimes.
+ * re.c (match_aref): Use <code> around indexing examples to prevent
+ hyperlinks. [ruby-talk:389396]
- * env.h (FRAME): need to save self in the calling frame.
+Mon Oct 24 23:55:31 2011 Tanaka Akira <akr@fsij.org>
- * io.c (f_gets_method): rs should be initialized by RS.
+ * complex.c: use "__sun" instead of "__sun__" to detect SunOS.
-Thu Mar 12 15:33:57 1998 Yukihiro Matsumoto <matz@netlab.co.jp>
+ * math.c: ditto.
- * experimental release 1.1b9_01.
+ * hash.c: ditto.
- * range.c (range_s_new): check values by `first <= last'.
+ * atomic.h: ditto.
- * parse.y (lastline_set): fixed offset for $_ and $~ in the local
- variable space.
+ * ext/io/wait/wait.c: ditto.
-Wed Mar 11 02:14:17 1998 Yukihiro Matsumoto <matz@netlab.co.jp>
+ [ruby-dev:44693]
- * io.c (io_gets): handle normal case specially for speed.
+Mon Oct 24 22:45:37 2011 Tanaka Akira <akr@fsij.org>
- * eval.c (rb_disable_super): function to disable superclass's
- method explicitly.
+ * io.c: use "__sun" instead of "sun" to detect SunOS.
- * eval.c (rb_eval): inherits previous method definition's
- NOEX_UNDEF-ness, if exists.
+ * dln.c: ditto.
- * class.c (rb_define_method): disables superclass's overriding
- method by default.
+ * cont.c: ditto.
-Wed Mar 11 01:40:48 1998 MAEDA shugo <shugo@po.aianet.ne.jp>
+ * ext/sdbm/_sdbm.c: ditto.
- * numeric.c (flo_gt,etc.): do not depend on `<=>', to handle NaN.
+ [ruby-dev:44693]
-Tue Mar 10 00:03:24 1998 Yukihiro Matsumoto <matz@netlab.co.jp>
+Mon Oct 24 22:38:08 2011 Tanaka Akira <akr@fsij.org>
- * ruby.c (load_file): understands multiple options in #! line.
+ * ext/pty/pty.c (get_device_once): delay rb_fd_set_cloexec() until
+ grantpt() on Solaris. grantpt() doesn't work with CLOEXEC on
+ Solaris 10.
+ reported by Naohisa GOTO. [ruby-dev:44688] [Bug #5475]
- * regex.c (re_compile_pattern): support for [:alpha:] etc.
+Mon Oct 24 08:18:14 2011 Tanaka Akira <akr@fsij.org>
-Mon Mar 9 16:53:51 1998 Yukihiro Matsumoto <matz@netlab.co.jp>
+ * io.c (copy_stream_fallback_body): check nil for EOF of read method.
+ patch by Eric Wong. [ruby-core:39134] [Bug #5237]
- * io.h (GetOpenFile): embed io_check_closed in GetOpenFile.
+Sun Oct 23 18:21:23 2011 Kazuki Tsujimoto <kazuki@callcc.net>
- * sprintf.c (f_sprintf): zero padding failed for negative
- integers.
+ * ext/tk/MANUAL_tcltklib.eng: fix typo.
- * sprintf.c (remove_sign_bits): failed to remove some bits.
+Sun Oct 23 18:03:31 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Sat Mar 7 21:51:46 1998 MAEDA shugo <shugo@po.aianet.ne.jp>
+ * numeric.c (rb_infinity, rb_nan): aggregated member initializers
+ need braces.
- * class.c (ins_methods_i): body may be NULL for some case.
+Sun Oct 23 16:43:43 2011 Naohisa Goto <ngotogenome@gmail.com>
-Fri Mar 6 17:23:07 1998 Yukihiro Matsumoto <matz@netlab.co.jp>
+ * ext/io/wait/wait.c: ioctl(2) is declared in unistd.h on Solaris.
- * regex.c (mbcinit): table driven mbchar detection.
+Sun Oct 23 16:33:35 2011 Ayumu AIZAWA <ayumu.aizawa@gmail.com>
- * object.c (obj_alloc): check for allocating instance for the
- primitive classes (mostly perfect).
+ * ext/tk/MANUAL_tcltklib.eng: fix typo. reported by Mimura-san.
+ [ruby-dev:44683] [Bug #5471]
- * ext/curses/curses.c (curses_finalize): restore original state at
- interpreter termination.
+Sun Oct 23 08:01:29 2011 Tanaka Akira <akr@fsij.org>
- * ext/curses/curses.c (curses_addstr): forgot to check argument
- type (caused SEGV). now uses STR2CSTR() macro.
+ * io.c (rb_fd_set_cloexec): set close-on-exec flag only if F_GETFD is
+ defined. reported by Luis Lavena. [ruby-core:40281] [Bug #5470]
-Thu Mar 5 13:47:39 1998 Yukihiro Matsumoto <matz@netlab.co.jp>
+Sat Oct 22 19:48:50 2011 Tanaka Akira <akr@fsij.org>
- * eval.c (block_pass): accepts method object as block args.
+ * test/openssl/test_ssl.rb (test_multibyte_read_write): start server
+ for each length to avoid race condition.
- * eval.c (f_missing): use any_to_s() for stringify.
+Sat Oct 22 18:49:24 2011 Tanaka Akira <akr@fsij.org>
-Wed Mar 4 01:39:52 1998 Yukihiro Matsumoto <matz@netlab.co.jp>
+ * include/ruby/intern.h (rb_fd_set_cloexec): declared.
- * parse.y (block_arg): new syntax - block argument in the
- calling arglist.
+ * io.c (rb_fd_set_cloexec): new function.
+ (ruby_dup): call rb_fd_set_cloexec to set close-on-exec flag.
+ (rb_sysopen_internal): ditto.
+ (rb_pipe): ditto.
+ (io_reopen): ditto.
+ (io_cntl): ditto.
- * eval.c (rb_call): no module search. simplified a lot.
+ * process.c (rb_f_exec): change the default :close_others option to
+ true.
+ (rb_f_system): ditto.
+ (move_fds_to_avoid_crash): call rb_fd_set_cloexec to set
+ close-on-exec flag.
+ (ruby_setsid): ditto.
+ (rb_daemon): ditto.
- * eval.c (rb_eval): block arg support.
+ * thread_pthread.c (rb_thread_create_timer_thread): call
+ rb_fd_set_cloexec to set close-on-exec flag.
- * parse.y (f_block_arg): new syntax - block argument in the
- formal arglist.
+ * ruby.c (load_file_internal): ditto.
-Tue Mar 3 14:20:15 1998 Yukihiro Matsumoto <matz@netlab.co.jp>
+ * file.c (rb_file_s_truncate): ditto.
+ (file_load_ok): ditto.
- * eval.c (obj_method): returns bound method object.
+ * random.c (fill_random_seed): ditto.
- * eval.c (rb_call): argument check for empty methods.
+ * ext/pty/pty.c (chfunc): ditto.
+ (get_device_once): ditto.
- * ruby.h (NUM2CHR): new macro, originally from curses module.
+ * ext/openssl/ossl_bio.c (ossl_obj2bio): ditto.
-Tue Mar 3 13:03:35 1998 MAEDA shugo <shugo@po.aianet.ne.jp>
+ * ext/socket/init.c (rsock_socket): ditto.
+ (rsock_s_accept_nonblock): ditto.
+ (rsock_s_accept): ditto.
- * io.c (io_putc): new method.
+ * ext/socket/socket.c (rsock_sock_s_socketpair): ditto.
-Tue Mar 3 11:21:28 1998 Yukihiro Matsumoto <matz@netlab.co.jp>
+ * ext/socket/ancdata.c (discard_cmsg): ditto.
+ (make_io_for_unix_rights): ditto.
- * string.c (str_inspect): more strict charcode detection.
+ * ext/socket/unixsocket.c (unix_recv_io): ditto.
- * eval.c (thread_stop): stopping only thread raises ThreadError
- exception.
+ * ext/io/console/console.c (console_dev): ditto.
-Tue Mar 3 08:04:56 1998 Tadayoshi Funaba <tadf@kt.rim.or.jp>
+ [ruby-core:38140] [Feature #5041]
- * struct.c (struct_alloc): incomplete struct initialization made
- GC to access unallocated addresses.
+Sat Oct 22 17:46:27 2011 Tanaka Akira <akr@fsij.org>
-Mon Mar 2 16:28:27 1998 Yukihiro Matsumoto <matz@netlab.co.jp>
+ * lib/resolv.rb: fix a exception name in previous patch.
- * eval.c (thread_stop_method): remove Thread#stop.
+Sat Oct 22 17:43:33 2011 Tanaka Akira <akr@fsij.org>
-Fri Feb 27 18:16:26 1998 Yukihiro Matsumoto <matz@netlab.co.jp>
+ * lib/resolv.rb: make timeout configurable for DNS query.
+ patch by Eric Wong. [ruby-core:38533] [Feature #5100]
- * version 1.1b9 released.
+Sat Oct 22 02:07:48 2011 Naohisa Goto <ngotogenome@gmail.com>
-Fri Feb 27 09:36:35 1998 Yukihiro Matsumoto <matz@netlab.co.jp>
+ * numeric.c (rb_infinity, rb_nan): use union to prevent bus error
+ caused by misalignment. [Bug #5469] [ruby-dev:44657]
- * hash.c (hash_delete_nil): needed to compare value to nil, since
- nil is the valid key for hashes.
+ * include/ruby/missing.h (INFINITY, NAN): ditto
- * hash.c (hash_foreach_iter): rehashing causes IndexError.
+Fri Oct 21 22:02:17 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * hash.c (hash_foreach_iter): rehash check by pointer comparison.
+ * gc.c (initial_params): pack in a struct.
-Thu Feb 26 17:22:13 1998 Yukihiro Matsumoto <matz@netlab.co.jp>
+ * gc.c (rb_gc_set_params): set parameters always.
+ [ruby-dev:44648] [Bug #5467]
- * parse.y (fname): convert reswords into symbols.
+Fri Oct 21 12:10:20 2011 Naohisa Goto <ngotogenome@gmail.com>
- * parse.y (reswords): reserved words are now embedded in the
- syntax (sigh).
+ * atomic.h: change Solaris checking macro because atomic_ops can work
+ not only with Sun Studio but also with Fujitsu C Compiler.
- * parse.y: now reserved words can be method names safely.
+Fri Oct 21 02:11:00 2011 Martin Bosslet <Martin.Bosslet@googlemail.com>
-Wed Feb 25 15:50:07 1998 Yukihiro Matsumoto <matz@netlab.co.jp>
+ * ext/openssl/ossl_ns_spki.c: Complete documentation.
+ * test/openssl/test_ns_spki.rb: Integrate SPKI#to_text.
- * eval.c (mod_module_eval): clear the_scope's PRIVATE flag before
- calling eval().
+Thu Oct 20 22:47:28 2011 NAKAMURA Usaku <usa@ruby-lang.org>
- * gc.c (gc_call_finalizer_at_exit): run finalizers before any data
- object being freed.
+ * win32/win32.c (socklist_insert, socklist_lookup, socklist_delete):
+ new functions to wrap of st_insert(), st_lookup() and st_delete() to
+ socklist.
+ allocating socklist is deferred until it is really needed.
- * eval.c (rb_eval): needed to keep prot_tag->retval before
- evaluating the ensure clause.
+ * win32/win32.c (exit_handler): delete socklist only if it is
+ initialized.
-Tue Feb 24 11:16:32 1998 Yukihiro Matsumoto <matz@netlab.co.jp>
+ * win32/win32.c (rb_w32_sysinit, StartSockets): refactoring: move
+ initialization of select_mutex to StartSockets().
- * parse.y (yylex): reserved words can be appear as method names at
- right after 'def' and `.'(dot), like foo.next.
+ * win32/win32.c (exit_handler): refactoring: delete select_mutex only
+ if winsock is used.
- * eval.c (return_check): checks for return out of thread (formerly
- done in return_value).
+Thu Oct 20 22:38:53 2011 Martin Bosslet <Martin.Bosslet@googlemail.com>
- * eval.c (POP_TAG): copy retval to outer level.
+ * ext/openssl/ossl_pkcs5.c: add note on timing attacks and general
+ documentation.
- * eval.c (return_value): just set retval, no check, no unwinding.
+Thu Oct 20 21:19:15 2011 Naohisa Goto <ngotogenome@gmail.com>
- * parse.y (nextc): line continuation by backslash at end of line.
+ * vm_eval.c (check_funcall): set array elements one-by-one to fix
+ compile error with Fujitsu C Compiler 5.6 on Solaris 10 on Sparc.
+ [Bug #5464] [ruby-dev:44632]
- * regex.c (re_compile_pattern): forgot to clear pending_exact on
- closing parentheses.
+Thu Oct 20 13:09:35 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * parse.y (assignable): should not assign dyna_var to true, if it
- is already defined.
+ * include/ruby/defines.h (flush_register_windows): use software
+ trap on Debian Sparc 32-bit userspace. [Bug #5244]
-Mon Feb 23 14:35:03 1998 Yukihiro Matsumoto <matz@netlab.co.jp>
+Thu Oct 20 12:28:22 2011 Martin Bosslet <Martin.Bosslet@googlemail.com>
- * object.c (obj_is_kind_of): no longer accepts true/false/nil.
+ * test/openssl/test_pkcs5.rb: add RFC 6070 tests for PBKDF2 with
+ HMAC-SHA1
- * object.c ({true,false,nil}_to_i): can be converted into integers.
+Thu Oct 20 11:42:23 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Mon Feb 23 12:11:51 1998 Yukihiro Matsumoto <matz@netlab.co.jp>
+ * util.c (mmprepare): fix for fragmental size.
- * re.c (reg_s_quote): needed to be mbchar aware.
+ * util.c (mmswap_, mmrot3_): portability improvement.
- * eval.c (proc_s_new): wrong iter mark.
+Thu Oct 20 05:58:02 2011 Eric Hodel <drbrain@segment7.net>
-Sat Feb 21 22:59:30 1998 MAEDA shugo <shugo@po.aianet.ne.jp>
+ * ext/openssl/ossl_ns_spki.c (Init_ossl_ns_spki): Stub documentation
+ for Netscape SPKI.
- * io.c (f_syscall): no argument check.
+Thu Oct 20 05:13:39 2011 Ryan Davis <ryand-ruby@zenspider.com>
-Fri Feb 20 10:17:51 1998 Yukihiro Matsumoto <matz@netlab.co.jp>
+ * lib/minitest/*: Imported minitest 2.6.2 (r6712)
+ * test/minitest/*: ditto
- * version 1.1b8 released.
+Thu Oct 20 06:55:32 2011 Martin Bosslet <Martin.Bosslet@googlemail.com>
- * ext/kconv/kconv.c (kconv_kconv): default output code now be
- determined according to the value of $KCODE.
+ * lib/openssl/buffering.rb: Force multi-byte strings to be treated as
+ binary data.
+ * test/openssl/test_ssl.rb: Add test for it.
- * re.c (rb_get_kcode): can retrieve $KCODE from C code.
+ Thanks to Niklas Baumstark for reporting the issue!
- * parse.y (stmt): if/unless modifiers returns nil, if condition is
- not established.
+ [Ruby 1.9 - Bug #5233] [ruby-core:39120]
-Thu Feb 19 11:06:47 1998 Yukihiro Matsumoto <matz@netlab.co.jp>
+Wed Oct 19 17:06:54 2011 Yukihiro Matsumoto <matz@ruby-lang.org>
- * ext/kconv/kconv.c (kconv_kconv): charcode can be specified by
- code name (JIS, SJIS, EUC like value of $KCODE).
+ * version.h (RUBY_VERSION): finally declare start of 2.0 work!
- * regex.c (re_compile_pattern): forgot to fixup_jump for (?:..).
+Wed Oct 19 11:48:44 2011 Eric Hodel <drbrain@segment7.net>
- * regex.c (re_compile_pattern): needed to clear pending_exact on
- non-registering grouping (?:...).
+ * error.c (Init_Exception): Document $! and $@. Provide
+ recommendations for creating exceptions for a library.
-Wed Feb 18 19:54:21 1998 Yukihiro Matsumoto <matz@netlab.co.jp>
+Wed Oct 19 11:25:46 2011 Eric Hodel <drbrain@segment7.net>
- * parse.y (here_document): needed to set lex_state to EXPR_END.
+ * error.c (Init_Exception): Add hierarchy of Exception subclasses.
+ Based on patch by Sylvain Daubert. [Ruby 1.9 - Bug #5438]
-Wed Feb 18 18:45:10 1998 WATANABE Hirofumi <watanabe@ase.ptg.sony.co.jp>
+Wed Oct 19 11:04:47 2011 Eric Hodel <drbrain@segment7.net>
- * patches for cygwin32 applied.
+ * enum.c: Reformat block args to a single standard, { |args| ... }.
+ Patch by b t. [Ruby 1.9 - Bug #5393]
-Wed Feb 18 00:41:31 1998 Yukihiro Matsumoto <matz@netlab.co.jp>
+Wed Oct 19 12:11:26 2011 Martin Bosslet <Martin.Bosslet@googlemail.com>
- * string.c (str_sub_s): needed to be mbchar aware to increment one
- character.
+ * ext/openssl/ossl_ssl.c: Remove set, but unused variables.
+ ext/openssl/ossl_pkey.c: ditto
- * regex.c (re_match): \Z matches newline just before the end of
- the string.
+ * ext/openssl/ossl_pkey_dh.c: Make functions passed to
+ rb_thread_blocking_region return VALUE instead of void.
+ ext/openssl/ossl_pkey_dsa.c: ditto
+ ext/openssl/ossl_pkey_rsa.c: ditto
-Tue Feb 17 00:04:32 1998 Yukihiro Matsumoto <matz@netlab.co.jp>
+Tue Oct 18 23:28:53 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * time.c (time_arg): Time.gm and Time.local now understands
- Time#to_a format.
+ * hash.c (identhash): share with type_numhash.
- * string.c (str_sub_s): replace happened twice for null pattern.
+ * st.c (st_hashtype_num): rename from type_numhash.
- * regex.c (re_search): null pattern should not match after newline
- at the end of string.
+Tue Oct 18 23:07:30 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * time.c (time_isdst): now returns boolean value.
+ * vm_core.h (ruby_current_thread): probeprofiler has been removed
+ long ago.
- * error.c (rb_check_type): treat special constants in messages.
+Tue Oct 18 23:05:49 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * parse.y (yylex): new form `::Const' to see toplevel constants.
+ * ext/ripper/eventids2.c (ripper_init_eventids2): separate
+ initializations of IDs and objects.
- * parse.y (cond): SEGV on `if ()'.
+ * ext/ripper/tools/generate.rb (generate_eventids1): ditto.
- * gc.c (obj_free): some data needed explicit free().
+ * parse.y (Init_ripper, InitVM_ripper): fix inversed roles.
-Mon Feb 16 23:55:40 1998 Yukihiro Matsumoto <matz@netlab.co.jp>
+Sun Oct 16 19:46:16 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * eval.c (blk_free): release duplicated block informations.
+ * ext/bigdecimal/bigdecimal.gemspec (files): fixed typo, and
+ removed nonexistent file.
- * eval.c (blk_copy_prev): duplicate outer block information into
- the heap, when proc/binding created.
+ * ext/bigdecimal/bigdecimal.gemspec (homepage): added.
-Mon Feb 16 14:38:25 1998 Yukihiro Matsumoto <matz@netlab.co.jp>
+ * ext/io/console/io-console.gemspec (homepage): ditto.
- * time.c (time_mon): now 1 for January and so on.
+Fri Oct 14 12:13:57 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * time.c (time_year): year in 19xx (no + 1900 needed anymore).
+ * ext/pty/pty.c (pty_check): should return nil until the child
+ terminates or stops. [ruby-dev:44600] [Bug #2642]
-Mon Feb 16 13:28:33 1998 Yukihiro Matsumoto <matz@netlab.co.jp>
+Fri Oct 14 11:19:37 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * regex.c (re_compile_pattern): need to fetch mbchar's second byte
- without translation.
+ * include/ruby/intern.h (rb_ary_rotate): export.
-Mon Feb 16 12:29:27 1998 MAEDA shugo <shugo@po.aianet.ne.jp>
+Fri Oct 14 05:58:05 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * eval.c (f_pass_block): pass iterator block to other method.
+ * atomic.h (ATOMIC_INC, ATOMIC_DEC): return old values.
+ [ruby-dev:44596] [Bug #5439]
-Fri Feb 13 08:16:11 1998 Yukihiro Matsumoto <matz@netlab.co.jp>
+ * signal.c (ruby_atomic_exchange): no needs to define on the
+ platforms where atomic.h is available.
- * parse.y (parse_regx): handle \s before read_escape().
+Thu Oct 13 19:29:40 2011 Naohisa Goto <ngotogenome@gmail.com>
- * parse.y (read_escape): `\s' in strings as space.
+ * atomic.h (ATOMIC_*): use atomic_ops(3C) when SunStudio on Solaris.
+ [ruby-dev:44596] [Bug #5439]
-Tue Feb 10 17:29:08 1998 Yukihiro Matsumoto <matz@netlab.co.jp>
+Thu Oct 13 18:13:04 2011 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
- * version 1.1b7 released.
+ * atomic.h(ATOMIC_SET): add cast to void to prevent misuse.
+ [ruby-dev:44596] [Bug #5439]
- * string.c (str_aset): string insertion by `str[n] = str2'.
+Thu Oct 13 18:04:27 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * string.c (str_oct): does recognize `0x'.
+ * gc.c (rb_gc_finalize_deferred, rb_objspace_call_finalizer):
+ should use ATOMIC_EXCHANGE() to check the previous value.
+ [ruby-dev:44596] [Bug #5439]
- * sprintf.c (f_sprintf): use base 10 for conversion from string to
- integer.
+Wed Oct 12 23:39:58 2011 Hiroshi Nakamura <nahi@ruby-lang.org>
-Mon Feb 9 14:51:56 1998 Yukihiro Matsumoto <matz@netlab.co.jp>
+ * test/openssl/test_ssl.rb: Move duplicated tests for SSL::Session to
+ test_ssl_session.rb
- * numeric.c (do_coerce): proper error message.
+Tue Oct 11 08:49:40 2011 Eric Hodel <drbrain@segment7.net>
- * string.c (str_sum): bug - masked by wrong value. (sigh..)
+ * array.c (rb_ary_initialize): Improve explanation of Array.new
+ parameters. Patch by Alvaro Pereyra Rabanal. [Ruby 1.9 - Bug #5425]
+ * array.c (rb_ary_s_try_convert): Fix typo (try => tries)
+ * array.c (rb_ary_rindex): Add spacing for block.
+ * array.c (rb_ary_uniq_bang): Describe block
+ * array.c (rb_ary_uniq): ditto
-Sat Feb 7 15:11:14 1998 Yukihiro Matsumoto <matz@netlab.co.jp>
+Tue Oct 11 07:55:38 2011 Eric Hodel <drbrain@segment7.net>
- * string.c (str_empty): new method
+ * array.c: Add a description to Array, minor cleanups. Patch by
+ Andrea Singh. [Ruby 1.9 - Bug #5412]
-Fri Feb 6 01:42:15 1998 Yukihiro Matsumoto <matz@netlab.co.jp>
+Tue Oct 11 06:09:52 2011 Eric Hodel <drbrain@segment7.net>
- * time.c (time_asctime): use asctime(3), not strftime(3).
+ * lib/pp.rb: Move PP documentation to top of class PP. Patch by
+ Sylvain Daubert. [Ruby 1.9 - Bug #5430]
-Thu Feb 5 18:58:46 1998 Yukihiro Matsumoto <matz@netlab.co.jp>
+Tue Oct 11 06:06:29 2011 Eric Hodel <drbrain@segment7.net>
- * io.c (io_fptr_close): do not free path on close().
+ * ext/coverage/coverage.c (Init_coverage): Change list format and
+ describe Coverage.result output. Patch by Sylvain Daubert.
+ [Ruby 1.9 - Bug #5428]
- * array.c (ary_filter): new method.
+Tue Oct 11 05:53:23 2011 Eric Hodel <drbrain@segment7.net>
- * enum.c (enum_each_with_index): new method.
+ * object.c (Init_Object): Add reference to BasicObject, brief
+ explanation of constant lookup. Based on patch by Alvaro Pereyra
+ Rabanal.
+ [Ruby 1.9 - Bug #5426]
-Thu Feb 5 14:10:35 1998 Yukihiro Matsumoto <matz@netlab.co.jp>
+Sun Oct 9 11:06:52 2011 Kazuki Tsujimoto <kazuki@callcc.net>
- * parse.y (primary): singleton class def can be appeared inside
- method bodies.
+ * test/psych/test_yamldbm.rb: don't run test if the system
+ don't support yaml/dbm.
- * hash.c (hash_replace): replace content.
+ * test/syck/test_yamldbm.rb: ditto.
- * string.c (str_replace_method): replace content.
+Sat Oct 8 08:54:56 2011 Eric Hodel <drbrain@segment7.net>
- * array.c (ary_replace_method): replace elements.
+ * enum.c (group_by): Improve group_by description. Patch by b t.
+ [#5411]
- * string.c (str_succ_bang): String#succ!
+Sat Oct 8 03:17:51 2011 Eric Hodel <drbrain@segment7.net>
-Thu Feb 5 18:20:30 1998 WATANABE Hirofumi <watanabe@ase.ptg.sony.co.jp>
+ * lib/shell.rb: Document some methods of Shell. Patch by Carol
+ Nichols. [Ruby 1.9 - Bug #5417]
- * string.c (str_upcase_bang): multi byte character support.
+Fri Oct 7 17:54:28 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Wed Feb 4 13:55:26 1998 Yukihiro Matsumoto <matz@netlab.co.jp>
+ * lib/test/unit/assertions.rb (assert_send, assert_not_send):
+ parenthesize non-empty arguments.
- * array.c (ary_reverse): SEGV on empty array reverse.
+Fri Oct 7 06:35:50 2011 Eric Hodel <drbrain@segment7.net>
-Tue Feb 3 12:24:07 1998 Yukihiro Matsumoto <matz@netlab.co.jp>
+ * array.c: Use + for arguments described in documentation to allow
+ rdoc -C2 to work better. Remove <code> from method references to
+ allow cross-references in HTML documentation.
- * re.c (match_to_a): non matching element should be nil.
+Thu Oct 6 18:46:23 2011 Kazuhiro NISHIYAMA <zn@mbf.nifty.com>
- * ruby.c (ruby_load_script): load script after all initialization.
+ * vm_eval.c (make_no_method_exception): fix typo.
- * bignum.c (str2inum): need to interpret prefix `0' of `0x'.
+ * vm_insnhelper.c, vm_insnhelper.h: ditto.
-Tue Feb 3 10:00:18 1998 WATANABE Hirofumi <watanabe@ase.ptg.sony.co.jp>
+Thu Oct 6 16:29:30 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * numeric.c (fix_rshift): use `sizeof(INT)*8' instead of 32.
+ * vm_eval.c (make_no_method_execption): extract from
+ raise_method_missing().
-Mon Feb 2 14:09:24 1998 Yukihiro Matsumoto <matz@netlab.co.jp>
+ * vm_eval.c (send_internal): remove inadvertent symbol creation
+ from public_send. based on a patch by Jeremy Evans <code AT
+ jeremyevans.net> in [ruby-core:38576]. [Feature #5112]
- * ruby.c (set_arg0): grab environment region too.
+ * vm_insnhelper.c (vm_call_method): remove inadvertent symbol
+ creation from send and __send__, too.
-Thu Jan 29 18:36:25 1998 WATANABE Hirofumi <watanabe@ase.ptg.sony.co.jp>
+Thu Oct 6 14:59:11 2011 Eric Hodel <drbrain@segment7.net>
- * process.c (rb_proc_exec): check `sh' to be exist.
+ * lib/time.rb: Clean up Time documentation. Patch by Jake Goulding.
+ [Ruby 1.9 - Bug #5416]
-Thu Jan 29 18:18:19 1998 Yukihiro Matsumoto <matz@netlab.co.jp>
+Thu Oct 6 10:00:54 2011 Eric Hodel <drbrain@segment7.net>
- * io.c (io_stdio_set): assignment to $stdin or $stdout does
- reopen() as well as $stderr.
+ * enum.c (group_by): Improve documentation based on patch by b t.
-Thu Jan 29 14:18:40 1998 Yukihiro Matsumoto <matz@netlab.co.jp>
+Thu Oct 6 09:56:30 2011 Eric Hodel <drbrain@segment7.net>
- * class.c (mod_ancestors): should not include singleton classes.
+ * enum.c: Clean up wording in Enumerable documentation. Patch by b t.
+ [Ruby 1.9 - Bug #5411]
- * object.c (obj_type): should not return internal class.
+Thu Oct 6 09:17:18 2011 Eric Hodel <drbrain@segment7.net>
- * io.c (io_reopen): unwillingly closes stdio streams.
+ * time.c (Init_Time): Remove editorial comments from Time
+ documentation, fix link.
-Thu Jan 29 11:50:35 1998 Toshihiko SHIMOKAWA <toshi@csce.kyushu-u.ac.jp>
+Thu Oct 6 09:14:20 2011 Eric Hodel <drbrain@segment7.net>
- * ext/socket/socket.c (udp_addrsetup): forgot to use htons().
+ * time.c (Init_Time): Improve Time documentation. Patch by Shane
+ Emmons. [Ruby 1.9 - Bug #5404]
+ * lib/time.rb: Improve time.rb documentation including Time.strptime.
+ Patch by Shane Emmons. [Ruby 1.9 - Bug #5402]
-Tue Jan 27 23:15:24 1998 Yukihiro Matsumoto <matz@netlab.co.jp>
+Thu Oct 6 08:54:05 2011 Eric Hodel <drbrain@segment7.net>
- * keywords: __FILE__, __LINE__ are available again.
+ * random.c: Improve documentation of Random. Patch by Gregory
+ Parkhurst. [Ruby 1.9 - Bug #5410]
-Fri Jan 23 14:19:28 1998 Yukihiro Matsumoto <matz@netlab.co.jp>
+Thu Oct 6 01:44:51 2011 CHIKANAGA Tomoyuki <nagachika00@gmail.com>
- * version 1.1b6 released.
+ * cont.c (cont_mark): mark original Thread object from saved_thread.
+ [ruby-dev:44571] [Bug #5386]
- * object.c (mod_to_s): need to duplicate classpath.
+Wed Oct 5 16:33:04 2011 NARUSE, Yui <naruse@ruby-lang.org>
- * error.c (exc_inspect): need to duplicate classpath.
+ * vm_insnhelper.c (vm_call_cfunc): remove useless hack.
-Thu Jan 22 00:37:47 1998 Yukihiro Matsumoto <matz@netlab.co.jp>
+Wed Oct 5 05:56:39 2011 Eric Hodel <drbrain@segment7.net>
- * ruby.h (STR2CSTR): new macro to retrieve char*.
+ * hash.c (Init_Hash): Improve Hash documentation. Patch by Alvaro
+ Pereyra Rabanal. [Ruby 1.9 - Bug #5405]
- * class.c (rb_define_method): `initialize' should always be
- private, even if it defined by C extensions.
+Wed Oct 5 05:47:59 2011 Eric Hodel <drbrain@segment7.net>
- * eval.c (rb_eval): `initialize' should always be private.
+ * random.c (Init_Random): Add a top-level comment for Random. Patch
+ by Brett Bim. [Ruby 1.9 - Bug #5403]
-Thu Jan 22 16:21:08 1998 Yukihiro Matsumoto <matz@netlab.co.jp>
+Wed Oct 5 02:50:27 2011 Aaron Patterson <aaron@tenderlovemaking.com>
- * eval.c (rb_eval): some singleton class def cause SEGV.
+ * ext/psych/lib/psych/syntax_error.rb: Add file, line, offset, and
+ message attributes during parse failure.
+ * ext/psych/parser.c: Update parser to raise exception with correct
+ values.
+ * test/psych/test_exception.rb: corresponding tests.
- * eval.c (TMP_ALLOC): replace ALLOCA_N, where thread context
- switch may happen.
+Wed Oct 5 01:52:16 2011 Aaron Patterson <aaron@tenderlovemaking.com>
-Wed Jan 21 01:43:42 1998 Yukihiro Matsumoto <matz@netlab.co.jp>
+ * ext/psych/parser.c (parse): Use context_mark for indicating error
+ line and column.
- * eval.c (PUSH_FRAME): do not use ALLOCA_N(). crash on some
- platforms that use missing/alloca.c.
+Wed Oct 5 01:22:08 2011 Aaron Patterson <aaron@tenderlovemaking.com>
- * regex.c (re_compile_pattern): too many pops for non register
- subexpr.
+ * ext/psych/lib/psych/scalar_scanner.rb: use normal begin / rescue
+ since postfix rescue cannot receive the exception class. Thanks
+ nagachika!
- * parse.y (yylex): open parentheses after identifiers are argument
- list, even if whitespaces have seen.
+Tue Oct 4 21:10:08 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Tue Jan 20 15:19:59 1998 Yukihiro Matsumoto <matz@netlab.co.jp>
+ * class.c (class_alloc): allocate extra memory after containing
+ object setup to get rid of rare-but-potential memory leak.
- * parse.y (terms): quoted word list by %w(a b c).
+ * gc.c (gc_mark_children): skip marking extended members if ptr is
+ NULL.
- * ext/tcltklib/extconf.rb: more accurate check for tcl/tk libs.
+Tue Oct 4 16:17:50 2011 NARUSE, Yui <naruse@ruby-lang.org>
- * file.c (rb_stat): most of the FileTest methods (and function
- `test') accept File objects as the argument.
+ * lib/time.rb (Time.strptime): use Time.at if d[:seconds] is set.
+ Reported by Christopher Eberz. [ruby-core:39903] Bug #5399
-Tue Jan 19 18:19:24 1998 WATANABE Hirofumi <watanabe@ase.ptg.sony.co.jp>
+Tue Oct 4 11:44:10 2011 NARUSE, Yui <naruse@ruby-lang.org>
- * ext/extmk.rb.in (install): there should be no newline after install:
+ * gc.c (rb_gc_set_params): ruby_verbose can be Qnil, so use RTEST.
- * re.c (MIN): renamed from min(). there's a local variable named
- min in the file, so that some cpp will raise an error.
+Tue Oct 4 08:33:41 2011 Eric Hodel <drbrain@segment7.net>
-Mon Jan 19 16:30:05 1998 Yukihiro Matsumoto <matz@netlab.co.jp>
+ * ext/etc/etc.c: Document Etc, Etc.sysconfdir, Etc.systmpdir. Patch
+ by mathew murphy. [Ruby 1.9 - Bug #5396]
- * version 1.1b5 released.
+Tue Oct 4 08:21:51 2011 Eric Hodel <drbrain@segment7.net>
- * process.c (rb_syswait): no exception raised.
+ * lib/shellwords.rb: Update toplevel comment with an example. Patch
+ by Samnang Chhun. [Ruby 1.9 - Bug #5388]
-Fri Jan 16 00:43:43 1998 Yukihiro Matsumoto <matz@netlab.co.jp>
+Tue Oct 4 08:15:50 2011 Eric Hodel <drbrain@segment7.net>
- * ruby.h (CLONESETUP): copies its singleton classes too.
+ * proc.c (proc_call): Update documentation to match argument handling
+ of proc/Proc.new/lambda/->()
- * class.c (singleton_class_attached): saves binded object in the
- singleton classes.
+Tue Oct 4 07:59:16 2011 Eric Hodel <drbrain@segment7.net>
- * eval.c (rb_eval): calls singleton_method_added even in the
- singleton class clauses.
+ * proc.c (proc_call): Fix documentation of Proc#call vs Proc#===.
+ [Ruby 1.9 - Bug #5349]
-Fri Jan 15 23:22:43 1998 WATANABE Hirofumi <watanabe@ase.ptg.sony.co.jp>
+Tue Oct 4 07:43:18 2011 Eric Hodel <drbrain@segment7.net>
- * ruby.c (proc_options): -S does not recognize PATH.
+ * array.c (rb_ary_initialize): Make Array.new description match
+ call-seq. Patch by Henry Maddocks. [Ruby 1.9 - Bug #5344]
-Thu Jan 15 02:03:12 1998 Yukihiro Matsumoto <matz@netlab.co.jp>
+Tue Oct 4 07:35:23 2011 Eric Hodel <drbrain@segment7.net>
- * eval.c (rb_clear_cache_by_id): clear only affected cache
- entries.
+ * array.c (rb_ary_initialize): Add output for examples. Patch by
+ Jonathan Mukai. [Ruby 1.9 - Bug #5216]
-Wed Jan 14 02:14:48 1998 Yukihiro Matsumoto <matz@netlab.co.jp>
+Tue Oct 4 07:30:50 2011 Eric Hodel <drbrain@segment7.net>
- * ext/socket/socket.c: new UDP/IP socket classes.
+ * array.c (rb_ary_s_create): Add example results for Array::[]. Patch
+ by Jonathan Mukai. [Ruby 1.9 - Bug #5215]
-Tue Jan 13 10:00:18 1998 Yukihiro Matsumoto <matz@netlab.co.jp>
+Tue Oct 4 07:15:17 2011 Eric Hodel <drbrain@segment7.net>
- * string.c (str_cmp): ignorecase($=) works wrong.
+ * lib/rubygems: Update to RubyGems 1.8.11. Move Deprecate into the
+ Gem namespace.
-Fri Jan 9 13:19:55 1998 Yukihiro Matsumoto <matz@netlab.co.jp>
+Tue Oct 4 06:43:47 2011 Aaron Patterson <aaron@tenderlovemaking.com>
- * version 1.1b4 released.
+ * ext/psych/lib/psych.rb: update psych version.
+ * ext/psych/psych.gemspec: generate new gemspec for new version.
- * eval.c (f_missing): class name omitted from the error message.
+Tue Oct 4 06:29:55 2011 Aaron Patterson <aaron@tenderlovemaking.com>
- * error.c (exc_inspect): description changed.
+ * ext/psych/lib/psych.rb: calling `yaml` rather than `to_yaml`.
+ * ext/psych/lib/psych/nodes/node.rb: Rename `to_yaml` to just `yaml`
+ in order to avoid YAML::ENGINE switching from replacing this method.
+ * test/psych/helper.rb: fix tests for method name change.
+ * test/psych/test_document.rb: ditto
+ * test/psych/visitors/test_emitter.rb: ditto
- * string.c (Init_String): GlobalExit's superclass did not filled,
- since GlobalExit created earlier than String.
+Tue Oct 4 06:20:19 2011 Aaron Patterson <aaron@tenderlovemaking.com>
-Thu Jan 8 12:10:09 1998 Yukihiro Matsumoto <matz@netlab.co.jp>
+ * ext/psych/lib/psych/scalar_scanner.rb: Match values against the
+ floating point spec defined in YAML to avoid erroneous parses.
+ * test/psych/test_numeric.rb: corresponding test.
- * parse.y (aryset): expr in the brackets can be null.
+Tue Oct 4 05:59:24 2011 Aaron Patterson <aaron@tenderlovemaking.com>
-Wed Jan 7 21:13:56 1998 Yukihiro Matsumoto <matz@netlab.co.jp>
+ * ext/psych/lib/psych/visitors/to_ruby.rb: ToRuby visitor can be
+ constructed with a ScalarScanner.
+ * ext/psych/lib/psych/visitors/yaml_tree.rb: ScalarScanner can be
+ passed to the YAMLTree visitor.
- * io.c (io_reopen): keep stderr unclosed.
+Tue Oct 4 05:47:23 2011 Aaron Patterson <aaron@tenderlovemaking.com>
- * io.c (io_errset): keep stderr unclosed.
+ * ext/psych/lib/psych/visitors/to_ruby.rb: Define Regexp::NOENCODING
+ for 1.9.2 backwards compatibility.
+ * ext/psych/lib/psych/visitors/yaml_tree.rb: Fix Date string
+ generation for 1.9.2 backwards compatibility.
-Tue Jan 6 00:27:43 1998 Yukihiro Matsumoto <matz@netlab.co.jp>
+Mon Oct 3 23:56:39 2011 CHIKANAGA Tomoyuki <nagachika00@gmail.com>
- * parse.y: syntax modified for `while expr do .. end' etc.
+ * gc.c (rb_gc_set_params): output GC parameter change messages only
+ if -w/-v options are specified. these messages are output to stderr,
+ not to stdout. [ruby-core:39795] [Bug #5380]
- * process.c (f_exec,f_system): can supply arbitrary name for the
- new process.
+ * test/ruby/test_gc.rb (test_gc_parameter): add test for it.
-Mon Jan 5 16:59:13 1998 WATANABE Hirofumi <watanabe@ase.ptg.sony.co.jp>
+Sun Oct 2 20:05:32 2011 Kazuki Tsujimoto <kazuki@callcc.net>
- * file.c (file_s_basename): removes any extension by ".*".
+ * vm.c (rb_thread_mark), cont.c (cont_mark): revert r33369 and r33371
+ that may cause SEGV in certain environments.
-Sun Jan 4 19:36:22 1998 WATANABE Hirofumi <watanabe@ase.ptg.sony.co.jp>
+Sun Oct 2 12:14:06 2011 Ayumu AIZAWA <ayumu.aizawa@gmail.com>
- * parse.y (yylex): needed to update lex_p (reading point).
+ * test/psych/test_yamldbm.rb: add test case.
+ * test/syck/test_yamldbm.rb: ditto.
-Sat Jan 3 19:14:14 1998 WATANABE Hirofumi <watanabe@ase.ptg.sony.co.jp>
+Sun Oct 2 11:28:09 2011 Aaron Patterson <aaron@tenderlovemaking.com>
- * class.c,object.c: duplicate defines mKernel and cFinxnum.
+ * lib/yaml/store.rb: make initialize method signature match the
+ superclass signature.
-Fri Jan 2 20:38:59 1998 Yukihiro Matsumoto <matz@netlab.co.jp>
+Sun Oct 2 10:44:01 2011 Kazuki Tsujimoto <kazuki@callcc.net>
- * ext/curses/curses.c (NUM2CHAR): uses the first character for
- string arguments.
+ * io.c: fix documentation of ARGF.lineno=.
- * array.c (ary_fill): did not extend array for ranges.
+Sat Oct 1 20:03:19 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * array.c (beg_len): did not return end pos bigger than size.
+ * lib/mkmf.rb (have_framework): try as Objective-C.
+ https://twitter.com/nagachika/status/120294447660539904
-Fri Jan 2 02:09:16 1998 WATANABE Hirofumi <watanabe@ase.ptg.sony.co.jp>
+Sun Oct 2 08:43:25 2011 Kazuki Tsujimoto <kazuki@callcc.net>
- * dir.c (dir_s_chdir): bug in nil check.
+ * vm.c (rb_thread_mark), cont.c (cont_mark): self pointer should not
+ be marked by itself. Patch by Koichi Sasada.
+ [ruby-dev:44567] [Bug #5386]
- * array.c (ary_fill): bug in nil check.
+Sun Oct 2 00:42:14 2011 Kazuki Tsujimoto <kazuki@callcc.net>
-Tue Dec 30 11:46:23 1997 Yukihiro Matsumoto <matz@netlab.co.jp>
+ * vm.c (rb_thread_mark): rb_thread_t needs self to be marked.
+ [ruby-dev:44566] [Bug #5386]
- * hash.c (env_path_tainted): checks directories in PATH
- environment variable are not world writable.
+Sat Oct 1 09:48:53 2011 CHIKANAGA Tomoyuki <nagachika00@gmail.com>
- * ruby.c (load_file): invoke specified interpreter if the #! line
- does not contain the word `ruby'.
+ * gc.c (add_heap_slots, init_heap): reset heaps_inc zero when
+ heap slots are expanded by environment variable RUBY_HEAP_MIN_SLOTS.
+ [ruby-core:39777] [Bug #5380]
-Fri Dec 26 03:26:41 1997 Yukihiro Matsumoto <matz@netlab.co.jp>
+ * test/ruby/test_gc.rb (test_gc_parameter): add test for it.
- * string.c (uscore_get): type information included in the error
- message.
+ * test/ruby/envutil.rb (assert_normal_exit): add :child_env option to
+ enable pass environment variables to child process.
- * variable.c (f_untrace_var): does not free trace-data within
- trace procedure.
+Thu Sep 29 13:17:51 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Thu Dec 25 02:50:29 1997 Yukihiro Matsumoto <matz@netlab.co.jp>
+ * array.c (ary_join_1): should not copy the encoding of non-string
+ element after string element. [ruby-core:39776] [Bug #5379]
- * version 1.1b3 released.
+Thu Sep 29 11:53:56 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * ruby.h: inlining some functions on gcc 2.x
+ * gc.c (slot_sweep, rb_gc_finalize_deferred)
+ (rb_objspace_call_finalizer, rb_gc): run finalizers
+ sequentially. [ruby-dev:44562]
-Tue Dec 23 02:47:33 1997 Yukihiro Matsumoto <matz@netlab.co.jp>
+Thu Sep 29 20:37:38 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * eval.c (rb_eval): public/private information kept in the current
- scope, to remove undesired state from the class/module.
+ * ext/gdbm/gdbm.c (rb_gdbm_fatal): adjust argument type.
- * time.c (time_strftime): remove hidden limit of 100 bytes of
- result string, using malloc'ed buffer.
+Thu Sep 29 20:10:42 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * hash.c (hash_update): merges the contents of another hash,
- overriding existing keys.
+ * gc.c (is_id_value, is_live_object): extract from id2ref().
- * regex.c (must_instr): totally re-written.
+ * gc.c (run_finalizer): use object instead of object id.
- * io.c (read_all): try to allocate proper sized buffer using
- fstat(2) for speedup.
+Thu Sep 29 20:07:36 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Sat Dec 20 00:27:28 1997 Yukihiro Matsumoto <matz@netlab.co.jp>
+ * use RB_TYPE_P which is optimized for constant types, instead of
+ comparison with TYPE.
- * regex.c (must_instr): need to skip 2 bytes for mbchars.
+Wed Sep 28 09:20:37 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Fri Dec 19 01:18:29 1997 Yukihiro Matsumoto <matz@netlab.co.jp>
+ * configure.in (pthread_np.h): needs pthread.h to be included
+ previously on OpenBSD. a patch by George Koehler <xkernigh AT
+ netscape.net> at [ruby-core:39752]. [Bug #5376]
- * version 1.1b2 released.
+Wed Sep 28 04:41:35 2011 Ayumu AIZAWA <ayumu.aizawa@gmail.com>
- * eval.c (check_errat): check and convert (if necessary) traceback
- information before assigning to the variable $@.
+ * test/psych/test_yamlstore.rb: use tmpdir for tmpfile.
+ * test/syck/test_yamlstore.rb: ditto.
- * eval.c (f_raise): optional third argument to specify traceback
- information.
+Wed Sep 28 04:10:46 2011 Ayumu AIZAWA <ayumu.aizawa@gmail.com>
- * io.c (f_open): prevent infinite recursive call.
+ * ext/bigdecimal/README: update report to.
-Thu Dec 18 19:33:47 1997 Yukihiro Matsumoto <matz@netlab.co.jp>
+Tue Sep 28 04:05:00 2011 Kenta Murata <mrkn@mrkn.jp>
- * string.c (str_rindex): now accepts regexp as index.
+ * ext/bigdecimal/bigdecimal_en.html: removed because this file isn't
+ maintained now.
-Thu Dec 18 18:42:50 1997 WATANABE Hirofumi <watanabe@ase.ptg.sony.co.jp>
+ * ext/bigdecimal/bigdecimal_ja.html: ditto.
- * ext/socket/extconf.rb: modified to detect win32 socket lib.
+Tue Sep 27 09:55:40 2011 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
-Thu Dec 18 00:25:03 1997 Yukihiro Matsumoto <matz@netlab.co.jp>
+ * thread_pthread.c: make native_fd_select().
+ * thread.c (do_select): remove #ifdef _WIN32. Instead, use
+ native_fd_select() always.
- * re.c (reg_equal): checks for source and casefold and kcode matching.
+Tue Sep 27 09:44:59 2011 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
- * marshal.c: became built-in module.
+ * thread.c (do_select): remove cygwin specific hack. It's layer
+ violation and too large hack.
+ * thread.c (cmp_tv, subtract_tv): removed.
- * ext/marshal/marshal.c (r_object): displays struct name for
- non-compatible struct.
+Tue Sep 27 03:50:19 2011 Ayumu AIZAWA <ayumu.aizawa@gmail.com>
- * string.c (str_index_method): now searches character (fixnum) in
- the string.
+ * test/rexml/test_sax.rb: add require 'rexml/document'.
- * string.c (str_include): redefine `include?'.
+Tue Sep 27 03:32:27 2011 Ayumu AIZAWA <ayumu.aizawa@gmail.com>
- * regex.c (re_match): start_nowidth saves current stack position
- to stop_nowidth.
+ * test/psych/test_yamldbm.rb: fix #setup and #teardown.
+ [Bug #5370] [ruby-core:39730]
+ * test/syck/test_yamldbm.rb: ditto.
- * regex.c (re_compile_pattern): add space to stop_nowidth to save
- runtime stack position.
+Mon Sep 26 11:27:38 2011 NARUSE, Yui <naruse@ruby-lang.org>
-Tue Dec 16 14:57:43 1997 Yukihiro Matsumoto <matz@netlab.co.jp>
+ * lib/webrick/httputils.rb: Add MIME Type definition of .js and .svg.
+ patched by Hal Brodigan. [ruby-core:39704] [Bug #5365]
- * string.c (scan_once): wrong exception for regexp that match with
- null string (use substr instead of subseq).
+Mon Sep 26 09:20:44 2011 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
-Sat Dec 13 00:13:32 1997 Yukihiro Matsumoto <matz@netlab.co.jp>
+ * configure.in: remove DJGPP support. It's not longer supported
+ since ruby 1.9.0.
- * parse.y (expr): remove bare assocs from expr rule.
+Mon Sep 26 09:07:46 2011 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
- * rbconfig.rb: renamed from config.rb (it was too generic name).
+ * include/ruby/defines.h: remove NextStep, OpenStep, Rhapsody
+ support. Last activity of their OSes are 7 years ago.
+ * configure.in: ditto.
+ * dir.c: ditto.
+ * ext/tk/extconf.rb: ditto.
-Fri Dec 12 00:50:25 1997 Yukihiro Matsumoto <matz@netlab.co.jp>
+Mon Sep 26 09:02:49 2011 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
- * parse.y (expr): warns if BEGIN or END appear in the method
- bodies.
+ * configure.in: remove a code for human68k. it's no longer
+ supported since r19677.
- * string.c (str_match): calls y =~ x if y is neither String nor
- Regexp so that eregex.rb works.
+Sun Sep 25 23:43:32 2011 Martin Bosslet <Martin.Bosslet@googlemail.com>
- * eval.c (f_at_exit): to register end proc.
+ * ext/openssl/ossl_asn1.c: fix int_ossl_asn1_decode0_cons when being
+ fed arbitrary string values.
+ Clearly distinguish between the cases "universal, infinite and
+ not a SEQUENCE or SET" and "universal SEQUENCE or SET, possibly
+ infinite". Raise error for universal tags that are not infinite.
+ * test/openssl/test_asn1.rb: add a test for this.
- * class.c (rb_define_module_function): define 'function' method
- for the Module, not private method.
+ Thanks to Hiroshi Yoshida for reporting this bug.
+ [Bug #5363] [ruby-dev:44542]
- * class.c (rb_define_function): function to define `function' method.
+Sun Sep 25 20:57:18 2011 Ayumu AIZAWA <ayumu.aizawa@gmail.com>
- * eval.c (rb_eval): inherit visibility from superclass's method
- except when it is set to `function'
+ * test/syck/test/yamldbm.rb: add test for Syck::DBM.
+ * test/psych/test_yamldbm.rb: add test for Psych::DBM.
+ * test/psych/test_yamlstore.rb: add test for Psych::PStore.
- * eval.c (rb_eval): new visibility status `function'.
+Sun Sep 25 20:54:10 2011 Ayumu AIZAWA <ayumu.aizawa@gmail.com>
- * parse.y (yycompile): do not clear eval_tree. thus enable multiple
- command line script by option `-e'.
+ * lib/yaml/dbm/dbm.rb: fix #update, add #key for using instead #index.
+ [Bug #5305][ruby-dev:44485]
- * eval.c (rb_eval): END execute just once.
+Sun Sep 25 16:54:33 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * parse.y (expr): BEGIN/END built in the syntax.
+ * encoding.c (require_enc): reject only loading from untrusted
+ load paths. [ruby-dev:44541] [Bug #5279]
-Thu Dec 11 13:14:35 1997 Yukihiro Matsumoto <matz@netlab.co.jp>
+ * transcode.c (load_transcoder_entry): ditto.
- * object.c (mod_le): Module (or Class) comparison.
+Sun Sep 25 16:45:05 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * eval.c (rb_remove_method): raises NameError if named method does
- not exist.
+ * configure.in: ignore all warnings from an arbitrary
+ header in /usr/local/include.
- * ext/curses/curses.c: remove CHECK macro for BSD curses.
-
-Thu Dec 11 12:44:01 1997 WATANABE Hirofumi <watanabe@ase.ptg.sony.co.jp>
+Sun Sep 25 03:43:03 2011 NARUSE, Yui <naruse@ruby-lang.org>
- * pack.c: sun4 cc patch
+ * enum.c (slice_before_i): use rb_attr_get to suppress wrong warning
+ for internal instance variable slicebefore_initial_state.
-Wed Dec 10 15:21:36 1997 Yukihiro Matsumoto <matz@netlab.co.jp>
+Fri Sep 23 14:20:14 2011 Martin Bosslet <Martin.Bosslet@googlemail.com>
- * ext/marshal/marshal.c (marshal_load): can supply evolution proc
- object as optional second argument.
+ * ext/openssl/ossl_asn1.c: remove unused variable.
- * re.c (reg_source): get source string of the regular expression.
+Fri Sep 23 13:46:59 2011 Martin Bosslet <Martin.Bosslet@googlemail.com>
-Tue Dec 9 10:05:17 1997 Yukihiro Matsumoto <matz@netlab.co.jp>
+ * test/openssl/test_ssl_session.rb: execute test_session_exts_read
+ only for OpenSSL versions >= 0.9.8k. Thanks, Eric Wong, for
+ reporting this.
+ [Bug #4961] [ruby-core:37726]
- * version 1.1b1 released.
+Fri Sep 23 11:59:08 2011 Martin Bosslet <Martin.Bosslet@googlemail.com>
- * parse.y (tokadd): token buffer overrun.
+ * test/openssl/test_ssl_session.rb: ensure server calls callbacks in
+ test_ctx_server_session_cb. Thanks to Eric Wong for the patch.
+ [Bug #5336] [ruby-core:39619]
- * ruby.c (ruby_prog_init): forgot to protect rb_argv0 from gc.
+Thu Sep 22 02:53:19 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * eval.c (ruby_run): call finalizers at process termination.
+ * vm_insnhelper.c (vm_call_cfunc): suppress a warning. note that
+ `volatile type *var' doesn't make var itself volatile.
- * gc.c (gc_call_finalizer_at_exit): call free proc for every Data
- Wrapper, and finalizer for specified objects at termination.
+Thu Sep 22 01:52:48 2011 CHIKANAGA Tomoyuki <nagachika00@gmail.com>
- * version.c (show_version): version format changed.
+ * thread_pthread.c (ubf_select): activate timer thread when interrupt
+ blocking thread.
+ A patch created by Koichi Sasada. [ruby-core:39634] [Bug #5343]
+ to cover race condition, timer thread periodically send SIGVTARLM to
+ threads in signal thread list. so you should activate timer thread
+ when interrupt a thread.
- * regex.c (re_match): wrong match with non-greedy if they appear
- more than once in regular expressions.
+Wed Sep 21 16:55:26 2011 NAKAMURA Usaku <usa@ruby-lang.org>
- * sample/ruby-mode.el (ruby-expr-beg): forgot to handle modifiers.
+ * test/io/wait/test_io_wait.rb (TestIOWait#setup): of course, the
+ behavior of mingw is just same with mswin.
-Mon Dec 8 19:00:15 1997 Yukihiro Matsumoto <matz@netlab.co.jp>
+Tue Sep 20 18:08:51 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * io.c (io_puts): just put a newline if no argument given.
+ * vm_insnhelper.c (vm_get_cvar_base): reduce duplicated checks and
+ move a warning outside the loop.
- * ext/tcltklib/tcltklib.c (lib_mainloop): thread-aware tk handle
- when $tk_thread_safe is set.
+Mon Sep 19 18:55:51 2011 Ayumu AIZAWA <ayumu.aizawa@gmail.com>
- * ext/tcltklib/tcltklib.c (lib_mainloop): use Tcl_DoOneEvent()
- instead of Tk_MainLoop().
+ * lib/fileutils.rb (module FileUtils): improve performance of
+ FileUtils.compare_stream. a patch by Masaki Matsushita.
+ [Feature #5337] [ruby-core:39622]
-Mon Dec 6 07:11:16 1997 MAEDA shugo <shugo@po.aianet.ne.jp>
+Mon Sep 19 18:42:58 2011 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
- * io.c (io_puts): core dumped without any argument.
+ * test/-ext-/old_thread_select/test_old_thread_select.rb:
+ select() with timeout may return early in old Linux kernels
+ with 250 Hz tickrate and no dynticks, so skip everything older
+ than 2.6.32 (which has long term support).
+ And, Make the timing assertions consistently use assert_operator with
+ timing difference in error message
+ Patch by Eric Wong. [Bug #5335] [ruby-core:39618]
-Fri Dec 5 18:17:17 1997 Yukihiro Matsumoto <matz@netlab.co.jp>
+Mon Sep 19 09:28:06 2011 Eric Hodel <drbrain@segment7.net>
- * eval.c (mod_remove_method): remove (not undef) a method from the
- class/module.
+ * test/openssl/test_ssl.rb (class OpenSSL): Test
+ OpenSSL::SSL::SSLSocket#session and #session=.
- * variable.c (obj_remove_instance_variable): method to remove
- instance variables.
+Mon Sep 19 07:54:17 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Thu Dec 4 13:50:29 1997 Yukihiro Matsumoto <matz@netlab.co.jp>
+ * object.c (rb_obj_clone): singleton class should be attached
+ singleton object to. a patch by Satoshi Shiba <shiba AT rvm.jp>
+ at [ruby-dev:44460]. [Bug #5274]
- * version 1.1b0 released.
+Sat Sep 17 23:34:10 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * string.c (str_aref): called str_index for regexp.
+ * parse.y (parser_data_type): inherit the core type in ripper so
+ that checks in core would work. [ruby-core:39591] [Bug #5331]
-Mon Dec 1 15:24:41 1997 Yukihiro Matsumoto <matz@netlab.co.jp>
+Sat Sep 17 12:44:04 2011 Kazuki Tsujimoto <kazuki@callcc.net>
- * compar.c (cmp_between): wrong comparison made.
+ * lib/find.rb (Find.find): add documentation that Find.find
+ without block returns an enumerator.
-Wed Nov 26 18:18:05 1997 Yukihiro Matsumoto <matz@netlab.co.jp>
+Thu Sep 15 11:39:43 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * lib/mkmf.rb: generate Makefile for extension modules out of ruby
- source tree. use like `ruby -r mkmf extconf.rb'.
+ * gc.c (mark_entry, mark_key, mark_keyvalue): adjust callback
+ argument types.
- * numeric.c (fix2str): enlarge buffer to prevent overflow on some
- machines.
+Thu Sep 15 01:44:10 2011 Ayumu AIZAWA <ayumu.aizawa@gmail.com>
- * parse.y (here_document): wrong line number generated after here-doc.
+ * ext/tk/*: Change encoding from EUC-JP to UTF-8
-Fri Nov 21 13:17:12 1997 Yukihiro Matsumoto <matz@netlab.co.jp>
+Wed Sep 14 11:43:37 2011 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
- * parse.y (yylex): skip multibyte characters in comments.
+ * thread.c (rb_fd_rcopy): added an argument guard.
+ Patch by NAKAMURA Usaku. [Bug #5306] [ruby-core:39435]
-Wed Nov 19 17:19:20 1997 Yukihiro Matsumoto <matz@netlab.co.jp>
+Tue Sep 13 20:21:49 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * object.c (nil_to_a): nil.to_a => [].
+ * lib/pstore.rb, test/test_pstore.rb: suppress warnings with -v.
- * parse.y (call_args): wrong node generation.
+ * lib/pstore.rb (PStore): always open in binary mode even if
+ default encodings are set. [Bug #5311] [ruby-core:39503]
-Tue Nov 18 10:13:08 1997 Yukihiro Matsumoto <matz@netlab.co.jp>
+Tue Sep 13 05:37:15 2011 Yukihiro Matsumoto <matz@ruby-lang.org>
- * array.c (Init_Array): Array#=== works as Array#include?
+ * io.c (Init_IO): update BINARY comment. it should not change the
+ encoding of the result to ASCII-8BIT. [ruby-talk:387719]
- * regex.c (re_compile_pattern): insert initialize code for jump_n,
- before entering loops.
+Mon Sep 12 19:55:00 2011 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
- * re.c (reg_search): does not save registers unless $& etc appear
- in the script.
+ * thread.c (rb_thread_select): fix to ignore an argument
+ modification of rb_thread_fd_select().
+ based on a patch by Eric Wong. [Bug #5306] [ruby-core:39435]
+ * thread.c (rb_fd_rcopy): New. for reverse fd copy.
-Mon Nov 17 13:01:43 1997 Yukihiro Matsumoto <matz@netlab.co.jp>
+ * test/-ext-/old_thread_select/test_old_thread_select.rb
+ (test_old_select_false_positive): test for bug5306.
- * eval.c (is_defined): add defined? check for receivers and
- arguments for calls.
+ * ext/-test-/old_thread_select/old_thread_select.c (fdset2array):
+ New. convert fdsets to array.
+ * ext/-test-/old_thread_select/old_thread_select.c (old_thread_select):
+ return 'read', 'write', 'except' argument of rb_thread_select()
+ to ruby script.
- * re.c (reg_search): cache last match object.
+Mon Sep 12 13:38:12 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * re.c (match_aref): $[0] etc. are available.
+ * README.EXT, README.EXT.ja (2.2.2), parse.y (rb_check_id): add
+ documents for rb_check_id().
-Sat Nov 15 00:11:36 1997 WATANABE Hirofumi <watanabe@ase.ptg.sony.co.jp>
+Mon Sep 12 12:53:39 2011 NAKAMURA Usaku <usa@ruby-lang.org>
- * io.c (io_s_popen): "rb" detection
+ * lib/rake/file_list.rb (Rake::FileList#egrep): there is no need to
+ open files in binary mode.
+ see more details in https://github.com/jimweirich/rake/issues/74
-Fri Nov 14 18:28:40 1997 Yukihiro Matsumoto <matz@netlab.co.jp>
+Mon Sep 12 12:42:36 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * string.c (scan_once): returns whole match if the pattern does
- not contain any parentheses.
+ * test/ruby/test_exception.rb (TestException#test_exit_success_p):
+ assert also the cases when exiting with true and false.
-Thu Nov 13 14:39:06 1997 Yukihiro Matsumoto <matz@netlab.co.jp>
+ * lib/test/unit/assertions.rb (assert_send): make arguments in
+ the default message clearer.
- * string.c (str_sub): returns copy of the receiver string, even if
- any substitution occurred.
+Sun Sep 11 05:23:14 2011 Marc-Andre Lafortune <ruby-core@marc-andre.ca>
- * regex.c (re_compile_pattern): no-width match by (?=..), (?!..).
+ * lib/matrix.rb: Deal with subclasses of Matrix [redmine #5307]
-Wed Nov 12 13:44:47 1997 Yukihiro Matsumoto <matz@netlab.co.jp>
+Sat Sep 10 13:38:20 2011 Ayumu AIZAWA <ayumu.aizawa@gmail.com>
- * time.c: remove coerce from Time class.
+ * dir.c (dir_s_aref):
+ * dir.c (dir_entries): Two small documentation fixes.
+ A patch from Aaron Lerch. [Bug #5302] [ruby-core:39404]
- * regex.c (re_match): non-greedy match by ??, *? +?, {n,m}?.
+Sat Sep 10 08:30:03 2011 Koichi Sasada <ko1@atdot.net>
-Mon Nov 10 11:24:51 1997 Yukihiro Matsumoto <matz@netlab.co.jp>
+ * gc.c (GC_PROFILE_MORE_DETAIL, CALC_EXACT_MALLOC_SIZE):
+ define macros only if they are not defined.
+ fixes: [Ruby 1.9 - Feature #5291]
- * regex.c (re_compile_pattern): non-registering parens (?:..).
+Sat Sep 10 08:25:47 2011 Yukihiro Matsumoto <matz@ruby-lang.org>
- * regex.c (re_compile_pattern): new meta character \< (wordbeg)
- and \> (wordend).
+ * parse.y (bv_decls): parse.y relies on $$ = $1 before action
+ routines. a patch from Michael Edgar. [Bug #5303]
+ [ruby-core:39429]
- * regex.c (re_compile_pattern): embedded comment for regular
- expression by (?#...).
+Sat Sep 10 01:37:55 2011 Kazuhiro NISHIYAMA <zn@mbf.nifty.com>
-Fri Nov 7 16:58:24 1997 Yukihiro Matsumoto <matz@netlab.co.jp>
+ * sample/drb/dhasenc.rb: coding cookie of Emacs is coding,
+ not encoding.
- * regex.c (re_compile_pattern): perl5 regxp \A and \Z available.
+ * sample/mine.rb: ditto.
- * regex.c (re_compile_pattern): can expand compile stack dynamically.
+Fri Sep 9 21:56:40 2011 Ayumu AIZAWA <ayumu.aizawa@gmail.com>
- * regex.c (PUSH_FAILURE_POINT): wrong compare condition.
+ * ext/bigdecimal/bigdecimal.c (BigDecimal_sqrt): Fix comment.
+ BigDecimal#sqrt requires argument. Reported by Makoto Kishimoto.
+ Thanks for your contribution. [Bug #5267] [ruby-dev:44452]
-Wed Nov 2 16:00:00 1997 WATANABE Hirofumi <watanabe@ase.ptg.sony.co.jp>
+Fri Sep 9 11:00:55 2011 Shota Fukumori <sorah@tubusu.net>
- * string.c (str_sub_s): "".sub! "", "" => "\000"
+ * test/rubygems/test_gem_commands_help_command.rb: Add one
+ `require` because if run test-all with test/unit parallel
+ running, sometimes this test fails by some constants not found.
+ The error reason is some worker doesn't require the file needed by
+ this test. This issue is related to [ruby-core:36168].
-Fri Oct 31 15:52:10 1997 Yukihiro Matsumoto <matz@netlab.co.jp>
+Fri Sep 9 10:22:03 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * parse.y (assoc): keyword assoc like {fg->"black"}.
+ * thread.c (rb_thread_select): fix a typo to initialize efds
+ properly. [Bug #5299] [ruby-core:39380]
-Thu Oct 30 17:33:38 1997 Yukihiro Matsumoto <matz@netlab.co.jp>
+Fri Sep 9 02:02:09 2011 Ayumu AIZAWA <ayumu.aizawa@gmail.com>
- * io.c (io_println): print with newline, which is not affected by
- the values of $/ and $\.
+ * template/yarvarch.ja:
+ Change encoding from Shift_JIS to UTF-8
-Thu Oct 30 16:54:01 1997 WATANABE Hirofumi <watanabe@ase.ptg.sony.co.jp>
+Thu Sep 9 01:14:00 2011 Ayumu AIZAWA <ayumu.aizawa@gmail.com>
- * string.c (str_chop_bang): "".chop caused SEGV.
+ * sample/drb/README.rd.ja:
+ * sample/drb/dhasenc.rb:
+ * sample/mine.rb:
+ Change encoding from EUC-JP to UTF-8
- * string.c (str_chomp_bang): method to chop out last newline.
+Thu Sep 8 21:03:22 2011 NARUSE, Yui <naruse@ruby-lang.org>
-Mon Oct 27 13:49:13 1997 Yukihiro Matsumoto <matz@netlab.co.jp>
+ * ext/nkf/nkf-utf8/nkf.c: import nkf 2.1.2 (be9c280)
+ Bump version number/release date only.
- * ext/extmk.rb.in: library may have pathname contains `.'
+Thu Sep 8 12:43:18 2011 Narihiro Nakamura <authornari@gmail.com>
- * eval.c (rb_rescue): should not protect SystemError.
+ * gc.c (Init_GC): defined GC::Profiler.raw_data. based on the
+ patch by Eric Hodel. [ruby-core:37857] [Bug #4991]
-Fri Oct 24 10:58:53 1997 Yukihiro Matsumoto <matz@netlab.co.jp>
+Thu Sep 8 09:02:53 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * io.c (io_s_with_open_stream): ensures to close stream.
+ * gc.c (id2ref): objects which are unmarked but not in sweep_slots
+ are not dead.
-Thu Oct 23 11:17:44 1997 Yukihiro Matsumoto <matz@netlab.co.jp>
+Thu Sep 8 07:44:25 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * io.c (io_errset): value of $stderr can be changed (to any IO
- object).
+ * transcode.c (rb_declare_transcoder, load_transcoder_entry): no
+ longer need to limit the length of transcoder library name.
- * io.c (next_argv): $< can be anything that responds to `write'.
+Thu Sep 8 07:36:36 2011 NARUSE, Yui <naruse@ruby-lang.org>
- * file.c (file_s_with_open_file): ensures to close file.
+ * ext/syck/lib/syck/types.rb: use toplevel Syck.
+ for the case someone define Syck::Syck (or YAML::Syck).
- * error.c (exception): create error under the current class/module.
+Thu Sep 8 07:33:12 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * range.c (range_eqq): fixnum check for last needed too.
+ * gc.c (id2ref): unmarked object is already dead while lazy
+ sweeping, and to it cannot come back since other objects
+ referred from it might have been freed already.
-Wed Oct 22 12:52:30 1997 Yukihiro Matsumoto <matz@netlab.co.jp>
+Wed Sep 8 03:48:00 2011 Ayumu AIZAWA <ayumu.aizawa@gmail.com>
- * ext/socket/socket.c: Socket::Constants added.
+ * ext/readline/README.ja:
+ Change encoding from EUC-JP to UTF-8
- * file.c: File::Constants added for inclusion.
+Wed Sep 8 02:59:00 2011 Ayumu AIZAWA <ayumu.aizawa@gmail.com>
- * array.c (ary_join): call ary_join() recursively for the 1st
- array element.
+ * test/rexml/test_encoding.rb:
+ Add require 'require 'rexml/document'
-Mon Oct 20 12:18:29 1997 WATANABE Hirofumi <watanabe@ase.ptg.sony.co.jp>
+Wed Sep 8 02:53:00 2011 Ayumu AIZAWA <ayumu.aizawa@gmail.com>
- * ruby.c (load_file): wrong condition for #! check with -x.
+ * ext/nkf/nkf-utf8/nkf.c:
+ Change encoding from ISO-2022 to UTF-8
- * file.c (file_s_dirname): did return "" for "/a".
+Wed Sep 7 23:41:24 2011 Kouhei Sutou <kou@cozmixng.org>
-Fri Oct 17 14:29:09 1997 Yukihiro Matsumoto <matz@netlab.co.jp>
+ * lib/rexml/parsers/baseparser.rb, test/rexml/test_comment.rb:
+ allow a single hyphen in comment. [Bug #5278] [ruby-core:39289]
+ Reported by Thomas Fritzsche. Thanks!!!
- * ruby.c: now works on alpha-linux.
+Wed Sep 7 17:27:18 2011 NARUSE, Yui <naruse@ruby-lang.org>
- * bignum.c (bigadd): some undefined side effect order assumed.
+ * lib/yaml.rb: explicitly specify ::Object to avoid the collision with
+ Syck::Object.
-Wed Oct 15 17:49:24 1997 Yukihiro Matsumoto <matz@netlab.co.jp>
+Tue Sep 6 21:06:49 2011 Shota Fukumori <sorah@tubusu.net>
- * intern.h: function prototypes added.
+ * lib/test/unit.rb (_run_suites): Now reports are written the
+ following order: Skip, Failure, Error. [Feature #5282]
-Mon Oct 13 16:54:18 1997 Yukihiro Matsumoto <matz@netlab.co.jp>
+ * test_sorting.rb: test for above.
- * class.c (rb_define_class_id): call superclass's `inherited'
- method when making subclasses.
+ * test4test_sorting.rb: Ditto.
- * parse.y (nextc): clear lex_lastline at the end of file.
+ * lib/test/unit.rb (run): Put RUBY_DESCRIPTION before quitting.
+ [Feature #5282]
- * object.c (Init_Object): need to undef Class#append_features.
+Tue Sep 6 21:13:47 2011 Masaya Tarui <tarui@ruby-lang.org>
- * eval.c (rb_eval): no warning on extending classes or modules.
+ * win32/Makefile.sub (INSNS): change command line option -Ks to -Ku
+ for generate *.inc. because insns.def encoding has been changed SJIS
+ to UTF-8. if $BASERUBY is 1.9, -Ks cause an error. [Feature #5128]
+ (same as r33194)
-Thu Oct 9 11:17:50 1997 Yukihiro Matsumoto <matz@netlab.co.jp>
+Tue Sep 6 15:55:24 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * eval.c (error_print): the exception name follows after the error
- message.
+ * transcode.c (load_transcoder_entry): concatenate paths directly.
- * eval.c (compile_error): error message slightly changed.
+ * encoding.c (load_encoding): predefined encoding names are safe.
+ [ruby-dev:44469] [Bug #5279]
- * parse.y (nextc): script parsing will be terminated by __END__ at
- beginning of line.
+ * transcode.c (load_transcoder_entry): ditto.
- * eval.c (compile_error): `__END__' is no longer a keyword.
+Tue Sep 6 12:07:10 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * parse.y (nextc): protect lastline read from script stream.
+ * transcode.c: enabled econv newline option.
-Tue Oct 7 14:06:06 1997 Yukihiro Matsumoto <matz@netlab.co.jp>
+Tue Sep 6 06:44:57 2011 Marc-Andre Lafortune <ruby-core@marc-andre.ca>
- * version 1.1 alpha9 released.
+ * numeric.c (dbl2ival): Fix Float#divmod and #round for 32 bit
+ platform. part 1 of [bug #5276]
- * eval.c (mod_append_features): renamed from extend_class.
+Tue Sep 6 06:44:25 2011 Marc-Andre Lafortune <ruby-core@marc-andre.ca>
- * eval.c (rb_eval): defining method calls `method_added'.
+ * numeric.c (flo_round): Fix criteria for 32 bits platform
+ part 2 of [bug #5276]
- * eval.c (ruby_options): exception while processing options must
- terminate the interpreter.
+Tue Sep 6 05:37:11 2011 Masatoshi SEKI <m_seki@mva.biglobe.ne.jp>
- * error.c (Init_Exception): wrong method configuration. `new'
- should have been a singleton method.
+ * test/rinda/test_rinda.rb (test_core_03_notify): Fixed test failures
+ [ruby-dev:44430] [Ruby 1.9 - Bug #372]
-Mon Oct 6 18:55:38 1997 Yukihiro Matsumoto <matz@netlab.co.jp>
+Mon Sep 5 20:59:30 2011 CHIKANAGA Tomoyuki <nagachika00@gmail.com>
- * ext/kconv/kconv.c (kconv_guess): code to guess character code
- from string.
+ * insns.def: change encoding pragma for emacs (shift_jis to utf-8).
-Mon Oct 6 18:38:17 1997 WATANABE Hirofumi <watanabe@ase.ptg.sony.co.jp>
+Mon Sep 5 19:32:15 2011 CHIKANAGA Tomoyuki <nagachika00@gmail.com>
- * pack.c: now encode/decode base64 by `m' template.
+ * Makefile.in (INSNS): change command line option -Ks to -Ku for
+ generate *.inc. because insns.def encoding has been changed SJIS to
+ UTF-8. if $BASERUBY is 1.9, -Ks cause an error. [Feature #5128]
-Fri Oct 3 10:51:10 1997 Yukihiro Matsumoto <matz@netlab.co.jp>
+Mon Sep 5 18:10:56 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * MANIFEST: needed to include lex.c in the distribution.
+ * transcode.c (rb_econv_binmode): newline decorators are
+ exclusive.
- * eval.c (ruby_options): f_require() called too early.
+Mon Sep 5 15:03:37 2011 NARUSE, Yui <naruse@ruby-lang.org>
- * eval.c (rb_provide): module extensions should always be `.o'.
+ * test/rubygems/test_gem_security.rb
+ (test_class_build_self_signed_cert): reset opt[:trust_dir] to apply
+ temporary Gem.user_home.
-Thu Oct 2 11:38:31 1997 Yukihiro Matsumoto <matz@netlab.co.jp>
+Mon Sep 5 10:04:35 2011 Ayumu AIZAWA <ayumu.aizawa@gmail.com>
- * version 1.1 alpha8 released.
+ * README.ja, README.EXT.ja: resolve conflicts. [ruby-dev:44459]
- * ext/marshal/marshal.c (r_object): remove temporal regist for
- structs. (caused problem if structs form cycles.)
+Mon Sep 5 05:13:22 2011 Marc-Andre Lafortune <ruby-core@marc-andre.ca>
- * parse.y (match_gen): static binding for match(=~) calls
- with regexp literals.
+ * numeric.c (flo_round): Make Float#round round big values [bug
+ #5272]
-Wed Oct 1 15:26:55 1997 Yukihiro Matsumoto <matz@netlab.co.jp>
+Mon Sep 5 04:28:25 2011 Marc-Andre Lafortune <ruby-core@marc-andre.ca>
- * eval.c: protect retval in struct tag from GC for C_ALLOCA.
+ * numeric.c (int_round): Integer#round always returns an Integer [Bug
+ #5271]
- * eval.c: no more pointer value from setjmp/longjmp.
+Sun Sep 4 22:28:50 2011 Shugo Maeda <shugo@ruby-lang.org>
-Wed Oct 1 14:01:49 1997 WATANABE Hirofumi <watanabe@ase.ptg.sony.co.jp>
+ * lib/net/imap.rb (default_port, default_imap_port,
+ default_tls_port, default_ssl_port, default_imaps_port):
+ added methods for consistency with Net::POP.
+ based on the patch by art lussos. [ruby-core:38997] [Bug #5198]
- * ext/marshal/marshal.c (w_byte): argument must be char.
+Sun Sep 4 21:19:19 2011 Ayumu AIZAWA <ayumu.aizawa@gmail.com>
-Wed Oct 1 10:30:22 1997 Yukihiro Matsumoto <matz@netlab.co.jp>
+ * Change encoding from EUC-JP to UTF-8. [Feature #5128]
- * variable.c (mod_const_at): global constants now belongs to the
- class Object.
+Sun Sep 4 00:47:39 2011 Kazuki Tsujimoto <kazuki@callcc.net>
- * object.c (Init_Object): new global constant NIL.
+ * test/ruby/test_fiber.rb (TestFiber#test_no_valid_cfp):
+ add a test. Unlike TestThread#test_no_valid_cfp,
+ this test succeeds even if win32ole is required (see r33153).
- * ext/marshal/marshal.c (marshal_dump): try to set binmode.
+Sun Sep 4 00:11:49 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * ext/marshal/marshal.c (r_object): forgot to re-regist structs in
- the object table.
+ * variable.c (rb_const_set): show the previous definition
+ location. [EXPERIMENTAL]
- * eval.c (ruby_options): call Init_ext() before any require()
- calls by `-r'.
+Sat Sep 3 23:56:24 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Fri Sep 30 14:29:22 1997 WATANABE Hirofumi <watanabe@ase.ptg.sony.co.jp>
+ * configure.in (sizeof_struct_dirent_too_small): check if struct
+ dirent.d_name is too small.
- * ext/marshal/marshal.c (w_object): marshal dumped core.
+ * configure.in (RUBY_MINGW32): take tool prefix from CC.
-Tue Sep 30 10:27:39 1997 Yukihiro Matsumoto <matz@netlab.co.jp>
+Sat Sep 3 23:52:08 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * sample/test.rb: bignum test suits added.
+ * io.c (argf_next_argv): open in default text mode.
+ [ruby-core:39234] [Bug #5268]
- * eval.c (rb_eval): new pseudo variable `true' and `false'.
+Sat Sep 3 18:40:57 2011 CHIKANAGA Tomoyuki <nagachika00@gmail.com>
- * parse.y: new keywords `true' and `false' added.
+ * lib/thread.rb (SizedQueue#max=): raise ArgumentError if max is not
+ positive number. patch by Masaki Matsushita.
+ [ruby-dev:44449] [Bug #5259]
-Mon Sep 29 13:37:58 1997 Yukihiro Matsumoto <matz@netlab.co.jp>
+ * test/thread/test_queue.rb (test_sized_queue_initialize,
+ test_sized_queue_assign_max): add tests for it.
- * ruby.c (forbid_setid): forbid some options in suid mode.
+Fri Sep 2 21:11:16 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * ruby.h (NUM2DBL): new macro to convert into doubles.
+ * io.c (validate_enc_binmode, prep_stdio): default to text mode on
+ dosish platforms. [ruby-core:38822] [Bug #5164]
-Mon Sep 27 09:53:48 1997 EGUCHI Osamu <eguchi@shizuokanet.or.jp>
+ * transcode.c (rb_econv_prepare_options): keep default ecflags
+ unchanged if no options.
- * bignum.c: modified for speeding.
+Fri Sep 2 14:36:47 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Fri Sep 26 18:27:59 1997 WATANABE Hirofumi <watanabe@ase.ptg.sony.co.jp>
+ * vm_insnhelper.c (vm_search_const_defined_class): search
+ ancestors only when global scope. [ruby-core:39227] [Bug #5264]
- * sample/from.rb: some extensions.
+Fri Sep 2 09:58:08 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Mon Sep 29 13:15:56 1997 Yukihiro Matsumoto <matz@netlab.co.jp>
+ * parse.y (parser_tokadd_string, parser_yylex): ignore a backslash
+ which prefixes an non-ascii character, which has no escape
+ syntax. [ruby-core:39222] [Ruby 1.9 - Bug #5262]
- * parse.y (lhs): no more syntax error on `obj.CONSTANT = value'.
+Fri Sep 2 04:05:25 2011 Aaron Patterson <aaron@tenderlovemaking.com>
-Fri Sep 26 14:41:46 1997 Yukihiro Matsumoto <matz@netlab.co.jp>
+ * ext/psych/lib/psych/visitors/yaml_tree.rb: emit strings tagged as
+ ascii-8bit as binary in YAML.
+ * test/psych/test_string.rb: corresponding test.
- * eval.c (ruby_run): deferred calling Init_ext() just before eval_node.
+Fri Sep 2 01:07:14 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Fri Sep 26 13:27:24 1997 WATANABE Hirofumi <watanabe@ase.ptg.sony.co.jp>
+ * numeric.c (flo_round): substitute machine dependent magic number.
- * io.c (io_isatty): forgot to return TRUE value.
+Thu Sep 1 17:31:22 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
-Fri Sep 25 11:10:58 1997 EGUCHI Osamu <eguchi@shizuokanet.or.jp>
+ * insns.def (defineclass), vm_insnhelper.c (vm_get_cvar_base): see
+ also inherited constants for classes without superclass and
+ modules. [ruby-core:37698] [Bug #3423]
- * eval.c: use _setjmp/_longjmp instead of setjmp/longjmp on some
- platforms.
+Thu Sep 1 16:18:44 2011 Hiroshi Nakamura <nahi@ruby-lang.org>
-Wed Sep 24 17:43:13 1997 Yukihiro Matsumoto <matz@netlab.co.jp>
+ * Release GVL while OpenSSL's public key generation.
- * string.c (Init_String): String#taint and String#taint? added.
+ t = Thread.new { print "."; sleep 0.1 }
+ key = OpenSSL::PKey::RSA.new(2048)
+ #=> Thread t works in parallel with public key generation if
+ OS/machine allows it.
- * class.c (mod_ancestors): ancestors include the class itself.
+ This works with OpenSSL >= 0.9.8. From this version, it has new
+ public key generation function which allows us to interrupt the
+ execution while pkey generation iterations.
-Wed Sep 24 00:57:00 1997 Katsuyuki Okabe <HGC02147@niftyserve.or.jp>
+ * ext/openssl/extconf.rb: Check existence of OpenSSL's new public key
+ generation function. (DH_generate_parameters_ex,
+ DSA_generate_parameters_ex and RSA_generate_key_ex.
- * X68000 patch.
+ * ext/openssl/ossl_pkey.{h,c} (ossl_generate_cb_2,
+ ossl_generate_cb_stop): Added new callback function for OpenSSL pkey
+ generation which handles Thread interruption by Ruby.
+ ossl_generate_cb_stop is the unblock function(ubf) for Ruby which
+ sets a stop flag. New pkey generation callback ossl_generate_cb_2
+ checks the stop flag at each iterations of OpenSSL and interrupts
+ pkey generation when the flag is set.
-Tue Sep 23 20:42:30 1997 EGUCHI Osamu <eguchi@shizuokanet.or.jp>
+ * ext/openssl/ossl_pkey_dsa.c (dsa_generate): Call
+ rb_thread_blocking_region with the above unblock function to release
+ GVL while pkey generation.
- * parse.y (node_newnode): SEGV on null node setup.
+ * ext/openssl/ossl_pkey_rsa.c (rsa_generate): ditto.
-Mon Sep 22 11:22:46 1997 Yukihiro Matsumoto <matz@netlab.co.jp>
+ * ext/openssl/ossl_pkey_dh.c (dh_generate): ditto.
- * ruby.c (ruby_prog_init): wrong safe condition check.
+ * test/openssl/test_pkey_{dh,dsa,rsa}.rb: Test it.
-Sun Sep 21 14:46:02 1997 MAEDA shugo <shugo@po.aianet.ne.jp>
+Thu Sep 1 14:06:54 2011 NAKAMURA Usaku <usa@ruby-lang.org>
- * error.c (exc_inspect): garbage added to classpath.
+ * test/ruby/test_thread.rb (TestThread#test_no_valid_cfp): skip when
+ win32ole is required. in such case, win32ole redefines
+ Thread#initialize, and the block argument becomes to be not the top
+ of the thread, then this testcase always fails.
-Fri Sep 19 11:49:23 1997 Yukihiro Matsumoto <matz@netlab.co.jp>
+Thu Sep 1 10:20:50 2011 NAKAMURA Usaku <usa@ruby-lang.org>
- * parse.y (newtok): forgot to adjust buffer size when shrinking
- the token buffer.
+ * test/ruby/test_io_m17n.rb (TestIO_M17N#test_{default_mode_on_dosish,
+ default_mode_on_unix,text_mode,binary_mode}): sorry for wrong test
+ committed in r33144. I'd misunderstood the spec of ruby's universal
+ newline.
- * enum.c (enum_find): rb_eval_cmd() does not return value.
+Thu Sep 1 09:27:57 2011 NARUSE, Yui <naruse@ruby-lang.org>
- * io.c (pipe_open): close fds on pipe exec. fcntl(fd, F_SETFD, 1)
- no longer used.
+ * variable.c (rb_autoloading_value): Fix the order of definitions.
+ It is used by autoload_defined_p.
-Tue Sep 16 17:54:25 1997 Yukihiro Matsumoto <matz@netlab.co.jp>
+Wed Aug 31 17:28:23 2011 Hiroshi Nakamura <nahi@ruby-lang.org>
- * file.c (f_test): problem if wrong command specified.
+ * variable.c (rb_autoload): There was a chance to run GC (from
+ rb_str_new2()) before finishing autoload_data_i construction. It
+ caused SEGV at rb_gc_mark() at autoload_i_mark.
- * ruby.c (ruby_prog_init): close stdaux and stdprn for MSDOS.
+ * variable.c (rb_autoload_load): Move RB_GC_GUARD() to proper
+ position based on suggestion by CHIKANAGA Tomoyuki at
+ http://d.hatena.ne.jp/nagachika/20110826/ruby_trunk_changes_33070_33078
- * ruby.c (ruby_prog_init): should not add path from environment
- variable, if ruby is running under setuid.
+ * variable.c (autoload_defined_p): Fix incompatible autoload behavior
+ that causes Rails crash. Class definition instruction defined in
+ 'defineclass' in insns.def always invokes rb_autoload_load for a
+ constant. It's invoked for every class definition regardless of
+ existence of autoload definition. rb_autoload_load checks if a
+ constant is defined as autoloaded, but new thread-safe autoload
+ returned different value if the constant is under autoloading.
- * process.c (init_ids): check suid check for setuid/seteuid etc.
+Wed Aug 31 17:20:56 2011 Hiroshi Nakamura <nahi@ruby-lang.org>
-Mon Sep 15 00:42:04 1997 WATANABE Hirofumi <watanabe@ase.ptg.sony.co.jp>
+ * Re-apply r33078, thread-safe autoload which is reverted at r33093.
- * regex.c (re_compile_pattern): \w{3} and \W{3} did not work.
+Wed Aug 31 16:28:04 2011 NAKAMURA Usaku <usa@ruby-lang.org>
-Thu Sep 11 10:31:48 1997 Yukihiro Matsumoto <matz@netlab.co.jp>
+ * test/ruby/test_io_m17n.rb (TestIO_M17N#test_{default_mode_on_dosish,
+ default_mode_on_unix,text_mode,binary_mode}): tests for [Bug #5164].
- * version 1.1 alpha7 released.
+Wed Aug 31 15:54:11 2011 NARUSE, Yui <naruse@ruby-lang.org>
- * ext/socket/socket.c (sock_new): no setbuf() for NT.
+ * ext/json: Merge json gem v1.5.4 (3dab4c5a6a97fac03dac).
- * io.c (rb_fopen,rb_fdopen): set close-on-exec for every fd.
+Wed Aug 31 13:09:41 2011 Marc-Andre Lafortune <ruby-core@marc-andre.ca>
-Wed Sep 10 15:55:31 1997 Yukihiro Matsumoto <matz@netlab.co.jp>
+ * numeric.c (flo_round): Avoid overflow by optimizing for trivial
+ cases [Bug #5227]
- * ext/marshal/marshal.c (r_bytes0): extra big length check.
+Wed Aug 31 00:50:01 2011 NAKAMURA Usaku <usa@ruby-lang.org>
-Tue Sep 9 16:27:14 1997 Yukihiro Matsumoto <matz@netlab.co.jp>
+ * win32/win32.c (rb_w32_select_with_thread): and my typo. we all must
+ be more careful.
- * io.c (pipe_fptr_atexit): clean up popen()'ed fptr.
+Wed Aug 31 00:48:38 2011 NAKAMURA Usaku <usa@ruby-lang.org>
- * error.c (set_syserr): some system has error code that is bigger
- than sys_nerr. grrr.
+ * thread.c (rb_thread_select): critical typo in r33117.
-Mon Sep 8 18:33:33 1997 Yukihiro Matsumoto <matz@netlab.co.jp>
+Wed Aug 31 00:30:49 2011 NAKAMURA Usaku <usa@ruby-lang.org>
- * io.c (io_s_new): dereferenced nil for optional mode.
+ * test/-ext-/old_thread_select/test_old_thread_select.rb
+ (TestOldThreadSelect#test_old_select_read_timeout): if the machine
+ is fast enough, the time used by code around IO.select may be smaller
+ than Time implement threshold.
-Fri Sep 5 10:26:03 1997 Yukihiro Matsumoto <matz@netlab.co.jp>
+Wed Aug 31 00:04:38 2011 NAKAMURA Usaku <usa@ruby-lang.org>
- * class.c (class_instance_methods): do not include methods which
- are changed to private in subclasses.
+ * ext/-test-/old_thread_select/old_thread_select.c (old_thread_select):
+ typo.
-Thu Sep 4 12:38:53 1997 Yukihiro Matsumoto <matz@netlab.co.jp>
+ * test/-ext-/old_thread_select/test_old_thread_select.rb
+ (TestOldThreadSelect#test_old_select_signal_safe): use SIGINT instead
+ of SIGUSR1 because the former is general and the latter is platform
+ dependent.
- * variable.c (f_global_variables): list name of the global
- variables.
+Tue Aug 30 23:59:36 2011 NAKAMURA Usaku <usa@ruby-lang.org>
+
+ * win32/win32.c, include/ruby/intern.h (rb_w32_fd_copy): implement
+ for rb_thread_select() in thread.c. the use of rb_fd_copy() is
+ introduced in r33117.
+ [Bug #5251] [ruby-core:39195]
+
+ * thread.c (rb_thread_select): must call rb_fd_init() before using
+ rb_fdset_t. see the implementations of rb_fd_init()s if you want to
+ know the reason.
+
+Tue Aug 30 22:34:45 2011 CHIKANAGA Tomoyuki <nagachika00@gmail.com>
+
+ * test/dl/test_callback.rb (test_callback_with_string): prevents
+ temporary string from GC.
+
+Tue Aug 30 22:25:38 2011 NAKAMURA Usaku <usa@ruby-lang.org>
+
+ * vm_insnhelper.c (vm_call_cfunc): revert r33112. RB_GC_GUARD macro
+ protect a VALUE from GC. It's not for general anti-optimizing
+ purpose.
+
+Tue Aug 30 11:06:19 2011 NARUSE, Yui <naruse@ruby-lang.org>
+
+ * ext/json: Merge json gem 1.5.4+ (2149f4185c598fb97db1).
+ [Bug #5173] [ruby-core:38866]
+
+Tue Aug 30 09:57:50 2011 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
+
+ * lib/thread.rb (Queue#pop): fix a race against Thread.wakeup.
+ Patch by Masaki Matsushita <glass.saga at gmail dot com>
+ [Bug #5195] [ruby-dev:44400]
+
+Tue Aug 30 09:48:07 2011 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
+
+ * cont.c (fiber_entry): fix stack allocation failure on Debian
+ GNU/kFreeBSD.
+ Patch by Lucas Nussbaum <lucas at lucas-nussbaum dot net>.
+ [Bug #5241] [ruby-core:39147]
+
+Tue Aug 30 09:28:01 2011 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
+
+ * thread.c (rb_thread_select): rewrite by using
+ rb_thread_fd_select(). old one is EINTR unsafe.
+ Patch by Eric Wong. [Bug #5229] [ruby-core:39102]
+
+ * test/-ext-/old_thread_select/test_old_thread_select.rb:
+ a testcase for rb_thread_select().
+ * ext/-test-/old_thread_select/old_thread_select.c: ditto.
+ * ext/-test-/old_thread_select/depend: ditto.
+ * ext/-test-/old_thread_select/extconf.rb: ditto.
+
+Tue Aug 30 09:08:22 2011 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
+
+ * configure.in: fix a build failure on GNU Hurd.
+ Patch by Samuel Thibault <sthibault at debian dot org>. Thank you!
+ [Bug #5250] [ruby-core:39185]
+
+Sun Aug 29 23:22:00 2011 Kenta Murata <mrkn@mrkn.jp>
+
+ * test/ruby/test_numeric.rb (test_num2long): modify a test against the
+ change by r33108.
+
+Sun Aug 29 09:58:00 2011 Kenta Murata <mrkn@mrkn.jp>
+
+ * numeric.c (bit_coerce): A Fixnum and a Bignum are only permitted for
+ bitwise arithmetic with a Fixnum. #1792
+
+ * test/ruby/test_fixnum.rb: add tests for the above change.
+
+ * bignum.c (bit_coerce): A Fixnum and a Bignum are only permitted for
+ bitwise arithmetic with a Bignum. #1792
+
+ * test/ruby/test_bignum.rb: add tests for the above change.
+
+Sun Aug 28 15:38:17 2011 CHIKANAGA Tomoyuki <nagachika00@gmail.com>
+
+ * ext/date/date_parse.c (date_zone_to_diff): keep a temporary string
+ stored in variable while the contents buffer is being used.
+
+ * ext/date/date_parse.c (date_zone_to_diff): get rid of out of bounds
+ memory read. [ruby-dev:44409] [Bug #5213]
+
+Sun Aug 28 05:29:50 2011 Ryan Davis <ryand-ruby@zenspider.com>
+
+ * lib/minitest/*: Imported minitest 2.5.1 (r6596)
+ * test/minitest/*: ditto
+
+Sat Aug 27 20:46:05 2011 Kazuki Tsujimoto <kazuki@callcc.net>
+
+ * vm.c (rb_vm_rewrite_dfp_in_errinfo): change return type
+ to suppress a warning.
+
+ * vm_core.h: ditto.
+
+Sat Aug 27 19:04:06 2011 NARUSE, Yui <naruse@ruby-lang.org>
+
+ * internal.h (rb_strftime_timespec): moved from time.c and define only
+ if ruby/encoding.h is included.
+
+ * internal.h (rb_strftime): ditto.
+
+Sat Aug 27 18:53:51 2011 Kazuki Tsujimoto <kazuki@callcc.net>
+
+ * proc.c (proc_new): force to rewrite errinfo when calling Proc.new in ensure.
+ [Bug #5234] [ruby-core:39125]
+ This code will be removed after changing throw mechanism (see r33064).
+
+ * vm.c (rb_vm_rewrite_dfp_in_errinfo): new function.
+
+ * vm.c (vm_make_env_each): changed accordingly.
+
+ * vm_core.h: ditto.
+
+ * bootstraptest/test_flow.rb: add tests for above.
+
+Sat Aug 27 18:44:06 2011 NARUSE, Yui <naruse@ruby-lang.org>
+
+ * internal.h (rb_strftime_timespec): move to time.c because it depends
+ encoding.h.
+
+Sat Aug 27 18:17:58 2011 NARUSE, Yui <naruse@ruby-lang.org>
+
+ * strftime.c (rb_strftime_with_timespec): get enc argument to specify
+ the encoding of the format. On Windows (at least Japanese Windows),
+ Time#strftime("%Z") includes non ASCII in locale encoding (CP932).
+ So convert locale to default internal. [ruby-core:39092] [Bug #5226]
+
+ * strftime.c (rb_strftime): ditto.
+
+ * strftime.c (rb_strftime_timespec): ditto.
+
+ * internal.h (rb_strftime_timespec): follow above.
+
+ * time.c (rb_strftime_alloc): ditto.
+
+ * time.c (strftimev): ditto.
+
+ * time.c (time_strftime): ditto.
+
+ * time.c (time_to_s): the resulted string of Time#to_s is always
+ ascii only, so this should be US-ASCII.
+
+ * time.c (time_asctime): ditto.
+
+Sat Aug 27 11:18:12 2011 Hiroshi Nakamura <nahi@ruby-lang.org>
+
+ * Revert r33078. It caused a Rails application NoMethodError.
+
+ /home/nahi/git/emptyApp/ruby/1.9.1/gems/rack-mount-0.6.14/lib/rack/mount/utils.rb:157: warning: toplevel constant ScanError referenced by Regin::Parser::ScanError
+ /home/nahi/git/emptyApp/ruby/1.9.1/gems/rack-mount-0.6.14/lib/rack/mount/vendor/regin/regin/parser.rb:17:in `parse_regexp': undefined method `scan_str' for #<Regin::Parser:0x00000002344548> (NoMethodError)
+
+Sat Aug 27 08:44:58 2011 Eric Hodel <drbrain@segment7.net>
+
+ * lib/rdoc: Import RDoc 3.9.4. Typo and grammar fixes by Luke Gruber.
+ [Ruby 1.9 - Bug #5203]
+
+Sat Aug 27 07:53:34 2011 Eric Hodel <drbrain@segment7.net>
+
+ * lib/open-uri.rb: Fix indentation of OpenURI::OpenRead#open. Use ++
+ instead of `' for method arguments in open-uri.rb
+
+Sat Aug 27 07:22:07 2011 Eric Hodel <drbrain@segment7.net>
+
+ * ext/pathname/lib/pathname.rb: Fix typos and grammar mistakes. Patch
+ by Luke Gruber. [#5203]
+ * ext/pty/lib/expect.rb: ditto
+ * lib/mathn.rb: ditto
+ * lib/net/http.rb: ditto
+ * lib/open-uri.rb: ditto
+ * lib/ostruct.rb: ditto
+ * lib/tempfile.rb: ditto
+ * lib/thread.rb: ditto
+ * lib/weakref.rb: ditto
+ * sample/webrick/httpproxy.rb: ditto
+
+Sat Aug 27 04:03:18 2011 Koichi Sasada <ko1@atdot.net>
+
+ * iseq.c (iseq_data_to_ary): fix type of variable
+ (long -> unsigned long) to suppress a warning.
+
+Sat Aug 27 04:02:11 2011 Koichi Sasada <ko1@atdot.net>
+
+ * vm_core.h: add a decl. of rb_autoloading_value().
+
+Fri Aug 26 19:12:08 2011 Hiroshi Nakamura <nahi@ruby-lang.org>
+
+ * variable.c: Make autoload thread-safe. See #921.
+
+ What's the problem?
+ autoload is thread unsafe. When we define a constant to be
+ autoloaded, we expect the constant construction is invariant. But
+ current autoload implementation allows other threads to access the
+ constant while the first thread is loading a file.
+
+ What's happening inside?
+ The current implementation uses Qundef as a marker of autoload in
+ Constant table. Once the first thread find Qundef as a value at
+ constant lookup, it starts loading a defined feature. Generally a
+ loaded file overrides the Qundef in Constant table by module/class
+ declaration at very beginning lines of the file, so other threads
+ can see the new Module/Class object before feature loading is
+ finished. It breaks invariant construction.
+
+ How to solve?
+ To ensure invariant constant construction, we need to override
+ Qundef with defined Object after the feature loading. For keeping
+ Qundef in Constant table, I expanded autoload_data struct in
+ Module to have a slot for keeping the defined object while feature
+ loading. And changed Module's constant lookup/update logic a
+ little so that the slot is only visible from the thread which
+ invokes feature loading. (== the first thread which accessed the
+ autoload constant)
+
+ Evaluation?
+ All test passes (bootstrap test, test-all and RubySpec) and added
+ 8 tests for threading behavior. Extra logics are executed only
+ when Qundef is found, so no perf drop should happen except
+ autoloading.
+
+ * variable.c (rb_autoload): Prepare new autoload_data struct.
+
+ * variable.c (rb_autoload_load): Load feature and update Constant
+ table after feature loading is finished.
+
+ * variable.c (rb_const_get_0): When the fetched constant is under
+ autoloading, it returns the object only for the thread which starts
+ autoloading.
+
+ * variable.c (rb_const_defined_0): Ditto.
+
+ * variable.c (rb_const_set): When the specified constant is under
+ autoloading, it sets the object only for the thread which starts
+ autoloading. Otherwise, simply overrides Qundef with constant
+ override warning.
+
+ * vm_insnhelper.c (vm_get_ev_const): Apply same change as
+ rb_const_get_0 in variable.c.
+
+ * test/ruby/test_autoload.rb: Added tests for threading behavior.
+
+Fri Aug 26 10:10:37 2011 Eric Hodel <drbrain@segment7.net>
+
+ * lib/rubygems: Update to RubyGems 1.8.10. Fixes security issue in
+ creating ruby-format gemspecs. Fixes Gem.dir not being at the front
+ of Gem.path to fix uninstall and cleanup commands. Fixes gem
+ uninstall stopping on the first missing gem.
+
+Fri Aug 26 08:21:10 2011 Aaron Patterson <aaron@tenderlovemaking.com>
+
+ * time.c (strftimev): Make Time#to_s default to US-ASCII encoding but
+ respect Encoding.default_internal. [ruby-core:39092]
+ * test/ruby/test_time.rb (class TestTime): Corresponding test.
+
+Thu Aug 25 09:43:16 2011 Eric Hodel <drbrain@segment7.net>
+
+ * ext/openssl/lib/openssl/bn.rb: Hide copyright info from RDoc.
+ * ext/openssl/lib/openssl/digest.rb: ditto
+ * ext/openssl/lib/openssl/x509.rb: ditto
+ * ext/openssl/lib/openssl/cipher.rb: ditto
+
+Thu Aug 25 09:25:48 2011 Eric Hodel <drbrain@segment7.net>
+
+ * ext/openssl/ossl_digest.c: Document OpenSSL::Digest::digest and add
+ an example to OpenSSL::Digest. Patch by Sylvain Daubert.
+ [Ruby 1.9 - Bug #5166]
+ * ext/openssl/lib/openssl/digest.rb (module OpenSSL): ditto
+
+Thu Aug 25 08:19:43 2011 Koichi Sasada <ko1@atdot.net>
+
+ * vm.c (vm_make_env_each): work around to solve Bug #2729.
+ fixes: Bug #2729
+ a patch from Kazuki Tsujimoto <kazuki@callcc.net>
+ This problem is caused by changing dfp (dynamic env pointer)
+ from saved dfp. Saved dfp is pointed env in VM stack. However,
+ the dfp can be moved because VM copies env from VM stack to
+ the heap. At this copying, dfp was also changed. To solve this
+ problem, I'll try to change throw mechanism (not save target dfp,
+ but save target cfp).
+
+ * bootstraptest/test_flow.rb: add a test for above.
+
+Thu Aug 25 07:57:33 2011 Marc-Andre Lafortune <ruby-core@marc-andre.ca>
+
+ * numeric.c (int_round): Fix Integer#round [ruby-core:39096]
+
+Thu Aug 25 07:00:00 2011 Koichi Sasada <ko1@atdot.net>
+
+ * vm_insnhelper.h, vm_insnhelper.c, vm.c, vm_method.c, insns.def:
+ Manage a redefinition of special methods for each classes.
+ A patch from Joel Gouly <joel.gouly@gmail.com>. Thanks!
+
+Thu Aug 25 06:51:08 2011 Aaron Patterson <aaron@tenderlovemaking.com>
+
+ * ext/psych/lib/psych.rb: Fixing psych version number.
+ * ext/psych/psych.gemspec: updating the gemspec.
+
+Thu Aug 25 06:11:35 2011 Aaron Patterson <aaron@tenderlovemaking.com>
+
+ * ext/psych/lib/psych/nodes/node.rb: default `to_yaml` encoding to be
+ UTF-8.
+ * test/psych/test_encoding.rb: test yaml dump encoding.
+
+Thu Aug 25 01:24:33 2011 Naohisa Goto <ngotogenome@gmail.com>
+
+ * test/fileutils/test_fileutils.rb (test_chmod_symbol_mode): Solaris
+ seems to behave the same as FreeBSD.
+
+Thu Aug 25 01:11:36 2011 Naohisa Goto <ngotogenome@gmail.com>
+
+ * test/ruby/test_rubyoptions.rb (test_script_from_stdin): slave pty
+ should be manipulated because master pty may not be a tty on some
+ environment (e.g. Solaris). [Bug:#5222] [ruby-dev:44420]
+
+Wed Aug 24 15:13:56 2011 Koichi Sasada <ko1@atdot.net>
+
+ * iseq.h, iseq.c, compile.c: Change the line number data structure
+ to solve an issue reported at [ruby-dev:44413] [Ruby 1.9 - Bug #5217].
+ Before this fix, each instruction has an information including
+ line number (iseq::iseq_insn_info_table). Instead of this data
+ structure, recording only line number changing places
+ (iseq::iseq_line_info_table).
+ The order of entries in iseq_line_info_table is ascending order of
+ iseq_line_info_table_entry::position. You can get a line number
+ by an iseq and a program counter with this data structure.
+ This fix reduces memory consumption of iseq (bytecode).
+ On my measurement, a rails application consumes 21.8MB for
+ iseq with this fix on the 32bit CPU. Without this fix, it
+ consumes 24.7MB for iseq [ruby-dev:44415].
+
+ * proc.c: ditto.
+
+ * vm_insnhelper.c: ditto.
+
+ * vm_method.c: ditto.
+
+ * vm.c (rb_vm_get_sourceline): change to use rb_iseq_line_no().
+
+Wed Aug 24 09:49:10 2011 Koichi Sasada <ko1@atdot.net>
+
+ * insns.def (defined): fix to checking class variable.
+ A patch by Magnus Holm <judofyr@gmail.com>. Thanks!
+
+ * test/ruby/test_variable.rb: add a test for above.
+
+Wed Aug 24 08:53:06 2011 Eric Hodel <drbrain@segment7.net>
+
+ * lib/rdoc: Update to RDoc 3.9.3. Fixes RDoc with `ruby -Ku`. Allows
+ HTTPS image paths to be turned into <img> tags. Prevents special
+ markup inside <tt> from being processed.
+
+Wed Aug 24 07:57:43 2011 Eric Hodel <drbrain@segment7.net>
+
+ * lib/rubygems: Update to RubyGems 1.8.9. Fixes uninstalling multiple
+ gems and gem cleanup.
+
+Wed Aug 24 06:45:20 2011 Ryan Davis <ryand-ruby@zenspider.com>
+
+ * lib/minitest/*: Imported minitest 2.5.0 (r6557)
+ * test/minitest/*: ditto
+
+Wed Aug 24 00:38:22 2011 Yusuke Endoh <mame@tsg.ne.jp>
+
+ * thread.c (update_coverage): skip coverage count up if the current
+ line is out of the way. rb_sourceline() is unreliable when source
+ code is big. [ruby-dev:44413]
+
+ * test/coverage/test_coverage.rb: add a test for above.
+
+Tue Aug 23 15:23:56 2011 Eric Hodel <drbrain@segment7.net>
+
+ * load.c (rb_f_require): Improve documentation of Kernel#require.
+ [Ruby 1.9 - Bug #5210]
+
+Tue Aug 23 11:27:26 2011 Hiroshi Nakamura <nahi@ruby-lang.org>
+
+ * ext/zlib/zlib.c (gzfile_read_header): Ensure that each section of
+ gzip header is readable to avoid SEGV.
+
+ * test/zlib/test_zlib.rb (test_corrupted_header): Test it.
+
+Mon Aug 22 23:43:33 2011 CHIKANAGA Tomoyuki <nagachika00@gmail.com>
+
+ * sprintf.c (rb_str_format): add RB_GC_GUARD to prevent temporary
+ strings from GC.
+
+Sun Aug 21 17:49:53 2011 Kazuki Tsujimoto <kazuki@callcc.net>
+
+ * iseq.c (iseq_s_disasm): remove variable which is no longer used
+ since r33013.
+
+Sun Aug 21 14:20:58 2011 Naohisa Goto <ngotogenome@gmail.com>
+
+ * configure.in: use LD_LIBRARY_PATH_64 on 64-bit Solaris.
+
+Sat Aug 20 13:19:52 2011 Kazuki Tsujimoto <kazuki@callcc.net>
+
+ * iseq.c (iseq_s_disasm): fix a bug that may cause SEGV.
+
+ * test/ruby/test_method.rb (test_body): add a test for the above change.
+
+Sat Aug 20 10:43:24 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * ext/stringio/stringio.c (strio_read): return new string if nil
+ is explicitly given as a buffer ([Bug #5207]), otherwise set the
+ encoding. also removed dead code.
+
+Fri Aug 19 14:25:51 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * process.c (proc_spawn_v, proc_spawn): should not wait the
+ spawned process.
+
+ * process.c (proc_spawn_v): fix missing argument, and try with
+ /bin/sh only if failed with ENOEXEC.
+
+Fri Aug 19 14:12:57 2011 Shugo Maeda <shugo@ruby-lang.org>
+
+ * lib/net/imap.rb (idle): raises a Net::IMAP::Error when the
+ connection is closed. based on the patch by Hugo Barauna.
+ [Bug #5190] [ruby-core:38930]
+
+Fri Aug 19 13:18:00 2011 Kenta Murata <mrkn@mrkn.jp>
+
+ * configure.in: defines _DARWIN_UNLIMITED_SELECT if the target_os
+ is darwin.
+
+Fri Aug 19 13:14:00 2011 Kenta Murata <mrkn@mrkn.jp>
+
+ * thread.c: add a description for the behavior of select(2) on
+ Mac OS X 10.7 (Lion).
+
+Fri Aug 19 11:28:58 2011 Shugo Maeda <shugo@ruby-lang.org>
+
+ * lib/net/imap.rb (msg_att): accepts extra space before ')'.
+ based on the patch by art lussos. [Bug #5163] [ruby-core:38820]
+
+Wed Aug 17 23:01:00 2011 Kenta Murata <mrkn@mrkn.jp>
+
+ * ext/bigdecimal/bigdecimal.c (cannot_be_coerced_into_BigDecimal):
+ remove duplication.
+
+Wed Aug 17 15:27:00 2011 Kenta Murata <mrkn@mrkn.jp>
+
+ * ext/bigdecimal/bigdecimal.c (cannot_be_coerced_into_BigDecimal):
+ add a new function for raising error when an object cannot coerce
+ into BigDecimal. [Bug #5172]
+
+ * ext/bigdecimal/bigdecimal.c (BigDecimalValueWithPrec): use
+ cannot_be_coerced_into_BigDecimal function.
+
+ * ext/bigdecimal/bigdecimal.c (BigMath_s_exp): ditto.
+
+ * ext/bigdecimal/bigdecimal.c (BigMath_s_log): ditto.
+
+ * test/bigdecimal/test_bigdecimal.rb: test for the above changes.
+
+ * test/bigdecimal/testbase.rb (under_gc_stress): add a new utility
+ method to run tests under the condition of GC.stress = true.
+
+Wed Aug 17 10:16:00 2011 Kenta Murata <mrkn@mrkn.jp>
+
+ * rational.c (nurat_coerce): Rational#coerce should converts itself
+ into Complex if the argument is a Complex with non-zero imaginary
+ part. [Bug #5020] [ruby-dev:44088]
+
+ * test/ruby/test_rational.rb (test_coerce): test for the above change.
+
+Wed Aug 17 06:33:19 2011 Martin Bosslet <Martin.Bosslet@googlemail.com>
+
+ * ext/openssl/ossl_x509cert.c: Add class documentation for
+ OpenSSL::X509::Certificate.
+
+Wed Aug 17 04:54:25 2011 Martin Bosslet <Martin.Bosslet@googlemail.com>
+
+ * ext/openssl/ossl_pkey.c: corrected docs, OpenSSL::PKey::DH does
+ *not* support #sign/verify.
+
+Tue Aug 16 18:56:54 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * vm.c (ruby_threadptr_data_type): rename to hide.
+ [ruby-core:38972]
+
+Tue Aug 16 18:52:08 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * win32/mkexports.rb (Exports::Mswin#each_export): exclude Init_
+ and _threadptr_ functions, as well as mingw.
+
+Tue Aug 16 09:31:44 2011 Eric Hodel <drbrain@segment7.net>
+
+ * ext/dl: Add documentation. Patch by Vincent Batts.
+ [Ruby 1.9 - Bug #5192]
+
+Tue Aug 16 08:48:26 2011 Eric Hodel <drbrain@segment7.net>
+
+ * ext/.document (fiddle): Remove duplicate entry
+ * ext/fiddle: Complete documentation of Fiddle. Patch by Vincent
+ Batts. [#5192]
+
+Tue Aug 16 08:00:15 2011 Eric Hodel <drbrain@segment7.net>
+
+ * ext/socket: Make Socket documentation appear. Add documentation for
+ Socket, TCPServer, SOCKSSocket. Patch by Sylvain Daubert.
+ [Ruby 1.9 - Feature #5182]
+
+Mon Aug 15 09:58:55 2011 Martin Bosslet <Martin.Bosslet@googlemail.com>
+
+ * ext/openssl/ossl_ssl.c: Support disabling OpenSSL compression.
+
+ * test/openssl/test_ssl.rb: Add a test for it.
+ Thanks to Eric Wong for the patch.
+ [Ruby 1.9 - Feature #5183] [ruby-core:38911]
+
+Sun Aug 14 05:57:01 2011 Tanaka Akira <akr@fsij.org>
+
+ * test/socket/test_socket.rb (test_connect_timeout): added a test
+ based on a patch by Eric Wong. [ruby-core:38910]
+
+Sat Aug 13 22:17:27 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * tool/mkconfig.rb: do not make the entries related to sitedir and
+ verdordir if disabled by --without options. [ruby-core:38922]
+ [Bug #5187]
+
+Sat Aug 13 17:03:22 2011 Tadayoshi Funaba <tadf@dotrb.org>
+
+ * ext/date/date_core.c: [ruby-core:38861]
+
+Sat Aug 13 09:39:07 2011 Tadayoshi Funaba <tadf@dotrb.org>
+
+ * test/date/test_*.rb: added tests.
+
+Sat Aug 13 09:36:19 2011 CHIKANAGA Tomoyuki <nagachika00@gmail.com>
+
+ * ext/date/date_parse.c (parse_ddd_cb): fix r32896. RB_GC_GUARD
+ insertion position was mistaken. [ruby-dev:44337] [Bug #5152]
+
+Sat Aug 13 09:26:24 2011 Aaron Patterson <aaron@tenderlovemaking.com>
+
+ * ext/psych/lib/psych/core_ext.rb: Make Kernel#y private.
+ [ruby-core:38913]
+
+ * test/psych/test_yaml.rb: corresponding test.
+
+Sat Aug 13 09:05:16 2011 Tadayoshi Funaba <tadf@dotrb.org>
+
+ * ext/date/date_core.c (date_strftime_alloc): followed the change
+ of r32885.
+
+ * doc/NEWS-1.9.3: followed the above change.
+
+Sat Aug 13 08:55:38 2011 Aaron Patterson <aaron@tenderlovemaking.com>
+
+ * ext/psych/lib/psych/scalar_scanner.rb: Only consider strings
+ with fewer than 2 dots to be numbers. [ruby-core:38915]
+
+Sat Aug 13 08:47:20 2011 Tadayoshi Funaba <tadf@dotrb.org>
+
+ * ext/date/date_core.c: [ruby-core:38855].
+
+Sat Aug 13 03:41:37 2011 Eric Hodel <drbrain@segment7.net>
+
+ * lib/uri/common.rb: Fix documentation of URI::Parser.new. Patch by
+ Steve Klabnik. [Ruby 1.9 - Bug #5177]
+
+Sat Aug 13 02:19:57 2011 Eric Hodel <drbrain@segment7.net>
+
+ * ext/digest/digest.c: Add documentation for the Digest module. Patch
+ by Sylvain Daubert. [Ruby 1.9 - Bug #5167]
+
+Sat Aug 13 01:56:11 2011 Eric Hodel <drbrain@segment7.net>
+
+ * lib/rake: Update to Rake 0.9.2.2. Prevent pollution of toplevel
+ namespace by Commands. Remove unused variable and debugging
+ statement in tests.
+
+Fri Aug 12 11:39:35 2011 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
+
+ * configure.in: Describe "no" configure option for site_ruby
+ and vendor_ruby. Patch by Vit Ondruch. [Bug #5187][ruby-core:38921]
+
+Fri Aug 12 09:00:24 2011 Eric Hodel <drbrain@segment7.net>
+
+ * lib/rubygems: Import RubyGems 1.8.8. Fixes encoding of YAML gemspec
+ from gems. Github Issue #149
+
+Fri Aug 12 08:17:46 2011 Tanaka Akira <akr@fsij.org>
+
+ * ext/socket/ipsocket.c (init_inetsock_internal): use SOMAXCONN for
+ listen backlog.
+
+ * ext/socket/unixsocket.c (rsock_init_unixsock): ditto.
+
+ * ext/socket/lib/socket.rb (Addrinfo#listen): ditto.
+ (Socket.tcp_server_sockets_port0): ditto.
+
+ * ext/socket/mkconstants.rb: define SOMAXCONN as 5 if not available.
+
+ [ruby-core:38493]
+
+Fri Aug 12 03:24:35 2011 Eric Hodel <drbrain@segment7.net>
+
+ * lib/rdoc: Import RDoc 3.9.2. Fixes TIDYLINK for HTML output.
+
+Thu Aug 11 15:37:42 2011 Hiroshi Nakamura <nahi@ruby-lang.org>
+
+ * variable.c (autoload_delete): An autoload entry is still in a
+ RCLASS_IV_TBL, not in a RCLASS_CONST_TBL, so take back the table
+ changed in r29600. And an autoload entry keeps not a
+ rb_const_entry_t but a NODE so remove rb_const_entry_t thing added
+ in r29602.
+
+Thu Aug 11 15:07:36 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * lib/mkmf.rb (link_command): use LIBRUBYARG in rbconfig for
+ unbundled extensions. [ruby-core:38802] [Bug #5147]
+
+ * lib/mkmf.rb (init_mkmf): revert r32902. [ruby-core:38903]
+
+Wed Aug 10 23:03:55 2011 Tanaka Akira <akr@fsij.org>
+
+ * ext/socket/lib/socket.rb: fix argument check in the previous commit.
+
+Wed Aug 10 22:12:28 2011 Tanaka Akira <akr@fsij.org>
+
+ * ext/socket/lib/socket.rb (Socket.tcp): add :connect_timeout option.
+ (Addrinfo#connect_from): add :timeout option.
+ (Addrinfo#connect): ditto.
+ (Addrinfo#connect_to): ditto.
+ [ruby-core:38538]
+
+Wed Aug 10 21:27:19 2011 Tanaka Akira <akr@fsij.org>
+
+ * lib/net/pop.rb: fix typo in document.
+
+ * lib/net/http.rb: ditto.
+
+ * lib/net/imap.rb: ditto.
+
+Wed Aug 10 19:30:00 2011 Kenta Murata <mrkn@mrkn.jp>
+
+ * complex.c (nucomp_rationalize): calls rationalize of real part if
+ imaginary part is exactly zero. The patch is made by Marc-Andre
+ Lafortune. fixes [Bug #5178] [ruby-core:38885]
+
+ * test/ruby/test_complex.rb (test_rationalize): add a test for the
+ above change.
+
+ * complex.c (nucomp_to_r): fix RDoc comment. The patch is made by
+ Marc-Andre Lafortune.
+
+Wed Aug 10 14:11:07 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * lib/mkmf.rb (init_mkmf): set $LIBRUBYARG regardless of shared
+ option. [ruby-core:38802] [Bug #5147]
+
+Wed Aug 10 02:53:27 2011 NARUSE, Yui <naruse@ruby-lang.org>
+
+ * lib/net/http.rb: come back autoload. OpenSSL constant is used
+ some places, so it leads mistakes like HTTP.start.
+
+Tue Aug 9 22:57:45 2011 CHIKANAGA Tomoyuki <nagachika00@gmail.com>
+
+ * ext/date/date_parse.c (date_zone_to_diff): add RB_GC_GUARD.
+ [ruby-dev:44337] [Bug #5152]
+
+ * ext/date/data_parse.c (parse_ddd_cb): ditto.
+
+Tue Aug 9 14:25:47 2011 Naohisa Goto <ngotogenome@gmail.com>
+
+ * ext/fiddle/conversions.c (generic_to_value): ffi_arg and ffi_sarg
+ should be used to handle shorter return value. fix [Bug #3861]
+ [ruby-core:32504]
+
+ * ext/fiddle/closure.c (callback): ditto
+
+ * ext/fiddle/conversions.h (fiddle_generic): ditto
+
+ * ext/fiddle/conversions.c (value_to_generic): char, short and int
+ are strictly distinguished on big-endian CPU, e.g. sparc64.
+
+Tue Aug 9 11:21:08 2011 Narihiro Nakamura <authornari@gmail.com>
+
+ * gc.c (gc_lazy_sweep): if sweep target slots are not found, we
+ try heap_increment() because it might be able to expand the
+ heap. [Bug #5127] [ruby-dev:44285]
+
+ * gc.c (gc_clear_mark_on_sweep_slots): if a sweeping was
+ interrupted, we expand the heap if at all possible.
+
+Tue Aug 9 12:20:33 2011 Naohisa Goto <ngotogenome@gmail.com>
+
+ * test/fiddle/helper.rb (libc_so, libm_so): Solaris support added.
+ [ruby-core:38853] [Bug #5168]
+
+ * test/dl/test_base.rb (libc_so, libm_so): on Solaris, remove libc
+ and libm version numbers for detecting default libc and libm.
+
+Tue Aug 9 09:18:04 2011 Eric Hodel <drbrain@segment7.net>
+
+ * ext/zlib/zlib.c (gzfile_wrap): Document encoding options.
+
+ * ext/zlib/zlib.c (rb_gzwriter_s_open): ditto
+
+ * ext/zlib/zlib.c (rb_gzreader_s_open): ditto
+
+Sun Aug 7 23:31:32 2011 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
+
+ * time.c (rb_strftime_alloc): raise ERANGE if width is too large.
+ Patch by Nobuyoshi Nakada. [Bug #4457] [ruby-dev:43285]
+
+ * test/ruby/test_time.rb (class TestTime): add a test for the
+ above change.
+
+Sun Aug 7 22:51:45 2011 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
+
+ * ext/openssl/ossl_asn1.c (decode_eoc): remove unused variables.
+ Patch by Eric Wong. [Feature #5157] [ruby-core:38798]
+
+ * ext/openssl/ossl_asn1.c (ossl_asn1_decode): ditto.
+
+ * ext/openssl/ossl_pkey.c (ossl_pkey_new_from_data): ditto.
+
+Sun Aug 7 22:37:08 2011 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
+
+ * configure.in: add -Wunused-variable to default CFLAGS.
+ Patch by Eric Wong. [Feature #5157] [ruby-core:38798]
+
+Sun Aug 7 15:37:35 2011 NARUSE, Yui <naruse@ruby-lang.org>
+
+ * ext/digest/sha2/sha2ossl.c: use original SHA384_Final on DragonFly.
+
+Sun Aug 7 14:08:16 2011 Kazuki Tsujimoto <kazuki@callcc.net>
+
+ * ext/objspace/objspace.c: fix typos in a document.
+
+Sun Aug 7 07:14:57 2011 NARUSE, Yui <naruse@ruby-lang.org>
+
+ * cont.c (HAVE_GETCONTEXT): see getcontext(3) because DragonFly BSD
+ x64 port doesn't have it.
+
+Sun Aug 7 00:42:55 2011 NARUSE, Yui <naruse@ruby-lang.org>
+
+ * ext/tk/lib/tk/wm.rb (Tk::Wm.command): Add the missing receiver
+ before calling epath. patched by flori
+ https://github.com/flori/ruby/commit/aa9474d32e5f2c57f8b0e2e0c528a03f06a4d433
+
+Sat Aug 6 07:06:34 2011 Eric Hodel <drbrain@segment7.net>
+
+ * marshal.c (w_object): Fix exception message when _dump_data is not
+ defined on a T_DATA object.
+
+Fri Aug 5 22:16:20 2011 Naohisa Goto <ngotogenome@gmail.com>
+
+ * numeric.c (rb_infinity, rb_nan): use WORDS_BIGENDIAN to get endian.
+ fix [Bug #5160] [ruby-dev:44356]
+
+Fri Aug 5 17:14:11 2011 Akinori MUSHA <knu@iDaemons.org>
+
+ * test/test_syslog.rb (TestSyslog#test_log): Do not be too
+ specific about the log line format. Fixes #5081.
+
+Fri Aug 5 15:57:10 2011 Naohisa Goto <ngotogenome@gmail.com>
+
+ * complex.c (f_signbit): fix compile error in gcc4 on Solaris with
+ CFLAGS="-std=gnu99". [ruby-dev:44355] fix [Bug #5159]
+
+ * math.c: ditto.
+
+Fri Aug 5 15:55:33 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * test/ruby/test_object.rb: tests that respond_to? returns false.
+
+Fri Aug 5 13:32:43 2011 Shugo Maeda <shugo@ruby-lang.org>
+
+ * lib/xmlrpc/client.rb, lib/xmlrpc/server.rb: should use
+ String#bytesize instead of String#size.
+
+Fri Aug 5 12:18:20 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * vm_eval.c (check_funcall): try respond_to? first if redefined.
+ [Bug #5158]
+
+Fri Aug 5 09:48:22 2011 Eric Hodel <drbrain@segment7.net>
+
+ * lib/rubygems: Import RubyGems 1.8.7:
+ Added missing require for `gem uninstall --format-executable`.
+
+ The correct name of the executable being uninstalled is now displayed
+ with --format-executable.
+
+ Fixed `gem unpack uninstalled_gem` default version picker.
+
+ RubyGems no longer claims a nonexistent gem can be uninstalled.
+
+ `gem which` no longer claims directories are requirable files.
+
+ `gem cleanup` continues cleaning up gems if one can't be uninstalled
+ due to permissions. Issue #82.
+
+ Gem repository directories are no longer created world-writable.
+ Patch by Sakuro OZAWA. [Ruby 1.9 - Bug #4930]
+
+Fri Aug 5 07:00:31 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * test/io/console/test_io_console.rb (test_noctty): daemon() on
+ Fedora Rawhide seems not to detach the controlling terminal,
+ when the argument noclose is non-zero. ref: [Bug #5135]
+
+Thu Aug 4 23:48:00 2011 Kenta Murata <mrkn@mrkn.jp>
+
+ * thread_pthread.c (native_cond_signal): retry to call pthread_cond_signal
+ and pthread_cond_broadcast if they return EAGAIN in
+ native_cond_signal and native_cond_broadcast, respectively.
+ It is for the pthread implementation of Mac OS X 10.7 (Lion).
+ fixes #5155. [ruby-dev:44342].
+
+ * thread_pthread.c (native_cond_broadcast): ditto.
+
+ * thread_pthread.c (struct cached_thread_entry): stop using
+ pthread_cond_t and its functions directly.
+
+ * thread_pthread.c (register_cached_thread_and_wait): ditto.
+
+ * thread_pthread.c (use_cached_thread): ditto.
+
+Thu Aug 4 20:29:41 2011 Naohisa Goto <ngotogenome@gmail.com>
+
+ * configure.in: when Solaris cc, use $(CC) to link shared libs.
+
+Thu Aug 4 20:19:11 2011 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
+
+ * error.c (report_bug): use a small message buffer instead of BUFSIZ.
+ It is needed for avoiding nested SIGSEGV on Linux.
+ Note: BUFSIZ is not proper buffer size. It's unrelated with maximum
+ filename length. :-/
+ [Bug #5139] [ruby-dev:44315]
+
+Thu Aug 4 16:08:45 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * tool/rbinstall.rb (gem): install all gemspecs under lib and ext.
+
+ * tool/rbinstall.rb (Gem::Specification): may not be defined when
+ cross-compiling and BASERUBY is 1.8.
+
+Thu Aug 4 11:30:36 2011 NARUSE, Yui <naruse@ruby-lang.org>
+
+ * include/ruby/missing.h: define __syscall on OpenBSD as r32702.
+
+Thu Aug 4 03:02:54 2011 Aaron Patterson <aaron@tenderlovemaking.com>
+
+ * tool/rbinstall.rb: use rubygems to load gemspecs, copy actual
+ gemspecs on install rather than generate fake ones for all gems.
+
+Thu Aug 4 02:45:10 2011 Kenta Murata <mrkn@mrkn.jp>
+
+ * configure.in: set CXX variable to the C++ compiler that matches the
+ C compiler specified by CC variable (e.g. use g++-4.2 for gcc-4.2).
+
+Thu Aug 4 02:21:10 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * lib/mkmf.rb (link_command): use static library only for bundled
+ extensions. [Bug #5147]
+
+Thu Aug 4 02:02:10 2011 Aaron Patterson <aaron@tenderlovemaking.com>
+
+ * ext/psych/psych.gemspec: installing psych as a gem.
+
+Wed Aug 3 16:01:35 2011 NAKAMURA Usaku <usa@ruby-lang.org>
+
+ * util.c, include/ruby/util.h (ruby_add_suffix): remove the function.
+ [Bug #5153] [ruby-core:38736]
+
+ * io.c (argf_next_argv): remove the call of above function.
+
+ * ext/-test-/add_suffix, test/-ext-/test_add_suffix.rb: remove the test
+ extension module because this is only for testing ruby_add_suffix().
+
+ * LEGAL: remove the mention about a part of util.c, because now we
+ removed the part.
+
+ * io.c (argf_next_argv): now the new filename is not guaranteed to
+ use, so should check the return value of rename(2).
+
+ * test/ruby/test_argf.rb (TestArgf#test_inplace_rename_impossible):
+ now we expect same result with other platforms on no_safe_rename
+ platforms (=Windows).
+
+Wed Aug 3 09:18:08 2011 URABE Shyouhei <shyouhei@ruby-lang.org>
+
+ * test/xmlrpc/webrick_testing.rb (WEBrick_Testing#start_server):
+ Like r32795, bind address should be specified.
+
+Wed Aug 3 07:46:30 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * encoding.c (enc_find): mistakenly remained !. [Bug #5150]
+
+Wed Aug 3 00:11:08 2011 Tanaka Akira <akr@fsij.org>
+
+ * lib/prettyprint.rb: update document. [ruby-core:36776]
+
+Tue Aug 2 22:04:46 2011 NARUSE, Yui <naruse@ruby-lang.org>
+
+ * gc.c (init_heap): allocate sigaltstack after heaps are allocated.
+ [ruby-dev:44315] [Bug #5139]
+
+ * vm.c (thread_free): use free because objspace is not ready.
+
+ * vm.c (th_init): use malloc because objspace is not ready.
+
+Tue Aug 2 20:10:16 2011 Shota Fukumori <sorah@tubusu.net>
+
+ * test/testunit/test_parallel.rb: pass "--ruby" option to
+ test/testunit/tests_for_parallel/runner.rb. [Bug #5132] [ruby-dev:44303]
+
+Tue Aug 2 15:53:37 2011 NARUSE, Yui <naruse@ruby-lang.org>
+
+ * encoding.c (str_to_encoding): rename from to_encoding and
+ use str_to_encindex.
+
+ * encoding.c (str_to_encindex): split from to_encoding.
+
+ * encoding.c (rb_to_encoding): use str_to_encoding.
+
+ * encoding.c (rb_obj_encoding): don't bypass rb_encoding*.
+ If it uses rb_encoding*, it bypass encindex. If it uses encindex,
+ it doesn't bypass.
+
+ * encoding.c (enc_find): add shortcut for encoding object, use
+ str_to_encindex, and avoid bypass rb_encoding*.
+
+Tue Aug 2 12:03:16 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * hash.c (recursive_hash): hash value of emptied hash should be
+ equal to an empty hash. [ruby-core:38650]
+
+Tue Aug 2 11:42:15 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * parse.y (rb_enc_symname2_p): :! is valid symbol. [Bug #5136]
+
+Tue Aug 2 07:33:29 2011 URABE Shyouhei <shyouhei@ruby-lang.org>
+
+ * test/net/http/test_http.rb (TestNetHTTP_version_1_1_methods#test_timeout_during_HTTP_session):
+ If you connect to localhost, you should listen localhost.
+
+ * test/net/http/test_https.rb (TestNetHTTPS#test_timeout_during_SSL_handshake):
+ ditto.
+
+Tue Aug 2 06:18:15 2011 Luis Lavena <luislavena@gmail.com>
+
+ * lib/rubygems/installer.rb (class Gem): Correct path check on Windows
+ Possible fix for [Ruby 1.9 - Bug #5111]
+ * test/rubygems/test_gem_installer.rb (load Gem): ditto
+
+Mon Aug 1 20:12:03 2011 NAKAMURA Usaku <usa@ruby-lang.org>
+
+ * test/ruby/test_process.rb (TestProcess#windows?): new method.
+
+ * test/ruby/test_process.rb (TestProcess#*): use above method.
+
+ * test/ruby/test_process.rb (TestProcess#test_execopts_redirect):
+ windows doesn't support FD_CLOEXEC.
+
+Mon Aug 1 15:45:23 2011 Eric Hodel <drbrain@segment7.net>
+
+ * test/rake/test_rake_functional.rb: Don't assume the binary name of
+ ruby is "ruby". [Ruby 1.9 - Bug #5114]
+ * test/rake/helper.rb: ditto
+
+Mon Aug 1 15:31:14 2011 URABE Shyouhei <shyouhei@ruby-lang.org>
+
+ * test/io/console/test_io_console.rb (TestIO_Console#test_sync):
+ Skip when PTY allocation failed (that's not our fault).
+
+Mon Aug 1 15:04:12 2011 URABE Shyouhei <shyouhei@ruby-lang.org>
+
+ * test/xmlrpc/test_webrick_server.rb (Test_Webrick#setup_http_server):
+ XMLRPC::Client.new3(), when called without host: argument, tries
+ to connect to a host where "localhost" resolves to. On the
+ other hand a WEBrick::HTTPServer.new(), when called without
+ BindAddress: argument, tries to listen all the address where
+ getaddrinfo(AF_UNSPEC) resolves to. This is a mismatch because
+ "localhost" might not resolve to one of those listening sockets.
+ We would better explicitly specify "localhost" here and if
+ failed, just skip the whole test.
+
+Mon Aug 1 14:24:56 2011 Eric Hodel <drbrain@segment7.net>
+
+ * lib/rdoc.rb: Import RDoc 3.9.1. Fixes bugs in the RDoc::Markup
+ parser.
+
+Mon Aug 1 12:00:35 2011 NARUSE, Yui <naruse@ruby-lang.org>
+
+ * insns.def (concatstrings): don't use initial ASCII-8BIT string.
+ [ruby-core:38635] [Bug #5126]
+
+Sun Jul 31 22:57:16 2011 Yuki Sonoda (Yugui) <yugui@yugui.jp>
+
+ * enc/Makefile.in (ECHO1): Same as the recent fix in common.mk.
+ ":" in a make variable replacement cause a syntax error with
+ /usr/ccs/bin/make on Solaris. Uses $(NULLCMD) instead.
+
+Sun Jul 31 21:16:02 2011 Yuki Sonoda (Yugui) <yugui@yugui.jp>
+
+ * complex.c (f_signbit): gcc4 on Solaris DOES have signbit but does
+ not have it on header.
+
+ * math.c: ditto.
+
+Sun Jul 31 21:09:04 2011 Yuki Sonoda (Yugui) <yugui@yugui.jp>
+
+ * common.mk (node_name.inc): Use $(Q) for consistency.
+
+ * Makefile.in (INSNS): ditto.
+
+Sun Jul 31 21:19:51 2011 Yuki Sonoda (Yugui) <yugui@yugui.jp>
+
+ * lib/mkmf.rb (configuration:ECHO1): Same as the recent fix in
+ common.mk.
+ ":" in a make variable replacement cause a syntax error with
+ /usr/ccs/bin/make on Solaris. Uses $(NULLCMD) instead.
+
+Sun Jul 31 20:39:12 2011 Yuki Sonoda (Yugui) <yugui@yugui.jp>
+
+ * common.mk (ECHO1): nmake does not allow parenthesis in make variable
+ replacement.
+
+Sun Jul 31 23:06:57 2011 Kazuki Tsujimoto <kazuki@callcc.net>
+
+ * vm.c (check_env): print debug messages to stderr.
+ [Feature #4871] [ruby-dev:43743]
+
+Sun Jul 31 22:50:23 2011 Kazuki Tsujimoto <kazuki@callcc.net>
+
+ * vm.c (vm_make_env_each): don't save prev env value.
+ It is no longer used. [Feature #4871] [ruby-dev:43743]
+
+ * vm.c (check_env): changed accordingly.
+
+Sun Jul 31 20:21:36 2011 "Yuki Sonoda (Yugui)" <yugui@yugui.jp>
+
+ * common.mk (ECHO1): ":" in a make variable replacement cause a syntax
+ error with /usr/ccs/bin/make on Solaris. Uses $(NULLCMD) instead.
+
+ * configure.in (NULLCMD): new check.
+
+ * Makefile.in (NULLCMD): Reflects checking in configure.
+
+ * win32/Makefile.sub (NULLCMD): new assignment.
+
+Sun Jul 31 18:58:59 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * io.c (rb_pipe): pipe on cygwin can succeed half but fail
+ half.
+
+Sun Jul 31 11:31:07 2011 Kazuki Tsujimoto <kazuki@callcc.net>
+
+ * vm.c: check if cfp is valid. [Bug #5083] [ruby-dev:44208]
+
+Sun Jul 31 09:18:28 2011 Eric Hodel <drbrain@segment7.net>
+
+ * lib/rdoc: Update to RDoc 3.9. Fixed `ri []`, stopdoc creating an
+ object reference, nodoc for class aliases, verbatim === lines.
+
+Sun Jul 31 01:29:08 2011 NARUSE, Yui <naruse@ruby-lang.org>
+
+ * io.c (rb_io_each_byte): remove unused variable e.
+
+Sat Jul 31 01:23:45 2011 Kenta Murata <mrkn@mrkn.jp>
+
+ * test/bigdecimal/test_bigdecimal.rb (test_version): removed.
+
+Sat Jul 30 23:19:09 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * defs/default_gems: separate from tool/rbinstall.rb.
+
+Sat Jul 30 23:14:44 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * io.c (rb_io_each_byte): rbuf can be refreshed during yield.
+ [Bug #5119]
+
+Sat Jul 30 22:35:50 2011 Naohisa Goto <ngotogenome@gmail.com>
+
+ * strftime.c (NEEDS): avoid SEGV due to integer overflow in
+ sparc-solaris2.10 and i686-linux. fix [Bug #4456] [ruby-dev:43284]
+
+Sat Jul 30 17:26:26 2011 Masaki Suketa <masaki.suketa@nifty.ne.jp>
+
+ * test/win32ole/test_win32ole_variant.rb: use skip method to skip the test.
+
+ * test/win32ole/test_win32ole_variant_outarg.rb: ditto.
+
+Sat Jul 30 14:27:00 2011 Kenta Murata <mrkn@mrkn.jp>
+
+ * ext/bigdecimal/bigdecimal.c (BigDecimal_version): version 1.1.0.
+
+ * ext/bigdecimal/bigdecimal.gemspec: turn into a default gem.
+
+ * tool/rbinstall.rb: ditto.
+
+Sat Jul 30 11:21:55 2011 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
+
+ * vm_core.h (ALT_STACK_SIZE): use MINSIGSTKSZ*2 instead of SIGSTKSZ*2.
+ [ruby-core:38607]
+
+Sat Jul 30 10:39:14 2011 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
+
+ * vm.c (th_init): preallocate alternative stack.
+ NoMemoryError is better than rb_bug, of course.
+ Patch by Eric Wong. [ruby-core:38572][ruby-core:38594].
+
+ * signal.c (rb_register_sigaltstack): ditto.
+
+ * vm_core.h: moved ALT_STACK_SIZE definition from signal.c.
+ * vm.c (thread_free): use xfree() instead of free().
+
+Sat Jul 30 07:20:49 2011 Tanaka Akira <akr@fsij.org>
+
+ * ext/socket/lib/socket.rb (udp_server_sockets): unused variable
+ removed.
+ patch by Jeremy Evans. [ruby-core:38600]
+
+Fri Jul 29 23:56:32 2011 Tanaka Akira <akr@fsij.org>
+
+ * lib/securerandom.rb: call OpenSSL::Random.seed at the
+ SecureRandom.random_bytes call.
+ based on the patch by Masahiro Tomita. [ruby-dev:44270]
+
+Fri Jul 29 23:53:48 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * array.c (rb_ary_set_len): new function to set array length.
+
+ * vm_eval.c (method_missing): set the length of argv array, to mark
+ arguments.
+
+ * vm_eval.c (rb_apply): get rid of too large alloca.
+
+Fri Jul 29 20:48:39 2011 Tanaka Akira <akr@fsij.org>
+
+ * ext/socket/mkconstants.rb: fix typos.
+
+Fri Jul 29 20:28:56 2011 Tanaka Akira <akr@fsij.org>
+
+ * ext/socket/mkconstants.rb: use whitespaces as a separator.
+
+Fri Jul 29 18:59:07 2011 Tanaka Akira <akr@fsij.org>
+
+ * ext/socket/mkconstants.rb: add documents for constants.
+ patch by Eric Hodel. [ruby-core:37853] [Bug #4989]
+
+Fri Jul 29 16:00:43 2011 NARUSE, Yui <naruse@ruby-lang.org>
+
+ * configure.in (enable_pthread): use -pthread on OpenBSD without
+ explicit option. patched by Jeremy Evans. [ruby-core:38572]
+
+Thu Jul 28 23:36:28 2011 CHIKANAGA Tomoyuki <nagachika00@gmail.com>
+
+ * ext/fiddle/closure.c (callback): use rb_ary_tmp_new() instead of
+ xmalloc() to allocate an array for arguments of callback procedure,
+ to prevent arguments from being swept by GC. [ruby-core:38546]
+ [Bug #4929]
+
+Thu Jul 28 22:36:06 2011 Hiroshi Nakamura <nahi@ruby-lang.org>
+
+ * ext/openssl/ossl_cipher.c (ossl_cipher_initialize): Avoid possible
+ SEGV from AES encryption/decryption. Processing data by
+ Cipher#update without initializing key (meaningless usage of Cipher
+ object since we don't offer a way to export a key) could cause SEGV.
+
+ In OpenSSL, the EVP which has EVP_CIPH_RAND_KEY flag (such as DES3)
+ allows uninitialized key, but other EVPs (such as AES) does not
+ allow it. Calling EVP_CipherUpdate() without initializing key causes
+ SEGV so we set the data filled with "\0" as the key by default. See
+ #2768.
+
+ * test/openssl/test_cipher.rb: test it.
+
+Thu Jul 28 14:25:08 2011 NAKAMURA Usaku <usa@ruby-lang.org>
+
+ * lib/rubygems/user_interaction.rb (Gem::StreamUI#tty?): typo.
+
+Thu Jul 28 12:32:53 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * ext/dl/callback/mkcallback.rb (gencallback): use PTR2NUM.
+
+ * ext/dl/cptr.c (rb_dlptr_aref, rb_dlptr_aset): check NULL pointer
+ dereference.
+
+ * ext/dl/cptr.c (rb_dlptr_s_to_ptr): use rb_check_funcall.
+
+ * ext/dl/cptr.c (rb_dlptr_s_to_ptr): fix wrapping condition.
+
+Thu Jul 28 04:53:31 2011 Eric Hodel <drbrain@segment7.net>
+
+ * lib/delegate.rb: Move file-level documentation to the appropriate
+ classes.
+
+Thu Jul 28 02:15:04 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * ext/dl/cfunc.c (dlcfunc_mark), ext/dl/cptr.c (dlptr_mark):
+ workaround to mark wrapped object. this is not a true fix,
+ because [Bug #4929] is caused by the interface design of DL.
+
+Thu Jul 28 00:28:15 2011 NARUSE, Yui <naruse@ruby-lang.org>
+
+ * test/fileutils/test_fileutils.rb: add OpenBSD case.
+ patched by Jeremy Evans [ruby-core:38530] see #5097
+
+ * test/ruby/test_process.rb: ditto.
+
+Wed Jul 27 22:46:59 2011 CHIKANAGA Tomoyuki <nagachika00@gmail.com>
+
+ * test/rinda/test_rinda.rb (test_remote_array_and_hash):
+ add local variables to protect objects from GC. [ruby-dev:44253]
+ [Bug #5104]
+
+Wed Jul 27 17:55:54 2011 NARUSE, Yui <naruse@ruby-lang.org>
+
+ * include/ruby/missing.h: define __syscall if the platform has
+ __syscall in the library but doesn't define it in headers
+ for example Mac OS X.
+
+Wed Jul 27 15:39:14 2011 Eric Hodel <drbrain@segment7.net>
+
+ * object.c: Add usage documentation for BasicObject. Based on patch
+ by Thomas Sawyer. [Ruby 1.9 - Bug #5067]
+
+Wed Jul 27 12:24:17 2011 Eric Hodel <drbrain@segment7.net>
+
+ * lib/rubygems/uninstaller.rb: Add missing require and update
+ messaging to avoid confusion with uninstall --format-executable.
+ [Ruby 1.9 - Bug #4062]
+
+Wed Jul 27 09:34:24 2011 Eric Hodel <drbrain@segment7.net>
+
+ * lib/rubygems: Update to RubyGems 1.8.6.1.
+
+Wed Jul 27 09:27:59 2011 Martin Bosslet <Martin.Bosslet@googlemail.com>
+
+ * test/openssl/test_pkcs12.rb: Add test and intermediate certificates.
+ [ Ruby 1.9 - Feature #3793 ] [ruby-core:32088]
+
+Wed Jul 27 01:05:32 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * eval_error.c (rb_print_undef_str): new function to raise
+ NameError for undefined method.
+
+ * load.c (rb_mod_autoload_p), object.c (rb_mod_const_get),
+ variable.c (rb_f_untrace_var, set_const_visibility), vm_method.c
+ (rb_mod_{remove,undef,alias}_method, set_method_visibility):
+ remove inadvertent symbol creation. based on the first patch by
+ Jeremy Evans at [ruby-core:38447]. [Feature #5089]
+
+ * vm_method.c (obj_respond_to): fix the respond_to_missing? override
+ case. based on the patch by Jeremy Evans at [ruby-core:38417].
+ [Feature #5072]
+
+ * parse.y (rb_check_id): make the given name a symbol or a string.
+ based on the second patch by Jeremy Evans at [ruby-core:38447]
+
+Wed Jul 27 00:50:00 2011 Kenta Murata <mrkn@mrkn.jp>
+
+ * ext/bigdecimal/lib/bigdecimal/util.rb (Rational#to_d):
+ zero or negative precision is error. fixes #5098.
+ [ruby-dev:44210]
+
+ * test/bigdecimal/test_bigdecimal_util.rb: add test for the above
+ change.
+
+Wed Jul 27 00:48:00 2011 Kenta Murata <mrkn@mrkn.jp>
+
+ * ext/bigdecimal/lib/bigdecimal/util.rb (Float#to_d): modified for
+ specifying precision. fixes #5098. [ruby-dev:44210]
+
+ * test/bigdecimal/test_bigdecimal_util.rb: add test for the above
+ change.
+
+Wed Jul 27 00:45:00 2011 Kenta Murata <mrkn@mrkn.jp>
+
+ * ext/bigdecimal/lib/bigdecimal/util.rb (Integer#to_d): added
+ for symmetry to BigDecimal() function with an Integer.
+ fixes #5098. [ruby-dev:44210]
+
+ * test/bigdecimal/test_bigdecimal_util.rb: add test for the above
+ change.
+
+Wed Jul 27 00:30:00 2011 Kenta Murata <mrkn@mrkn.jp>
+
+ * ext/bigdecimal/lib/bigdecimal/util.rb (BigDecimal#to_d): added
+ for adapting other Numeric subclasses. [ruby-dev:44245]
+
+ * test/bigdecimal/test_bigdecimal_util.rb: test for the above change.
+
+Wed Jul 27 00:27:00 2011 Kenta Murata <mrkn@mrkn.jp>
+
+ * bigdecimal/bigdecimal.c (VpDup) a new function for duplicating
+ a BigDecimal.
+
+ * bigdecimal/bigdecimal.c (BigDecimal_new): support generating a new
+ BigDecimal from another BigDecimal using BigDecimal global function
+ or constructor. [ruby-dev:44245]
+
+Tue Jul 26 23:33:24 2011 Igor Zubkov <igor.zubkov@gmail.com>
+
+ * array.c: Fix typo. https://github.com/ruby/ruby/pull/36
+
+Mon Jul 25 23:51:01 2011 Yusuke Endoh <mame@tsg.ne.jp>
+
+ * proc.c: pre-allocate the unlinked_method_entry_list_entry struct to
+ avoid memory allocation during GC. based on a patch from Eric Wong.
+ [ruby-core:38498]
+
+Mon Jul 25 23:39:33 2011 NAKAMURA Usaku <usa@ruby-lang.org>
+
+ * test/rake/test_rake_directory_task.rb (TestRakeDirectoryTask#
+ test_directory_win32): fixed wrong test.
+
+Mon Jul 25 22:36:11 2011 Yusuke Endoh <mame@tsg.ne.jp>
+
+ * proc.c (struct METHOD), gc.c (gc_marks), vm_method.c
+ (rb_gc_mark_unlinked_live_method_entries): fix SEGV bug.
+ rb_method_entry_t was free'd even when the method is still on the
+ stack if it is BMETHOD (i.e., Method#call). This is because
+ rb_method_entry_t is embedded in struct METHOD. This commit
+ separates them and marks the live method entries.
+ See [ruby-core:38449] in detail. fix [Bug #5047] [ruby-core:38171]
+
+Mon Jul 25 22:14:37 2011 Hiroshi Nakamura <nahi@ruby-lang.org>
+
+ * lib/xmlrpc/client.rb: Fix possible HTTP header formatting failure by
+ 'Basic' header. Long username caused the base64 String truncation in
+ HTTP header which is not allowed. See #5046.
+
+ * test/xmlrpc/test_webrick_server.rb: test it.
+
+Mon Jul 25 15:04:33 2011 Hiroshi Nakamura <nahi@ruby-lang.org>
+
+ * ext/openssl/lib/openssl.rb: End of transition period introduced by
+ [ruby-dev:38018]. From the next version of 1.9.3, you should use
+ require "openssl"
+ instead of
+ require "openssl/ssl"
+ and
+ require "openssl/x509"
+
+Mon Jul 25 13:46:38 2011 Hiroshi Nakamura <nahi@ruby-lang.org>
+
+ * ext/openssl/lib/openssl/x509.rb: Cosmetic change: move definition
+ introduced in r30152 to x509-internal.rb.
+
+Mon Jul 25 13:09:42 2011 Hiroshi Nakamura <nahi@ruby-lang.org>
+
+ * ext/openssl/ossl_ssl.c (ossl_ssl_shutdown): Avoid randomly generated
+ SSLError from SSLSocket just after invoking SSLSocket#close.
+ OpenSSL's SSL_shutdown could try to send alert packet and it might
+ set SSLerr(global error stack) as the result. It causes the next
+ SSL read/write operation to fail by unrelated reason.
+
+ By design, we're ignoring any error at SSL_shutdown() so we clear
+ global error stack after SSL_shutdown is called. See #5039.
+
+Sun Jul 24 20:29:53 2011 Tanaka Akira <akr@fsij.org>
+
+ * ext/socket/extconf.rb: refine the recvmsg test.
+
+Sun Jul 24 20:02:31 2011 Tanaka Akira <akr@fsij.org>
+
+ * ext/socket/extconf.rb: fix the recvmsg test.
+
+Sun Jul 24 08:42:51 2011 Tanaka Akira <akr@fsij.org>
+
+ * ext/socket/extconf.rb: test recvmsg allocates file descriptors for
+ fd passing even with MSG_PEEK.
+
+ * ext/socket/ancdata.c: use the above test result.
+
+Sun Jul 24 01:04:50 2011 Eric Hodel <drbrain@segment7.net>
+
+ * lib/rubygems/specification.rb: Restore behavior of
+ Gem::Specification#loaded. [Ruby 1.9 - Bug #5032]
+
+Sun Jul 24 00:05:00 2011 Jeremy Evans <merch-redmine@jeremyevans.net>
+
+ * error.c (rb_name_error_str): new function to raise NameError
+ with the name string but not ID.
+
+ * object.c, proc.c, variable.c: more removal of inadvertent symbol
+ creation. [Feature #5079]
+
+Sat Jul 23 21:14:00 2011 Tadayoshi Funaba <tadf@dotrb.org>
+
+ * lib/cmath.rb (cbrt): should return a real number if possible.
+
+Sat Jul 23 20:12:52 2011 NARUSE, Yui <naruse@ruby-lang.org>
+
+ * test/rake/test_rake_functional.rb (setup): Use __FILE__ for the base
+ directory. Current directory is not the top source directory when
+ the building process runs on other than there.
+
+ * test/rake/test_rake_rake_test_loader.rb: ditto.
+
+ * test/rake/test_rake_task_argument_parsing.rb
+ (test_terminal_width_using_hardcoded_80): hardcoded 80 is used
+ when app.unix? is false.
+
+Sat Jul 23 20:11:50 2011 Tadayoshi Funaba <tadf@dotrb.org>
+
+ * ext/date/date_core.c: an issue that is same as [ruby-dev:44071].
+ * ext/date/date_strftime.c: identical to [ruby-dev:44112].
+
+Sat Jul 23 19:12:53 2011 Masaki Suketa <masaki.suketa@nifty.ne.jp>
+
+ * test/win32ole/test_err_in_callback.rb (test_err_in_callback):
+ skip test if ADODB.connection is not available.
+
+Sat Jul 23 15:37:04 2011 NARUSE, Yui <naruse@ruby-lang.org>
+
+ * parse.y (rb_enc_symname_type): :$a!, @a! and so on are not
+ valid symbols, so they should be inspected with quotes.
+
+Sat Jul 23 17:06:25 2011 Tanaka Akira <akr@fsij.org>
+
+ * io.c (rb_update_max_fd): validate fd.
+
+ * ext/socket/rubysocket.h (rsock_discard_cmsg_resource): add
+ msg_peek_p argument for the declaration.
+
+ * ext/socket/ancdata.c (discard_cmsg): add msg_peek_p argument.
+ assume FreeBSD, NetBSD and MacOS X doesn't generate passed fd
+ when MSG_PEEK.
+ (rsock_discard_cmsg_resource): add msg_peek_p argument.
+ (bsock_recvmsg_internal): call rsock_discard_cmsg_resource with
+ msg_peek_p argument.
+
+ * ext/socket/unixsocket.c (unix_recv_io): call
+ rsock_discard_cmsg_resource with msg_peek_p argument.
+
+Sat Jul 23 14:38:28 2011 Eric Hodel <drbrain@segment7.net>
+
+ * test/rake*: Remove dependencies on flexmock and session gems.
+ [Ruby 1.9 - Bug #4987]
+
+Sat Jul 23 12:19:04 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * parse.y (rb_check_id): take care of attrset ID created
+ implicitly by local ID. [Bug #5084]
+
+ * parse.y (rb_check_id): conversion condition was inverse.
+ [Bug #5084]
+
+Fri Jul 22 21:46:54 2011 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
+
+ * vm_insnhelper.c (vm_call_cfunc): added volatile for a workaround
+ of cfp consistency error problem on OS X 10.7 (Lion). It's
+ suspected llvm optimization bug.
+ [Bug #5074] [ruby-dev:44185]
+
+Fri Jul 22 21:18:20 2011 NARUSE, Yui <naruse@ruby-lang.org>
+
+ * lib/uri/generic.rb (WFKV_): unroll the loop of regexp.
+
+ * lib/uri/generic.rb (URI.decode_www_form_component): ditto.
+
+Fri Jul 22 21:06:39 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * object.c (rb_mod_{const,cvar}_defined, rb_obj_ivar_defined):
+ avoid inadvertent symbol creation in reflection methods. based
+ on a patch by Jeremy Evans at [ruby-core:38367]. [Feature #5072]
+
+ * vm_method.c (rb_mod_method_defined)
+ (rb_mod_{public,private,protected}_method_defined)
+ (obj_respond_to): ditto.
+
+ * parse.y (rb_check_id): new function returns already interned ID
+ or 0.
+
+Fri Jul 22 20:44:49 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * parse.y (rb_is_global_id, rb_is_attrset_id): add missing
+ predicates.
+
+Fri Jul 22 20:24:38 2011 Kazuhiro NISHIYAMA <zn@mbf.nifty.com>
+
+ * test/ruby/test_object.rb (TestObject#test_respond_to_missing):
+ 2nd argument of respond_to_missing? is not optional.
+
+Fri Jul 22 19:05:47 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * parse.y (rb_enc_symname2_p): get rid of potential out-of-bound
+ access.
+
+Fri Jul 22 13:55:59 2011 Eric Hodel <drbrain@segment7.net>
+
+ * lib/net/http.rb: Net::HTTP#finish is used to manually close
+ connections. [Ruby 1.9 - Bug #5045]
+
+Fri Jul 22 13:51:29 2011 Eric Hodel <drbrain@segment7.net>
+
+ * ext/readline/readline.c: Add examples for Readline.completion_proc=.
+ [Ruby 1.9 - Bug #5057]
+
+Fri Jul 22 13:03:12 2011 Martin Bosslet <Martin.Bosslet@googlemail.com>
+
+ * ext/openssl/ossl_hmac.c: Revert checking return type of
+ HMAC_Init_ex as it is not compatible with OpenSSL < 1.0.0.
+
+Fri Jul 22 12:10:21 2011 Eric Hodel <drbrain@segment7.net>
+
+ * tool/rbinstall.rb (default gems): Install executables into the fake
+ gem dir for Gem.bin_path. [#4485]
+
+Fri Jul 22 11:20:20 2011 Martin Bosslet <Martin.Bosslet@googlemail.com>
+
+ * ext/openssl/ossl_digest.c: Check return value of EVP_DigestInit_ex.
+ * ext/openssl/ossl_hmac.c: Check return value of HMAC_Init_ex.
+ Thanks, Jared Jennings, for the patch.
+ [ Ruby 1.9 - Bug #4944 ] [ruby-core:37670]
+
+Fri Jul 22 09:09:43 2011 Martin Bosslet <Martin.Bosslet@googlemail.com>
+
+ * ext/openssl/ossl_engine.c: Avoid double free of ENGINE reference.
+ * test/openssl/test_engine.rb: Add a test for it.
+ Thanks to Ippei Obayashi for providing the patch.
+ [ Ruby 1.9 - Bug #5062 ] [ruby-dev:44173]
+
+Fri Jul 22 06:37:13 2011 Marc-Andre Lafortune <ruby-core@marc-andre.ca>
+
+ * lib/csv.rb: Do not modify CSV.generate's argument [ruby-core:38356]
+
+Thu Jul 21 20:59:59 2011 Tanaka Akira <akr@fsij.org>
+
+ * ext/socket/ancdata.c (discard_cmsg): workaround for MacOS X Lion.
+
+Thu Jul 21 20:02:11 2011 Yusuke Endoh <mame@tsg.ne.jp>
+
+ * thread.c (set_trace_func, thread_set_trace_func_m): reset tracing
+ state when set_trace_func hook is removed. This is workaround patch
+ to force to reset tracing state that is broken by continuation call.
+ a patch from James M. Lawrence. [Feature #4347] [ruby-core:34998]
+
+ * test/ruby/test_continuation.rb (class TestContinuation): add a test
+ for above. a patch from James M. Lawrence.
+
+Thu Jul 21 19:27:19 2011 Yusuke Endoh <mame@tsg.ne.jp>
+
+ * node.c (dump_node): add today's knowledge. "init arguments (m)" and
+ "init arguments (p)" of compile.c indicates a Ruby code that
+ evaluates multiple assignments that is in method or block
+ parameters: def foo((m1,m2), (m3,m4), *r, (p1,p2), (p3,p4)); end
+ The former (init arguments (m)) evaluates the multiple assignments
+ before rest argument, that are (m1,m2) and (m3,m4). The letter
+ (init arguments (p)) does ones after rest argument, that are
+ (p1,p2) and (p3, p4).
+
+Thu Jul 21 18:11:07 2011 NARUSE, Yui <naruse@ruby-lang.org>
+
+ * enum.c (enum_inject): remove empty line to notify rdoc
+ Enumerable#reduce is alias. patched by milki@github.
+ https://github.com/ruby/ruby/pull/26
+
+Thu Jul 21 17:30:21 2011 NARUSE, Yui <naruse@ruby-lang.org>
+
+ * array.c (rb_ary_delete_at_m): use simple array literal in rdoc.
+ patched by samuel tonini. [ruby-core:38310] [Bug #5066]
+
+Thu Jul 21 17:14:21 2011 NARUSE, Yui <naruse@ruby-lang.org>
+
+ * lib/webrick/httprequest.rb (WEBrick::HTTPRequest#each):
+ Allow HTTP/0.9 request which doesn't has any header or body.
+ patched by Felix Jodoin. [ruby-core:38040] [Bug #5022]
+
+Wed Jul 20 23:02:18 2011 Kazuhiro NISHIYAMA <zn@mbf.nifty.com>
+
+ * io.c (rb_update_max_fd): remove parentheses. they are not in
+ macro.
+
+Wed Jul 20 22:22:23 2011 Tanaka Akira <akr@fsij.org>
+
+ * include/ruby/intern.h (rb_update_max_fd): declaration moved from
+ internal.h.
+
+ * file.c: ditto.
+
+ * io.c: call rb_update_max_fd for each new fds.
+
+ * process.c: ditto.
+
+ * random.c: ditto.
+
+ * ruby.c: ditto.
+
+ * ext/io/console/console.c: ditto.
+
+ * ext/openssl/ossl_bio.c: ditto.
+
+ * ext/pty/pty.c: ditto.
+
+ * ext/socket/init.c: ditto.
+
+ * ext/socket/socket.c: ditto.
+
+ * ext/socket/ancdata.c: ditto.
+
+ * ext/socket/unixsocket.c: ditto.
+
+Wed Jul 20 15:16:22 2011 NARUSE, Yui <naruse@ruby-lang.org>
+
+ * ext/dl/handle.c (dlhandle_sym): clear previous error with dlerror()
+ before calling dlsym(). [ruby-dev:44091] [Bug #5021]
- * object.c (obj_id): returns unique integer.
+Wed Jul 20 07:16:26 2011 Kazuhiro NISHIYAMA <zn@mbf.nifty.com>
-Wed Sep 3 14:05:16 1997 Yukihiro Matsumoto <matz@netlab.co.jp>
+ * NEWS: mention Kernel#warn. [ruby-core:38119] [Feature #5029]
- * version 1.1 alpha6 released.
+Tue Jul 19 16:40:45 2011 TAKANO Mitsuhiro (takano32) <tak@no32.tk>
- * eval.c (mod_s_constants): context sensitive constant list.
+ * cont.c (cont_save_thread): fix missing semicolon.
- * variable.c (mod_constants): no more `all' option.
+Tue Jul 19 16:25:15 2011 Tanaka Akira <akr@fsij.org>
- * variable.c (mod_const_of): the values for autoload classes are
- their name strings.
+ * io.c (UPDATE_MAXFD): removed.
- * class.c (class_instance_methods): no special treatment for
- singleton classes.
+Tue Jul 19 16:07:45 2011 Tanaka Akira <akr@fsij.org>
- * object.c (obj_singleton_methods): returns list of singleton
- method names.
+ * io.c (rb_update_max_fd): new function.
- * parse.y (yylex): no here document after `class' keyword.
+ * internal.h (rb_update_max_fd): declare rb_update_max_fd.
- * eval.c (f_load): expand path if fname begins with `~'.
+ * thread_pthread.c (rb_thread_create_timer_thread): update max fd when
+ timer thread pipe is created.
-Tue Sep 2 13:19:48 1997 Yukihiro Matsumoto <matz@netlab.co.jp>
+Mon Jul 18 13:36:47 2011 Aaron Patterson <aaron@tenderlovemaking.com>
- * class.c (ins_methods_i): do not list undef'ed methods.
+ * ext/psych/lib/psych.rb: define a new BadAlias error class.
-Mon Sep 1 13:42:48 1997 Yukihiro Matsumoto <matz@netlab.co.jp>
+ * ext/psych/lib/psych/visitors/to_ruby.rb: raise an exception when
+ deserializing an alias that does not exist.
- * version 1.1 alpha5 released.
+ * test/psych/test_merge_keys.rb: corresponding test.
- * object.c (mod_attr_reader): create methods to define attribute
- reader/write/accessor.
+Mon Jul 18 00:00:46 2011 Shugo Maeda <shugo@ruby-lang.org>
- * class.c (rb_define_attr): always defines accessors.
+ * ext/curses/curses.c: added the new class Curses::Pad, which
+ supports scrolling. patch by Eric Hodel. [Feature #4896]
+ [ruby-core:37206]
- * eval.c (rb_call): alias occurred in the module body caused SEGV.
+Sun Jul 17 16:26:40 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * parse.y: did not generate here document strings properly.
+ * error.c (rb_check_trusted): new function to check an object is
+ trusted.
-Mon Sep 1 11:43:57 1997 WATANABE Hirofumi <watanabe@ase.ptg.sony.co.jp>
-
- * parse.y (yylex): heredoc dropped an extra character.
+ * struct.c (rb_struct_modify), time.c (time_modify): check by the
+ above function to show proper class names. [Bug #5036]
-Fri Aug 29 11:10:21 1997 Yukihiro Matsumoto <matz@netlab.co.jp>
+Sun Jul 17 15:30:04 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * class.c (class_instance_methods): same method names should not
- appear more than once.
+ * error.c (rb_warn_m): accept multiple args in like puts. rdoc
+ patch by Erik Price at [ruby-core:38119]. [Feature #5029]
- * parse.y (yylex): spaces can follow =begin/=end.
+Sun Jul 17 07:56:31 2011 Martin Bosslet <Martin.Bosslet@googlemail.com>
- * variable.c (find_class_path): look for class_tbl also for
- unnamed fundamental classes, such as Object, String, etc.
+ * test/openssl/test_ssl_session.rb: add PEM SSL session without TLS
+ extensions. Use this as the default for the tests to ensure
+ compatibility with OpenSSL 0.9.7.
+ [ Ruby 1.9 - Bug #4961 ] [ruby-core:37726]
- * variable.c (rb_name_class): can't name class before String class
- is initialized.
+Sat Jul 16 17:29:20 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * inits.c (rb_call_inits): unrecognized dependency from GC to
- Array.
+ * configure.in (RUBY_UNIVERSAL_ARCH): restore arch flag.
+ Bug #4977
- * variable.c (find_class_path): could not find class if Object's
- iv_tbl is NULL.
+Sat Jul 16 06:27:51 2011 Marc-Andre Lafortune <ruby-core@marc-andre.ca>
-Thu Aug 28 13:12:05 1997 Yukihiro Matsumoto <matz@netlab.co.jp>
+ * lib/uri/common.rb (module): Remove optional parser argument to
+ Kernel#URI
+ [ruby-core:38061]
- * version 1.1 alpha4 released.
+ * lib/uri/generic.rb (module): ditto
- * variable.c (mod_constants): wrong condition for singleton
- class.
+Sat Jul 16 03:19:45 2011 NAKAMURA Usaku <usa@ruby-lang.org>
- * parse.y (yylex): revised `=begin' skip code.
+ * win32/win32.c (is_socket, is_console): add prototypes to fix compile
+ problem with gcc introduced at r32549.
+ reported by Jon Forums. [Bug #5030] [ruby-core:38079]
- * parse.y (here_document): forgot to free(eos).
+Sat Jul 16 00:55:38 2011 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
- * parse.y (yylex): spaces after `<<' prohibited for here
- documents to avoid confusing with operator `<<'.
+ * time.c (time_dup): used rb_obj_class() instead of CLASS_OF().
+ The patch is made by Kazuki Tsujimoto. [Bug #5012] [ruby-dev:44071]
- * eval.c (is_defined): separated from rb_eval().
+ * test/ruby/test_time.rb (TestTime#test_getlocal_dont_share_eigenclass):
+ added a new test for eigenclass of time object.
-Wed Aug 27 11:32:42 1997 Yukihiro Matsumoto <matz@netlab.co.jp>
+Fri Jul 15 19:11:00 2011 Kenta Murata <mrkn@mrkn.jp>
- * version 1.1 alpha3 released.
+ * bignum.c (bigsub_int): add RB_GC_GUARD. This patch is made by
+ Makoto Kishimoto. fixes #4223 [ruby-dev:42907]
- * variable.c (mod_name): returns name of the class/module.
+ * bignum.c (bigadd_int): ditto.
- * parse.y (here_document): finally here document available now.
+Fri Jul 15 14:27:53 2011 NAKAMURA Usaku <usa@ruby-lang.org>
- * variable.c (fc_i): some classes/modules does not have iv_tbl.
+ * win32/win32.c, include/ruby/win32.h (rb_w32_io_cancelable_p): renamed
+ from rb_w32_has_cancel_io(). now it takes a parameter as fd to check
+ the fd is console or not, because we cannot cancel console input even
+ if we have cancel_io function.
- * variable.c (find_class_path): avoid infinite loop.
+ * io.c (WAIT_FD_IN_WIN32): call above function instead of the old one,
+ so now we can kill the thread which calls STDIN.gets.
+ the problem was reported by ko1 via IRC.
-Tue Aug 26 13:43:47 1997 Yukihiro Matsumoto <matz@netlab.co.jp>
+Fri Jul 15 09:10:41 2011 Hiroshi Nakamura <nahi@ruby-lang.org>
- * eval.c (rb_eval): undef'ing non-existing method will raise
- NameError exception.
+ * ext/digest/sha2/sha2.c (SHA256_Update, SHA512_Update): avoid Bus
+ Error caused by unalignment access on Sparc-Solaris (and possibly on
+ other similar environment.) This patch just do memcpy always instead
+ of checking architecture. I see no perf drop on my 64bit env. For
+ more details, see #4320.
- * object.c (class_s_new): needed to create metaclass too.
+ * test/digest/test_digest.rb: add test for unalignment access.
- * eval.c (error_print): no class name print for anonymous class.
+Fri Jul 15 01:51:25 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
- * eval.c (rb_longjmp): proper exception raised if raise() called
- without arguments, with $! or $@ set.
+ * regint.h (PLATFORM_UNALIGNED_WORD_ACCESS): Power PC does not
+ allow unaligned word access.
- * object.c (Init_Object): superclass()'s method argument setting
- was wrong again.
+ * st.c (UNALIGNED_WORD_ACCESS): x86_64 allows unaligned word
+ access as well as i386.
- * class.c (mod_ancestors): list superclasses and included modules
- in priority order.
+Thu Jul 14 12:19:34 2011 Hiroshi Nakamura <nahi@ruby-lang.org>
-Mon Aug 25 11:53:11 1997 Yukihiro Matsumoto <matz@netlab.co.jp>
+ * ext/openssl/ossl.c (ossl_verify_cb): trap the exception from
+ verify callback of SSLContext and X509Store and make the
+ verification fail normally. Raising exception directly from callback
+ causes orphan resources in OpenSSL stack. Patched by Ippei Obayashi.
+ See #4445.
- * version 1.1 alpha2 released.
+ * test/openssl/test_ssl.rb
+ (test_exception_in_verify_callback_is_ignored): test it.
- * sample/ruby-mode.el (ruby-parse-region): auto-indent now
- supports "\\" in the strings.
+Tue Jul 12 23:41:49 2011 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
- * struct.c (struct_getmember): new API to get member value from C
- language side.
+ * NEWS: add a description of Signal.trap change.
-Sat Aug 23 21:39:05 1997 Yukihiro Matsumoto <matz@netlab.co.jp>
+Tue Jul 12 20:02:35 2011 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
- * parse.y (assignable): remove unnecessary local variable
- initialize by nil.
+ * signal.c (reserved_signal_p): reverted a part of r32523.
+ chikanaga noticed trap(:CHLD) has some realworld usecase.
+ * test/ruby/test_signal.rb (TestSignal#test_reserved_signal):
+ ditto.
-Fri Aug 22 14:26:40 1997 Yukihiro Matsumoto <matz@netlab.co.jp>
+Tue Jul 12 17:12:45 2011 Yukihiro Matsumoto <matz@ruby-lang.org>
- * eval.c (error_print): modified exception print format.
+ * vm_method.c (rb_add_method): should not call method_added hook
+ for undef operation. [Bug #5015]
-Thu Aug 21 16:10:58 1997 Yukihiro Matsumoto <matz@netlab.co.jp>
+Tue Jul 12 16:58:44 2011 Shota Fukumori <sorah@tubusu.net>
- * sample/ruby-mode.el (ruby-calculate-indent): wrong indent level
- calculated with keyword operators.
+ * lib/test/unit.rb(Test::Unit::Options#process_args): Fix bug.
+ Fix process_args didn't return `@option` after r30939.
-Thu Aug 21 11:36:58 1997 WATANABE Hirofumi <watanabe@ase.ptg.sony.co.jp>
+Tue Jul 12 14:07:46 2011 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
- * parse.y (arg): ary[0] += 1 cause SEGV
+ * signal.c (install_sighandler): fixed a race.
-Wed Aug 20 17:28:50 1997 Yukihiro Matsumoto <matz@netlab.co.jp>
+Tue Jul 12 13:49:32 2011 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
- * ruby.c (ruby_process_options): require() all modules after
- processing all options
+ * signal.c (sig_trap): don't permit to change a signal handler which
+ the interpreter reserved.
+ * signal.c (reserved_signal_p): ditto.
+ [Bug #2616] [ruby-core:27625]
- * process.c (rb_proc_exec): more security checks added.
+ * test/ruby/test_signal.rb (TestSignal#test_reserved_signal):
+ added a test for reserved signal.
- * process.c (rb_proc_exec): insecure path on exec.
+Tue Jul 12 11:58:28 2011 NAKAMURA Usaku <usa@ruby-lang.org>
- * hash.c (f_getenv): PATH modification security check.
+ * win32/setup.mak: support x86-amd64 cross compile environment.
-Tue Aug 19 00:15:38 1997 Yukihiro Matsumoto <matz@netlab.co.jp>
+Mon Jul 11 23:22:28 2011 Yutaka Kanemoto <kanemoto@ruby-lang.org>
- * version 1.1 alpha1 released.
+ * time.c: can't compile time.c on AIX due to missing declaration for
+ ffs(). It is declared in strings.h on AIX.
- * eval.c (mod_eval): work as normal eval() if second binding
- argument given.
+Mon Jul 11 15:54:24 2011 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
- * eval.c (rb_call): did not raise ArgumentError if too many
- arguments more than optional arguments (without rest arg).
+ * process.c: removed signal() macro. It's no longer used.
- * eval.c (rb_eval): did not work well for op_asgn2 (attribute
- self assignment).
+Mon Jul 11 15:02:24 2011 NAKAMURA Usaku <usa@ruby-lang.org>
- * eval.c (Init_Thread): returns main thread.
+ * numeric.c (rb_num2ull): use FIX2LONG instead of FIX2ULONG. see
+ rb_num2ulong(). fixed the problem of ObjectSpace._id2ref of IL32LLP64
+ platforms, introduced at r32433.
-Mon Aug 18 09:25:56 1997 Yukihiro Matsumoto <matz@netlab.co.jp>
+Mon Jul 11 05:38:05 2011 Yutaka Kanemoto <kanemoto@ruby-lang.org>
- * object.c (inspect_i): did not display T_DATA instance variables.
+ * thread_pthread.c (get_stack): need to adjust stack addr for
+ [Bug #1813] on AIX.
- * parse.y: provides more accurate line number information.
+Mon Jul 11 01:16:27 2011 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
- * eval.c (thread_value): include value's backtrace information in
- the variable `$@'.
+ * thread_pthread.c (rb_thread_create_timer_thread): removed
+ rb_disable_interrupt()/rb_enable_interrupt().
+ * vm_core.h: ditto.
+ * process.c (static void before_exec): ditto.
+ * process.c (static void after_exec): ditto.
+ [Bug #4765] [ruby-dev:43571]
- * eval.c (f_abort): print backtrace and exit.
+ * eval_intern.h: removed rb_trap_restore_mask().
+ * vm_eval.c (rb_throw_obj): ditto.
+ * eval.c (setup_exception): ditto.
-Sat Aug 16 00:17:44 1997 Yukihiro Matsumoto <matz@netlab.co.jp>
+ * signal.c: removed trap_last_mask.
+ * signal.c (trap_restore_mask): removed.
+ * signal.c (init_sigchld): comment clarification why signal block
+ is needed. and removed trap_last_mask operation.
+ * signal.c (trap_ensure): removed trap_last_mask operation.
- * eval.c (class_new_instance): do not make instance from virtual
- classes.
+ * signal.c (rb_disable_interrupt, rb_enable_interrupt): made
+ static and removed sigdelset(SIGVTALRM) and sigdelset(SIGSEGV).
- * object.c (class_s_new): do not make subclass of singleton class.
+ * process.c (rb_syswait): removed implicit signal handler change.
-Fri Aug 15 15:49:46 1997 Yukihiro Matsumoto <matz@netlab.co.jp>
+Sun Jul 10 23:49:12 2011 Yuki Sonoda (Yugui) <yugui@yugui.jp>
- * eval.c (call_trace_func): block context switch in the trace
- function.
+ * docs/NEWS-1.9.3: moved from NEWS.
- * eval.c (rb_eval): clear method cache at class extension.
+ * docs/ChangeLog-1.9.3: merged ChangeLog for 1.9.3.
- * object.c (obj_type): returns object's class even if it defines
- singleton methods.
+ * NEWS: NEWS for 1.9.4 that describes changes since 1.9.3
-Fri Aug 15 19:40:43 1997 WATANABE Hirofumi <watanabe@ase.ptg.sony.co.jp>
+ * ChangeLog: new ChangeLog for 1.9.4.
- * ext/socket/socket.c (Init_socket): small typo caused SEGV.
+Sun Jul 10 23:30:52 2011 Yuki Sonoda (Yugui) <yugui@yugui.jp>
-Wed Aug 13 17:51:46 1997 Yukihiro Matsumoto <matz@netlab.co.jp>
+ * version.h (RUBY_VERSION): ruby_1_9_3 branch was forked.
- * version 1.1 alpha0 released.
+For the changes before 1.9.3, see doc/ChangeLog-1.9.3
+For the changes before 1.8.0, see doc/ChangeLog-1.8.0
+Local variables:
+coding: us-ascii
+add-log-time-format: (lambda ()
+ (let* ((time (current-time))
+ (system-time-locale "C")
+ (diff (+ (cadr time) 32400))
+ (lo (% diff 65536))
+ (hi (+ (car time) (/ diff 65536))))
+ (format-time-string "%a %b %e %H:%M:%S %Y" (list hi lo) t)))
+indent-tabs-mode: t
+tab-width: 8
+change-log-indent-text: 2
+end:
+vim: tabstop=8 shiftwidth=2
diff --git a/GPL b/GPL
new file mode 100644
index 0000000000..d159169d10
--- /dev/null
+++ b/GPL
@@ -0,0 +1,339 @@
+ GNU GENERAL PUBLIC LICENSE
+ Version 2, June 1991
+
+ Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
+ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+ Preamble
+
+ The licenses for most software are designed to take away your
+freedom to share and change it. By contrast, the GNU General Public
+License is intended to guarantee your freedom to share and change free
+software--to make sure the software is free for all its users. This
+General Public License applies to most of the Free Software
+Foundation's software and to any other program whose authors commit to
+using it. (Some other Free Software Foundation software is covered by
+the GNU Lesser General Public License instead.) You can apply it to
+your programs, too.
+
+ When we speak of free software, we are referring to freedom, not
+price. Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+this service if you wish), that you receive source code or can get it
+if you want it, that you can change the software or use pieces of it
+in new free programs; and that you know you can do these things.
+
+ To protect your rights, we need to make restrictions that forbid
+anyone to deny you these rights or to ask you to surrender the rights.
+These restrictions translate to certain responsibilities for you if you
+distribute copies of the software, or if you modify it.
+
+ For example, if you distribute copies of such a program, whether
+gratis or for a fee, you must give the recipients all the rights that
+you have. You must make sure that they, too, receive or can get the
+source code. And you must show them these terms so they know their
+rights.
+
+ We protect your rights with two steps: (1) copyright the software, and
+(2) offer you this license which gives you legal permission to copy,
+distribute and/or modify the software.
+
+ Also, for each author's protection and ours, we want to make certain
+that everyone understands that there is no warranty for this free
+software. If the software is modified by someone else and passed on, we
+want its recipients to know that what they have is not the original, so
+that any problems introduced by others will not reflect on the original
+authors' reputations.
+
+ Finally, any free program is threatened constantly by software
+patents. We wish to avoid the danger that redistributors of a free
+program will individually obtain patent licenses, in effect making the
+program proprietary. To prevent this, we have made it clear that any
+patent must be licensed for everyone's free use or not licensed at all.
+
+ The precise terms and conditions for copying, distribution and
+modification follow.
+
+ GNU GENERAL PUBLIC LICENSE
+ TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+ 0. This License applies to any program or other work which contains
+a notice placed by the copyright holder saying it may be distributed
+under the terms of this General Public License. The "Program", below,
+refers to any such program or work, and a "work based on the Program"
+means either the Program or any derivative work under copyright law:
+that is to say, a work containing the Program or a portion of it,
+either verbatim or with modifications and/or translated into another
+language. (Hereinafter, translation is included without limitation in
+the term "modification".) Each licensee is addressed as "you".
+
+Activities other than copying, distribution and modification are not
+covered by this License; they are outside its scope. The act of
+running the Program is not restricted, and the output from the Program
+is covered only if its contents constitute a work based on the
+Program (independent of having been made by running the Program).
+Whether that is true depends on what the Program does.
+
+ 1. You may copy and distribute verbatim copies of the Program's
+source code as you receive it, in any medium, provided that you
+conspicuously and appropriately publish on each copy an appropriate
+copyright notice and disclaimer of warranty; keep intact all the
+notices that refer to this License and to the absence of any warranty;
+and give any other recipients of the Program a copy of this License
+along with the Program.
+
+You may charge a fee for the physical act of transferring a copy, and
+you may at your option offer warranty protection in exchange for a fee.
+
+ 2. You may modify your copy or copies of the Program or any portion
+of it, thus forming a work based on the Program, and copy and
+distribute such modifications or work under the terms of Section 1
+above, provided that you also meet all of these conditions:
+
+ a) You must cause the modified files to carry prominent notices
+ stating that you changed the files and the date of any change.
+
+ b) You must cause any work that you distribute or publish, that in
+ whole or in part contains or is derived from the Program or any
+ part thereof, to be licensed as a whole at no charge to all third
+ parties under the terms of this License.
+
+ c) If the modified program normally reads commands interactively
+ when run, you must cause it, when started running for such
+ interactive use in the most ordinary way, to print or display an
+ announcement including an appropriate copyright notice and a
+ notice that there is no warranty (or else, saying that you provide
+ a warranty) and that users may redistribute the program under
+ these conditions, and telling the user how to view a copy of this
+ License. (Exception: if the Program itself is interactive but
+ does not normally print such an announcement, your work based on
+ the Program is not required to print an announcement.)
+
+These requirements apply to the modified work as a whole. If
+identifiable sections of that work are not derived from the Program,
+and can be reasonably considered independent and separate works in
+themselves, then this License, and its terms, do not apply to those
+sections when you distribute them as separate works. But when you
+distribute the same sections as part of a whole which is a work based
+on the Program, the distribution of the whole must be on the terms of
+this License, whose permissions for other licensees extend to the
+entire whole, and thus to each and every part regardless of who wrote it.
+
+Thus, it is not the intent of this section to claim rights or contest
+your rights to work written entirely by you; rather, the intent is to
+exercise the right to control the distribution of derivative or
+collective works based on the Program.
+
+In addition, mere aggregation of another work not based on the Program
+with the Program (or with a work based on the Program) on a volume of
+a storage or distribution medium does not bring the other work under
+the scope of this License.
+
+ 3. You may copy and distribute the Program (or a work based on it,
+under Section 2) in object code or executable form under the terms of
+Sections 1 and 2 above provided that you also do one of the following:
+
+ a) Accompany it with the complete corresponding machine-readable
+ source code, which must be distributed under the terms of Sections
+ 1 and 2 above on a medium customarily used for software interchange; or,
+
+ b) Accompany it with a written offer, valid for at least three
+ years, to give any third party, for a charge no more than your
+ cost of physically performing source distribution, a complete
+ machine-readable copy of the corresponding source code, to be
+ distributed under the terms of Sections 1 and 2 above on a medium
+ customarily used for software interchange; or,
+
+ c) Accompany it with the information you received as to the offer
+ to distribute corresponding source code. (This alternative is
+ allowed only for noncommercial distribution and only if you
+ received the program in object code or executable form with such
+ an offer, in accord with Subsection b above.)
+
+The source code for a work means the preferred form of the work for
+making modifications to it. For an executable work, complete source
+code means all the source code for all modules it contains, plus any
+associated interface definition files, plus the scripts used to
+control compilation and installation of the executable. However, as a
+special exception, the source code distributed need not include
+anything that is normally distributed (in either source or binary
+form) with the major components (compiler, kernel, and so on) of the
+operating system on which the executable runs, unless that component
+itself accompanies the executable.
+
+If distribution of executable or object code is made by offering
+access to copy from a designated place, then offering equivalent
+access to copy the source code from the same place counts as
+distribution of the source code, even though third parties are not
+compelled to copy the source along with the object code.
+
+ 4. You may not copy, modify, sublicense, or distribute the Program
+except as expressly provided under this License. Any attempt
+otherwise to copy, modify, sublicense or distribute the Program is
+void, and will automatically terminate your rights under this License.
+However, parties who have received copies, or rights, from you under
+this License will not have their licenses terminated so long as such
+parties remain in full compliance.
+
+ 5. You are not required to accept this License, since you have not
+signed it. However, nothing else grants you permission to modify or
+distribute the Program or its derivative works. These actions are
+prohibited by law if you do not accept this License. Therefore, by
+modifying or distributing the Program (or any work based on the
+Program), you indicate your acceptance of this License to do so, and
+all its terms and conditions for copying, distributing or modifying
+the Program or works based on it.
+
+ 6. Each time you redistribute the Program (or any work based on the
+Program), the recipient automatically receives a license from the
+original licensor to copy, distribute or modify the Program subject to
+these terms and conditions. You may not impose any further
+restrictions on the recipients' exercise of the rights granted herein.
+You are not responsible for enforcing compliance by third parties to
+this License.
+
+ 7. If, as a consequence of a court judgment or allegation of patent
+infringement or for any other reason (not limited to patent issues),
+conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License. If you cannot
+distribute so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you
+may not distribute the Program at all. For example, if a patent
+license would not permit royalty-free redistribution of the Program by
+all those who receive copies directly or indirectly through you, then
+the only way you could satisfy both it and this License would be to
+refrain entirely from distribution of the Program.
+
+If any portion of this section is held invalid or unenforceable under
+any particular circumstance, the balance of the section is intended to
+apply and the section as a whole is intended to apply in other
+circumstances.
+
+It is not the purpose of this section to induce you to infringe any
+patents or other property right claims or to contest validity of any
+such claims; this section has the sole purpose of protecting the
+integrity of the free software distribution system, which is
+implemented by public license practices. Many people have made
+generous contributions to the wide range of software distributed
+through that system in reliance on consistent application of that
+system; it is up to the author/donor to decide if he or she is willing
+to distribute software through any other system and a licensee cannot
+impose that choice.
+
+This section is intended to make thoroughly clear what is believed to
+be a consequence of the rest of this License.
+
+ 8. If the distribution and/or use of the Program is restricted in
+certain countries either by patents or by copyrighted interfaces, the
+original copyright holder who places the Program under this License
+may add an explicit geographical distribution limitation excluding
+those countries, so that distribution is permitted only in or among
+countries not thus excluded. In such case, this License incorporates
+the limitation as if written in the body of this License.
+
+ 9. The Free Software Foundation may publish revised and/or new versions
+of the General Public License from time to time. Such new versions will
+be similar in spirit to the present version, but may differ in detail to
+address new problems or concerns.
+
+Each version is given a distinguishing version number. If the Program
+specifies a version number of this License which applies to it and "any
+later version", you have the option of following the terms and conditions
+either of that version or of any later version published by the Free
+Software Foundation. If the Program does not specify a version number of
+this License, you may choose any version ever published by the Free Software
+Foundation.
+
+ 10. If you wish to incorporate parts of the Program into other free
+programs whose distribution conditions are different, write to the author
+to ask for permission. For software which is copyrighted by the Free
+Software Foundation, write to the Free Software Foundation; we sometimes
+make exceptions for this. Our decision will be guided by the two goals
+of preserving the free status of all derivatives of our free software and
+of promoting the sharing and reuse of software generally.
+
+ NO WARRANTY
+
+ 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
+FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
+OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
+PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
+OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
+TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
+PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
+REPAIR OR CORRECTION.
+
+ 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
+REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
+INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
+OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
+TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
+YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
+PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGES.
+
+ END OF TERMS AND CONDITIONS
+
+ How to Apply These Terms to Your New Programs
+
+ If you develop a new program, and you want it to be of the greatest
+possible use to the public, the best way to achieve this is to make it
+free software which everyone can redistribute and change under these terms.
+
+ To do so, attach the following notices to the program. It is safest
+to attach them to the start of each source file to most effectively
+convey the exclusion of warranty; and each file should have at least
+the "copyright" line and a pointer to where the full notice is found.
+
+ <one line to give the program's name and a brief idea of what it does.>
+ Copyright (C) <year> <name of author>
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License along
+ with this program; if not, write to the Free Software Foundation, Inc.,
+ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+Also add information on how to contact you by electronic and paper mail.
+
+If the program is interactive, make it output a short notice like this
+when it starts in an interactive mode:
+
+ Gnomovision version 69, Copyright (C) year name of author
+ Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
+ This is free software, and you are welcome to redistribute it
+ under certain conditions; type `show c' for details.
+
+The hypothetical commands `show w' and `show c' should show the appropriate
+parts of the General Public License. Of course, the commands you use may
+be called something other than `show w' and `show c'; they could even be
+mouse-clicks or menu items--whatever suits your program.
+
+You should also get your employer (if you work as a programmer) or your
+school, if any, to sign a "copyright disclaimer" for the program, if
+necessary. Here is a sample; alter the names:
+
+ Yoyodyne, Inc., hereby disclaims all copyright interest in the program
+ `Gnomovision' (which makes passes at compilers) written by James Hacker.
+
+ <signature of Ty Coon>, 1 April 1989
+ Ty Coon, President of Vice
+
+This General Public License does not permit incorporating your program into
+proprietary programs. If your program is a subroutine library, you may
+consider it more useful to permit linking proprietary applications with the
+library. If this is what you want to do, use the GNU Lesser General
+Public License instead of this License.
diff --git a/KNOWNBUGS.rb b/KNOWNBUGS.rb
new file mode 100644
index 0000000000..2bcedcb150
--- /dev/null
+++ b/KNOWNBUGS.rb
@@ -0,0 +1,23 @@
+#
+# This test file concludes tests which point out known bugs.
+# So all tests will cause failure.
+#
+
+[['[ruby-dev:45656]', %q{
+ class Bug6460
+ include Enumerable
+ def each
+ begin
+ yield :foo
+ ensure
+ 1.times { Proc.new }
+ end
+ end
+ end
+ e = Bug6460.new
+}]].each do |bug, src|
+ assert_equal "foo", src + %q{e.detect {true}}, bug
+ assert_equal "true", src + %q{e.any? {true}}, bug
+ assert_equal "false", src + %q{e.all? {false}}, bug
+ assert_equal "true", src + %q{e.include?(:foo)}, bug
+end
diff --git a/LEGAL b/LEGAL
new file mode 100644
index 0000000000..65706459cd
--- /dev/null
+++ b/LEGAL
@@ -0,0 +1,533 @@
+LEGAL NOTICE INFORMATION
+------------------------
+
+All the files in this distribution are covered under either the Ruby's
+license (see the file COPYING) or public-domain except some files
+mentioned below.
+
+include/ruby/oniguruma.h:
+regcomp.c:
+regenc.[ch]:
+regerror.c:
+regexec.c:
+regint.h:
+regparse.[ch]:
+enc/ascii.c
+enc/big5.c
+enc/cp949.c
+enc/emacs_mule.c
+enc/encdb.c
+enc/euc_jp.c
+enc/euc_kr.c
+enc/euc_tw.c
+enc/gb18030.c
+enc/gb2312.c
+enc/gbk.c
+enc/iso_8859_1.c
+enc/iso_8859_10.c
+enc/iso_8859_11.c
+enc/iso_8859_13.c
+enc/iso_8859_14.c
+enc/iso_8859_15.c
+enc/iso_8859_16.c
+enc/iso_8859_2.c
+enc/iso_8859_3.c
+enc/iso_8859_4.c
+enc/iso_8859_5.c
+enc/iso_8859_6.c
+enc/iso_8859_7.c
+enc/iso_8859_8.c
+enc/iso_8859_9.c
+enc/koi8_r.c
+enc/koi8_u.c
+enc/shift_jis.c
+enc/unicode.c
+enc/us_ascii.c
+enc/utf_16be.c
+enc/utf_16le.c
+enc/utf_32be.c
+enc/utf_32le.c
+enc/utf_8.c
+enc/windows_1251.c
+
+Oniguruma ---- (C) K.Kosako <sndgk393 AT ybb DOT ne DOT jp>
+
+http://www.geocities.jp/kosako3/oniguruma/
+http://www.ruby-lang.org/cgi-bin/cvsweb.cgi/oniguruma/
+http://www.freebsd.org/cgi/cvsweb.cgi/ports/devel/oniguruma/
+
+ When this software is partly used or it is distributed with Ruby,
+ this of Ruby follows the license of Ruby.
+
+configure:
+
+ This file is free software.
+
+ Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
+
+ This configure script is free software; the Free Software Foundation
+ gives unlimited permission to copy, distribute and modify it.
+
+tool/config.guess:
+tool/config.sub:
+
+ As long as you distribute these files with the file configure, they
+ are covered under the Ruby's license.
+
+ Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999
+ Free Software Foundation, Inc.
+
+ This file is free software; you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful, but
+ WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+ As a special exception to the GNU General Public License, if you
+ distribute this file as part of a program that contains a
+ configuration script generated by Autoconf, you may include it under
+ the same distribution terms that you use for the rest of that program.
+
+parse.c:
+
+ This file is licensed under the GPL, but is incorporated into Ruby and
+ redistributed under the terms of the Ruby license, as permitted by the
+ exception to the GPL below.
+
+ Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006
+ Free Software Foundation, Inc.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2, or (at your option)
+ any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA. */
+
+ /* As a special exception, you may create a larger work that contains
+ part or all of the Bison parser skeleton and distribute that work
+ under terms of your choice, so long as that work isn't itself a
+ parser generator using the skeleton or a modified version thereof
+ as a parser skeleton. Alternatively, if you modify or redistribute
+ the parser skeleton itself, you may (at your option) remove this
+ special exception, which will cause the skeleton and the resulting
+ Bison output files to be licensed under the GNU General Public
+ License without this special exception.
+
+ This special exception was added by the Free Software Foundation in
+ version 2.2 of Bison. */
+
+util.c (partly):
+
+ Copyright (c) 1991, 2000, 2001 by Lucent Technologies.
+
+ Permission to use, copy, modify, and distribute this software for any
+ purpose without fee is hereby granted, provided that this entire notice
+ is included in all copies of any software which is or includes a copy
+ or modification of this software and in all copies of the supporting
+ documentation for such software.
+
+ THIS SOFTWARE IS BEING PROVIDED "AS IS", WITHOUT ANY EXPRESS OR IMPLIED
+ WARRANTY. IN PARTICULAR, NEITHER THE AUTHOR NOR LUCENT MAKES ANY
+ REPRESENTATION OR WARRANTY OF ANY KIND CONCERNING THE MERCHANTABILITY
+ OF THIS SOFTWARE OR ITS FITNESS FOR ANY PARTICULAR PURPOSE.
+
+win32/win32.[ch]:
+
+ You can apply the Artistic License to these files. (or GPL,
+ alternatively)
+
+ Copyright (c) 1993, Intergraph Corporation
+
+ You may distribute under the terms of either the GNU General Public
+ License or the Artistic License, as specified in the perl README file.
+
+util.c (partly):
+
+ Copyright (c) 2004-2008 David Schultz <das@FreeBSD.ORG>
+ All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions
+ are met:
+ 1. Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+ 2. Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+
+ THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ SUCH DAMAGE.
+
+random.c
+
+ This file is under the new-style BSD license.
+
+ A C-program for MT19937, with initialization improved 2002/2/10.
+ Coded by Takuji Nishimura and Makoto Matsumoto.
+ This is a faster version by taking Shawn Cokus's optimization,
+ Matthe Bellew's simplification, Isaku Wada's real version.
+
+ Before using, initialize the state by using init_genrand(seed)
+ or init_by_array(init_key, key_length).
+
+ Copyright (C) 1997 - 2002, Makoto Matsumoto and Takuji Nishimura,
+ All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions
+ are met:
+
+ 1. Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+
+ 3. The names of its contributors may not be used to endorse or promote
+ products derived from this software without specific prior written
+ permission.
+
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+ CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+ Any feedback is very welcome.
+ http://www.math.keio.ac.jp/matumoto/emt.html
+ email: matumoto@math.keio.ac.jp
+
+vsnprintf.c:
+
+ This file is under the old-style BSD license. Note that the
+ paragraph 3 below is now null and void.
+
+ Copyright (c) 1990, 1993
+ The Regents of the University of California. All rights reserved.
+
+ This code is derived from software contributed to Berkeley by
+ Chris Torek.
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions
+ are met:
+ 1. Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+ 2. Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+ 3. Neither the name of the University nor the names of its contributors
+ may be used to endorse or promote products derived from this software
+ without specific prior written permission.
+
+ THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ SUCH DAMAGE.
+
+ IMPORTANT NOTE:
+ --------------
+ From ftp://ftp.cs.berkeley.edu/pub/4bsd/README.Impt.License.Change
+ paragraph 3 above is now null and void.
+
+st.[ch]:
+missing/alloca.c:
+missing/dup2.c:
+missing/erf.c:
+missing/finite.c:
+missing/hypot.c:
+missing/isinf.c:
+missing/isnan.c:
+missing/lgamma_r.c:
+missing/memcmp.c:
+missing/memmove.c:
+missing/strchr.c:
+missing/strstr.c:
+missing/strtol.c:
+missing/tgamma.c:
+ext/digest/sha1/sha1.[ch]:
+
+ These files are all under public domain.
+
+missing/crypt.c:
+
+ This file is under the old-style BSD license. Note that the
+ paragraph 3 below is now null and void.
+
+ Copyright (c) 1989, 1993
+ The Regents of the University of California. All rights reserved.
+
+ This code is derived from software contributed to Berkeley by
+ Tom Truscott.
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions
+ are met:
+ 1. Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+ 2. Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+ 3. Neither the name of the University nor the names of its contributors
+ may be used to endorse or promote products derived from this software
+ without specific prior written permission.
+
+ THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ SUCH DAMAGE.
+
+missing/setproctitle.c
+
+ This file is under the old-style BSD license. Note that the
+ paragraph 3 below is now null and void.
+
+ Copyright 2003 Damien Miller
+ Copyright (c) 1983, 1995-1997 Eric P. Allman
+ Copyright (c) 1988, 1993
+ The Regents of the University of California. All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions
+ are met:
+ 1. Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+ 2. Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+ 3. Neither the name of the University nor the names of its contributors
+ may be used to endorse or promote products derived from this software
+ without specific prior written permission.
+
+ THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ SUCH DAMAGE.
+
+missing/strlcat.c
+missing/strlcpy.c
+
+ These files are under the new-style BSD license.
+
+ Copyright (c) 1998 Todd C. Miller <Todd.Miller@courtesan.com>
+ All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions
+ are met:
+ 1. Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+ 2. Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+ 3. The name of the author may not be used to endorse or promote products
+ derived from this software without specific prior written permission.
+
+ THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
+ INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
+ AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
+ THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+ OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+ WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+ OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+ ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+missing/langinfo.c
+
+ This file is from http://www.cl.cam.ac.uk/~mgk25/ucs/langinfo.c.
+ Ruby uses a modified version. The file contains the following
+ author/copyright notice:
+
+ Markus.Kuhn@cl.cam.ac.uk -- 2002-03-11
+ Permission to use, copy, modify, and distribute this software
+ for any purpose and without fee is hereby granted. The author
+ disclaims all warranties with regard to this software.
+
+ext/digest/md5/md5.[ch]:
+
+ These files are under the following license. Ruby uses modified
+ versions of them.
+
+ Copyright (C) 1999, 2000 Aladdin Enterprises. All rights reserved.
+
+ This software is provided 'as-is', without any express or implied
+ warranty. In no event will the authors be held liable for any damages
+ arising from the use of this software.
+
+ Permission is granted to anyone to use this software for any purpose,
+ including commercial applications, and to alter it and redistribute it
+ freely, subject to the following restrictions:
+
+ 1. The origin of this software must not be misrepresented; you must not
+ claim that you wrote the original software. If you use this software
+ in a product, an acknowledgment in the product documentation would be
+ appreciated but is not required.
+ 2. Altered source versions must be plainly marked as such, and must not be
+ misrepresented as being the original software.
+ 3. This notice may not be removed or altered from any source distribution.
+
+ L. Peter Deutsch
+ ghost@aladdin.com
+
+ext/digest/rmd160/rmd160.[ch]:
+
+ These files have the following copyright information, and by the
+ author we are allowed to use it under the new-style BSD license.
+
+ AUTHOR: Antoon Bosselaers, ESAT-COSIC
+ (Arranged for libc by Todd C. Miller)
+ DATE: 1 March 1996
+
+ Copyright (c) Katholieke Universiteit Leuven
+ 1996, All Rights Reserved
+
+ext/digest/sha2/sha2.[ch]:
+
+ These files are under the new-style BSD license.
+
+ Copyright 2000 Aaron D. Gifford. All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions
+ are met:
+ 1. Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+ 2. Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+ 3. Neither the name of the copyright holder nor the names of contributors
+ may be used to endorse or promote products derived from this software
+ without specific prior written permission.
+
+ THIS SOFTWARE IS PROVIDED BY THE AUTHOR(S) AND CONTRIBUTOR(S) ``AS IS'' AND
+ ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR(S) OR CONTRIBUTOR(S) BE LIABLE
+ FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ SUCH DAMAGE.
+
+ext/nkf/nkf-utf8/config.h:
+ext/nkf/nkf-utf8/nkf.c:
+ext/nkf/nkf-utf8/utf8tbl.c:
+
+ These files are under the following license. So to speak, it is
+ copyrighted semi-public-domain software.
+
+ Copyright (C) 1987, Fujitsu LTD. (Itaru ICHIKAWA)
+ Everyone is permitted to do anything on this program
+ including copying, modifying, improving,
+ as long as you don't try to pretend that you wrote it.
+ i.e., the above copyright notice has to appear in all copies.
+ Binary distribution requires original version messages.
+ You don't have to ask before copying, redistribution or publishing.
+ THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE.
+
+ext/socket/addrinfo.h:
+ext/socket/getaddrinfo.c:
+ext/socket/getnameinfo.c:
+
+ These files are under the new-style BSD license.
+
+ Copyright (C) 1995, 1996, 1997, 1998, and 1999 WIDE Project.
+ All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions
+ are met:
+ 1. Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+ 2. Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+ 3. Neither the name of the project nor the names of its contributors
+ may be used to endorse or promote products derived from this software
+ without specific prior written permission.
+
+ THIS SOFTWARE IS PROVIDED BY THE PROJECT AND CONTRIBUTORS ``AS IS'' AND
+ ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ ARE DISCLAIMED. IN NO EVENT SHALL THE PROJECT OR CONTRIBUTORS BE LIABLE
+ FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ SUCH DAMAGE.
+
+ext/win32ole/win32ole.c:
+
+ You can apply the Artistic License to this file. (or GPL,
+ alternatively)
+
+ (c) 1995 Microsoft Corporation. All rights reserved.
+ Developed by ActiveWare Internet Corp., http://www.ActiveWare.com
+
+ Other modifications Copyright (c) 1997, 1998 by Gurusamy Sarathy
+ <gsar@umich.edu> and Jan Dubois <jan.dubois@ibm.net>
+
+ You may distribute under the terms of either the GNU General Public
+ License or the Artistic License, as specified in the README file
+ of the Perl distribution.
diff --git a/MANIFEST b/MANIFEST
deleted file mode 100644
index 17e8924bb7..0000000000
--- a/MANIFEST
+++ /dev/null
@@ -1,251 +0,0 @@
-COPYING
-COPYING.LIB
-ChangeLog
-MANIFEST
-Makefile.in
-README
-README.jp
-README.EXT
-README.EXT.jp
-ToDo
-array.c
-bignum.c
-class.c
-compar.c
-configure
-configure.in
-config.guess
-config.sub
-defines.h
-dir.c
-dln.c
-dln.h
-dmyext.c
-enum.c
-env.h
-error.c
-eval.c
-file.c
-gc.c
-hash.c
-inits.c
-install-sh
-instruby.rb
-intern.h
-io.c
-keywords
-lex.c
-main.c
-marshal.c
-math.c
-mkconfig.rb
-node.h
-numeric.c
-object.c
-pack.c
-parse.c
-parse.y
-prec.c
-process.c
-random.c
-range.c
-re.c
-re.h
-regex.c
-regex.h
-ruby.1
-ruby.c
-ruby.h
-rubyio.h
-rubysig.h
-rubytest.rb
-signal.c
-sprintf.c
-st.c
-st.h
-string.c
-struct.c
-time.c
-util.h
-util.c
-variable.c
-version.c
-version.h
-djgpp/README.djgpp
-djgpp/config.hin
-djgpp/config.sed
-djgpp/configure.bat
-djgpp/mkver.sed
-cygwin/GNUmakefile.in
-ext/Setup
-ext/Setup.dj
-ext/Setup.emx
-ext/Setup.x68
-ext/aix_mksym.rb
-ext/configsub.rb
-ext/extmk.rb.in
-lib/English.rb
-lib/Env.rb
-lib/README
-lib/base64.rb
-lib/cgi.rb
-lib/cgi/session.rb
-lib/cgi-lib.rb
-lib/complex.rb
-lib/date.rb
-lib/date2.rb
-lib/debug.rb
-lib/delegate.rb
-lib/e2mmap.rb
-lib/eregex.rb
-lib/find.rb
-lib/final.rb
-lib/finalize.rb
-lib/ftplib.rb
-lib/ftools.rb
-lib/getopts.rb
-lib/getoptlong.rb
-lib/importenv.rb
-lib/irb/completion.rb
-lib/irb/frame.rb
-lib/irb/input-method.rb
-lib/irb/irb.rb
-lib/irb/loader.rb
-lib/irb/main.rb
-lib/irb/multi-irb.rb
-lib/irb/ruby-lex.rb
-lib/irb/ruby-token.rb
-lib/irb/slex.rb
-lib/irb/version.rb
-lib/irb/workspace-binding-2.rb
-lib/irb/workspace-binding.rb
-lib/irb/xmp.rb
-lib/jcode.rb
-lib/mailread.rb
-lib/mathn.rb
-lib/matrix.rb
-lib/mkmf.rb
-lib/monitor.rb
-lib/mutex_m.rb
-lib/net/ftp.rb
-lib/net/http.rb
-lib/net/imap.rb
-lib/net/pop.rb
-lib/net/protocol.rb
-lib/net/smtp.rb
-lib/net/telnet.rb
-lib/observer.rb
-lib/open3.rb
-lib/ostruct.rb
-lib/parsearg.rb
-lib/parsedate.rb
-lib/ping.rb
-lib/profile.rb
-lib/pstore.rb
-lib/rational.rb
-lib/readbytes.rb
-lib/shellwords.rb
-lib/singleton.rb
-lib/sync.rb
-lib/telnet.rb
-lib/tempfile.rb
-lib/thread.rb
-lib/thwait.rb
-lib/timeout.rb
-lib/tracer.rb
-lib/weakref.rb
-misc/README
-misc/inf-ruby.el
-misc/ruby-mode.el
-misc/rubydb2x.el
-misc/rubydb3x.el
-missing/alloca.c
-missing/crypt.c
-missing/dir.h
-missing/dup2.c
-missing/file.h
-missing/finite.c
-missing/flock.c
-missing/isinf.c
-missing/isnan.c
-missing/memcmp.c
-missing/memmove.c
-missing/mkdir.c
-missing/os2.c
-missing/strcasecmp.c
-missing/strncasecmp.c
-missing/strchr.c
-missing/strdup.c
-missing/strerror.c
-missing/strftime.c
-missing/strstr.c
-missing/strtod.c
-missing/strtol.c
-missing/strtoul.c
-missing/vsnprintf.c
-missing/x68.c
-sample/README
-sample/biorhythm.rb
-sample/cal.rb
-sample/cbreak.rb
-sample/clnt.rb
-sample/dbmtest.rb
-sample/dir.rb
-sample/dualstack-fetch.rb
-sample/dualstack-httpd.rb
-sample/eval.rb
-sample/export.rb
-sample/exyacc.rb
-sample/fact.rb
-sample/fib.awk
-sample/fib.pl
-sample/fib.py
-sample/fib.rb
-sample/fib.scm
-sample/freq.rb
-sample/from.rb
-sample/fullpath.rb
-sample/getopts.test
-sample/goodfriday.rb
-sample/irb.rb
-sample/less.rb
-sample/list.rb
-sample/list2.rb
-sample/list3.rb
-sample/mine.rb
-sample/mkproto.rb
-sample/mpart.rb
-sample/mrshtest.rb
-sample/observ.rb
-sample/occur.pl
-sample/occur.rb
-sample/occur2.rb
-sample/philos.rb
-sample/pi.rb
-sample/rename.rb
-sample/rcs.awk
-sample/rcs.dat
-sample/rcs.rb
-sample/regx.rb
-sample/sieve.rb
-sample/svr.rb
-sample/test.rb
-sample/time.rb
-sample/trojan.rb
-sample/tsvr.rb
-sample/uumerge.rb
-win32/Makefile.sub
-win32/README.win32
-win32/config.h.in
-win32/config.status.in
-win32/configure.bat
-win32/mkexports.rb
-win32/resource.rb
-win32/setup.mak
-win32/win32.c
-win32/win32.h
-win32/winmain.c
-x68/fconvert.c
-x68/select.c
-x68/_dtos18.c
-x68/_round.c
diff --git a/Makefile.in b/Makefile.in
index b1b0166b89..8d36063c97 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -1,32 +1,109 @@
SHELL = /bin/sh
+NULLCMD = @NULLCMD@
+n=$(NULLCMD)
+ECHO1 = $(V:1=@$n)
+RUNCMD = $(SHELL)
+CHDIR = @CHDIR@
+exec = exec
+NULL = /dev/null
#### Start of system configuration section. ####
srcdir = @srcdir@
-VPATH = $(srcdir):$(srcdir)/missing
+top_srcdir = $(srcdir)
+hdrdir = $(srcdir)/include
+PLATFORM_DIR = @PLATFORM_DIR@
CC = @CC@
-YACC = @YACC@
+CPP = @CPP@
+LD = @LD@
+YACC = bison
PURIFY =
AUTOCONF = autoconf
@SET_MAKE@
+MKFILES = @MAKEFILES@
+BASERUBY = @BASERUBY@
+TEST_RUNNABLE = @TEST_RUNNABLE@
+DOXYGEN = @DOXYGEN@
prefix = @prefix@
-CFLAGS = @CFLAGS@
-CPPFLAGS = -I. -I$(srcdir) -I@includedir@
+exec_prefix = @exec_prefix@
+bindir = @bindir@
+sbindir = @sbindir@
+libdir = @libdir@
+libexecdir = @libexecdir@
+datarootdir = @datarootdir@
+datadir = @datadir@
+arch = @arch@
+sitearch = @sitearch@
+sitedir = @sitedir@
+ruby_version = @ruby_version@
+
+TESTUI = console
+TESTS =
+INSTALLDOC = @INSTALLDOC@
+DOCTARGETS = @RDOCTARGET@ @CAPITARGET@
+
+EXTOUT = @EXTOUT@
+arch_hdrdir = $(EXTOUT)/include/$(arch)
+VPATH = $(arch_hdrdir)/ruby:$(hdrdir)/ruby:$(srcdir):$(srcdir)/enc:$(srcdir)/missing
+
+empty =
+OUTFLAG = @OUTFLAG@$(empty)
+COUTFLAG = @COUTFLAG@$(empty)
+ARCH_FLAG = @ARCH_FLAG@
+CFLAGS = @CFLAGS@ $(ARCH_FLAG)
+cflags = @cflags@
+optflags = @optflags@
+debugflags = @debugflags@
+warnflags = @warnflags@ @strict_warnflags@
+INCFLAGS = -I. -I$(arch_hdrdir) -I$(hdrdir) -I$(srcdir)
+XCFLAGS = @XCFLAGS@
+CPPFLAGS = @CPPFLAGS@ $(INCFLAGS)
LDFLAGS = @STATIC@ $(CFLAGS) @LDFLAGS@
-XLDFLAGS = @XLDFLAGS@
-EXTLIBS =
+EXTLDFLAGS = @EXTLDFLAGS@
+XLDFLAGS = @XLDFLAGS@ $(EXTLDFLAGS)
+EXTLIBS =
LIBS = @LIBS@ $(EXTLIBS)
MISSING = @LIBOBJS@ @ALLOCA@
LDSHARED = @LIBRUBY_LDSHARED@
-DLDFLAGS = @LIBRUBY_DLDFLAGS@
+DLDFLAGS = @LIBRUBY_DLDFLAGS@ $(XLDFLAGS) $(ARCH_FLAG)
SOLIBS = @SOLIBS@
-
+MAINLIBS = @MAINLIBS@
+ARCHMINIOBJS = @MINIOBJS@
+ENCOBJS = @ENCOBJS@
+EXTOBJS = @EXTOBJS@
+BUILTIN_ENCOBJS = @BUILTIN_ENCOBJS@
+BUILTIN_TRANSSRCS = @BUILTIN_TRANSSRCS@
+BUILTIN_TRANSOBJS = @BUILTIN_TRANSOBJS@
+POSTLINK = @POSTLINK@
+
+RUBY_BASE_NAME=@RUBY_BASE_NAME@
+RUBY_PROGRAM_VERSION=@RUBY_PROGRAM_VERSION@
RUBY_INSTALL_NAME=@RUBY_INSTALL_NAME@
RUBY_SO_NAME=@RUBY_SO_NAME@
+RUBY_RELEASE_DATE=@RUBY_RELEASE_DATE@
EXEEXT = @EXEEXT@
+LIBEXT = @LIBEXT@
PROGRAM=$(RUBY_INSTALL_NAME)$(EXEEXT)
+RUBY = $(RUBY_INSTALL_NAME)
+MINIRUBY = @MINIRUBY@\
+ $(MINIRUBYOPT)
+RUNRUBY_COMMAND = @RUNRUBY@ $(RUNRUBYOPT)
+RUNRUBY = $(RUNRUBY_COMMAND) -- $(RUN_OPTS)
+RUNRUBY_DEBUGGER = --debugger='gdb -x run.gdb --quiet --args'
+XRUBY = @XRUBY@
+BTESTRUBY = @BTESTRUBY@\
+ $(MINIRUBYOPT)
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+XRUBY_LIBDIR = @XRUBY_LIBDIR@
+XRUBY_RUBYLIBDIR = @XRUBY_RUBYLIBDIR@
+XRUBY_RUBYHDRDIR = @XRUBY_RUBYHDRDIR@
+
+DEFAULT_PRELUDES = $(@USE_RUBYGEMS@_GEM_PRELUDE)
#### End of system configuration section. ####
@@ -39,238 +116,298 @@ LIBRUBY_SO = @LIBRUBY_SO@
LIBRUBY_ALIASES= @LIBRUBY_ALIASES@
LIBRUBY = @LIBRUBY@
LIBRUBYARG = @LIBRUBYARG@
+LIBRUBYARG_STATIC = @LIBRUBYARG_STATIC@
+LIBRUBYARG_SHARED = @LIBRUBYARG_SHARED@
+LIBRUBY_RELATIVE = @LIBRUBY_RELATIVE@
+
+THREAD_MODEL = @THREAD_MODEL@
+
+PREP = @PREP@
+ARCHFILE = @ARCHFILE@
+SETUP =
+EXTSTATIC = @EXTSTATIC@
+SET_LC_MESSAGES = env LC_MESSAGES=C
+
+MAKEDIRS = @MKDIR_P@
+CP = cp
+MV = mv
+RM = rm -f
+RMDIR = @RMDIR@
+RMDIRS = @RMDIRS@
+RMALL = @RMALL@
+NM = @NM@
+AR = @AR@
+ARFLAGS = rcu
+RANLIB = @RANLIB@
+AS = @AS@
+ASFLAGS = @ASFLAGS@ $(INCFLAGS)
+IFCHANGE = $(srcdir)/tool/ifchange
+SET_LC_MESSAGES = env LC_MESSAGES=C
+OBJDUMP = @OBJDUMP@
+OBJCOPY = @OBJCOPY@
+VCS = @VCS@
+VCSUP = @VCSUP@
+
+OBJEXT = @OBJEXT@
+ASMEXT = S
+DLEXT = @DLEXT@
+MANTYPE = @MANTYPE@
+SYMBOL_PREFIX = @SYMBOL_PREFIX@
+
+INSTALLED_LIST= .installed.list
+
+MKMAIN_CMD = mkmain.sh
+
+NEWLINE_C = newline.c
+MINIPRELUDE_C = miniprelude.c
+
+SRC_FILE = $<
+
+MESSAGE_BEGIN = @for line in
+MESSAGE_END = ; do echo "$$line"; done
+
+configure_args = @configure_args@
+#### End of variables
+
+all:
+
+.DEFAULT: all
-EXTOBJS =
-
-MAINOBJ = main.@OBJEXT@
-
-OBJS = array.@OBJEXT@ \
- bignum.@OBJEXT@ \
- class.@OBJEXT@ \
- compar.@OBJEXT@ \
- dir.@OBJEXT@ \
- dln.@OBJEXT@ \
- enum.@OBJEXT@ \
- error.@OBJEXT@ \
- eval.@OBJEXT@ \
- file.@OBJEXT@ \
- gc.@OBJEXT@ \
- hash.@OBJEXT@ \
- inits.@OBJEXT@ \
- io.@OBJEXT@ \
- marshal.@OBJEXT@ \
- math.@OBJEXT@ \
- numeric.@OBJEXT@ \
- object.@OBJEXT@ \
- pack.@OBJEXT@ \
- parse.@OBJEXT@ \
- process.@OBJEXT@ \
- prec.@OBJEXT@ \
- random.@OBJEXT@ \
- range.@OBJEXT@ \
- re.@OBJEXT@ \
- regex.@OBJEXT@ \
- ruby.@OBJEXT@ \
- signal.@OBJEXT@ \
- sprintf.@OBJEXT@ \
- st.@OBJEXT@ \
- string.@OBJEXT@ \
- struct.@OBJEXT@ \
- time.@OBJEXT@ \
- util.@OBJEXT@ \
- variable.@OBJEXT@ \
- version.@OBJEXT@ \
- $(MISSING)
-
-all: miniruby$(EXEEXT) @PREP@ rbconfig.rb $(LIBRUBY)
- @@MINIRUBY@ -Cext extmk.rb @EXTSTATIC@
-
-miniruby$(EXEEXT): config.status $(LIBRUBY_A) $(MAINOBJ) dmyext.@OBJEXT@
- @rm -f $@
- $(PURIFY) $(CC) $(LDFLAGS) $(MAINOBJ) dmyext.@OBJEXT@ $(LIBRUBY_A) $(LIBS) -o $@
-
-$(PROGRAM): $(LIBRUBY) $(MAINOBJ) $(EXTOBJS)
- @rm -f $@
- $(PURIFY) $(CC) $(LDFLAGS) $(XLDFLAGS) $(MAINOBJ) $(EXTOBJS) $(LIBRUBYARG) $(LIBS) -o $@
-
-$(LIBRUBY_A): $(OBJS) dmyext.@OBJEXT@
- @AR@ rcu $@ $(OBJS) dmyext.@OBJEXT@
- @-@RANLIB@ $@ 2> /dev/null || true
-
-$(LIBRUBY_SO): $(OBJS) dmyext.@OBJEXT@
- $(LDSHARED) $(DLDFLAGS) $(OBJS) dmyext.@OBJEXT@ $(SOLIBS) -o $@
- @-@MINIRUBY@ -e 'ARGV.each{|link| File.delete link if File.exist? link; \
+# Prevent GNU make v3 from overflowing arg limit on SysV.
+.NOEXPORT:
+
+miniruby$(EXEEXT):
+ @-if test -f $@; then $(MV) -f $@ $@.old; $(RM) $@.old; fi
+ $(ECHO) linking $@
+ $(Q) $(PURIFY) $(CC) $(LDFLAGS) $(XLDFLAGS) $(MAINLIBS) $(NORMALMAINOBJ) $(MINIOBJS) $(COMMONOBJS) $(DMYEXT) $(LIBS) $(OUTFLAG)$@
+
+$(PROGRAM):
+ @$(RM) $@
+ $(ECHO) linking $@
+ $(Q) $(PURIFY) $(CC) $(LDFLAGS) $(XLDFLAGS) $(MAINLIBS) $(MAINOBJ) $(EXTOBJS) $(LIBRUBYARG) $(LIBS) $(EXTLIBS) $(OUTFLAG)$@
+ $(Q) $(POSTLINK)
+
+# We must `rm' the library each time this rule is invoked because "updating" a
+# MAB library on Apple/NeXT (see --enable-fat-binary in configure) is not
+# supported.
+$(LIBRUBY_A):
+ @$(RM) $@
+ $(ECHO) linking static-library $@
+ $(Q) $(AR) $(ARFLAGS) $@ $(OBJS) $(DMYEXT)
+ @-$(RANLIB) $@ 2> /dev/null || true
+ $(ECHO) verifying static-library $@
+ @$(PURIFY) $(CC) $(XLDFLAGS) $(MAINOBJ) $(LIBRUBY_A) $(MAINLIBS) $(EXTLIBS) $(LIBS) $(OUTFLAG)conftest$(EXEEXT) $(LDFLAGS)
+ @$(RM) conftest$(EXEEXT) conftest.c
+
+$(LIBRUBY_SO):
+ @-$(PRE_LIBRUBY_UPDATE)
+ $(ECHO) linking shared-library $@
+ $(Q) $(LDSHARED) $(DLDFLAGS) $(OBJS) $(DLDOBJS) $(SOLIBS) $(EXTSOLIBS) $(OUTFLAG)$@
+ -$(Q) $(OBJCOPY) -w -L '$(SYMBOL_PREFIX)Init_*' -L '$(SYMBOL_PREFIX)*_threadptr_*' $@
+ @-$(MINIRUBY) -e 'ARGV.each{|link| File.delete link if File.exist? link; \
File.symlink "$(LIBRUBY_SO)", link}' \
$(LIBRUBY_ALIASES) || true
-install: rbconfig.rb
- @MINIRUBY@ $(srcdir)/instruby.rb $(DESTDIR)
-
-clean:; @rm -f $(OBJS) $(LIBRUBY_A) $(LIBRUBY_SO) $(LIBRUBY_ALIASES) $(MAINOBJ) rbconfig.rb
- @rm -f ext/extinit.c ext/extinit.@OBJEXT@ dmyext.@OBJEXT@
- @-@MINIRUBY@ -Cext extmk.rb clean 2> /dev/null || true
- @rm -f $(PROGRAM) miniruby$(EXEEXT)
-
-distclean: clean
- @rm -f Makefile ext/extmk.rb config.h
- @rm -f ext/config.cache config.cache config.log config.status
- @rm -f *~ core *.core gmon.out y.tab.c y.output ruby.imp
-
-realclean: distclean
- @rm -f parse.c
- @rm -f lex.c
-
-test: miniruby$(EXEEXT)
- @./miniruby$(EXEEXT) $(srcdir)/rubytest.rb
-
-rbconfig.rb: miniruby$(EXEEXT)
- @@MINIRUBY@ $(srcdir)/mkconfig.rb rbconfig.rb
-
-fake.rb: miniruby$(EXEEXT)
- @echo ' \
- class Object; \
- remove_const :RUBY_PLATFORM; \
- RUBY_PLATFORM = "@arch@"; \
- if defined? PLATFORM; \
- remove_const :PLATFORM; \
- PLATFORM = "@arch@"; \
- end; \
- CROSS_COMPILING = true; \
- end \
- ' > $@
-
-config.status: $(srcdir)/configure
- $(SHELL) ./config.status --recheck
+fake: $(arch)-fake.rb
+$(arch)-fake.rb: config.status $(srcdir)/template/fake.rb.in
+ @./config.status --file=$@:$(srcdir)/template/fake.rb.in
+ @chmod +x $@
+
+ruby_pc = @ruby_pc@
+$(ruby_pc):
+ @./config.status --file=$@:$(srcdir)/template/ruby.pc.in
+
+install-cross: $(arch)-fake.rb $(RBCONFIG) rbconfig.rb $(arch_hdrdir)/ruby/config.h \
+ $(LIBRUBY_A) $(LIBRUBY_SO) $(ARCHFILE)
+ $(ECHO) installing cross-compiling stuff
+ $(Q) $(MAKEDIRS) $(XRUBY_RUBYLIBDIR)/$(arch) $(XRUBY_RUBYHDRDIR)/$(arch)/ruby
+ $(Q) sed '/^\$$:\.unshift/q' $(arch)-fake.rb > fake.rb
+ $(Q) $(BASERUBY) -p \
+ -e '~/^\s*CONFIG\["LDFLAGS"\]/ and' \
+ -e '$$_[/(?=\s*"$$)/] = %q[ #{(CONFIG["LIBPATHFLAG"]%File.dirname(__FILE__)).strip}]' \
+ rbconfig.rb > fake-rbconfig.rb
+ $(INSTALL_SCRIPT) fake.rb $(XRUBY_RUBYLIBDIR)/$(arch)/fake.rb
+ $(INSTALL_SCRIPT) fake-rbconfig.rb $(XRUBY_RUBYLIBDIR)/$(arch)/rbconfig.rb
+ @$(RM) fake.rb fake-rbconfig.rb
+ $(INSTALL_DATA) $(arch_hdrdir)/ruby/config.h $(XRUBY_RUBYHDRDIR)/$(arch)/ruby
+ $(INSTALL_DATA) $(top_srcdir)/include/ruby/win32.h $(XRUBY_RUBYHDRDIR)/ruby
+ $(INSTALL_DATA) $(LIBRUBY) $(LIBRUBY_A) $(XRUBY_RUBYLIBDIR)/$(arch)
+ $(INSTALL_PROGRAM) $(LIBRUBY_SO) $(XRUBY_RUBYLIBDIR)/$(arch)
+
+Makefile: $(srcdir)/Makefile.in $(srcdir)/enc/Makefile.in
+
+$(MKFILES): config.status
+ MAKE=$(MAKE) $(SHELL) ./config.status
+ @{ \
+ echo "all:; -@rm -f conftest.mk"; \
+ echo "conftest.mk: .force; @echo AUTO_REMAKE"; \
+ echo ".force:"; \
+ } > conftest.mk || exit 1; \
+ $(MAKE) -f conftest.mk | grep '^AUTO_REMAKE$$' >/dev/null 2>&1 || \
+ { echo "Makefile updated, restart."; exit 1; }
+
+uncommon.mk: $(srcdir)/common.mk
+ sed 's/{\$$([^(){}]*)[^{}]*}//g' $< > $@
+
+.PHONY: reconfig
+reconfig-args = $(srcdir)/configure $(configure_args)
+config.status-args = ./config.status --recheck
+reconfig-exec-0 = exec 3>&1; exit `exec 4>&1; { "$$@" 3>&- 4>&-; echo $$? 1>&4; } | fgrep -v '(cached)' 1>&3`
+reconfig-exec-1 = set -x; "$$@"
+
+reconfig config.status: $(srcdir)/configure $(srcdir)/enc/Makefile.in \
+ $(srcdir)/include/ruby/version.h
+ @PWD= MINIRUBY="$(MINIRUBY)"; export MINIRUBY; \
+ set $(SHELL) $($@-args); $(reconfig-exec-$(V))
$(srcdir)/configure: $(srcdir)/configure.in
- cd $(srcdir) && $(AUTOCONF)
+ $(CHDIR) $(srcdir) && exec $(AUTOCONF)
+
+# Things which should be considered:
+# * with gperf v.s. without gperf
+# * committers may have various versions of gperf
+# * ./configure v.s. ../ruby/configure
+# * GNU make v.s. HP-UX make # HP-UX make invokes the action if lex.c and keywords has same mtime.
+# * svn checkout generate a file with mtime as current time
+# * ext4 and XFS has a mtime with fractional part
+lex.c: defs/keywords
+ @\
+ if cmp -s $(srcdir)/defs/lex.c.src $?; then \
+ [ $(Q) ] && echo copying $@ || set -x; \
+ $(CP) $(srcdir)/lex.c.blt $@; \
+ else \
+ [ $(Q) ] && echo generating $@ || set -x; \
+ gperf -C -p -j1 -i 1 -g -o -t -N rb_reserved_word -k1,3,$$ $? > $@.tmp && \
+ $(MV) $@.tmp $@ && \
+ $(CP) $? $(srcdir)/defs/lex.c.src && \
+ $(CP) $@ $(srcdir)/lex.c.blt; \
+ fi
+
+NAME2CTYPE_OPTIONS = -7 -c -j1 -i1 -t -C -P -T -H uniname2ctype_hash -Q uniname2ctype_pool -N uniname2ctype_p
+
+enc/unicode/name2ctype.h: enc/unicode/name2ctype.kwd
+ $(MAKEDIRS) $(@D)
+ @set +e; \
+ if cmp -s $(?:.kwd=.src) $?; then \
+ set -x; \
+ $(CP) $(?:.kwd=.h.blt) $@; \
+ else \
+ trap '$(RM) $@-1.h $@-2.h' 0 && \
+ set -x; \
+ sed '/^#ifdef USE_UNICODE_PROPERTIES/,/^#endif/d' $? | gperf $(NAME2CTYPE_OPTIONS) > $@-1.h && \
+ sed '/^#ifdef USE_UNICODE_PROPERTIES/d;/^#endif/d' $? | gperf $(NAME2CTYPE_OPTIONS) > $@-2.h && \
+ diff -DUSE_UNICODE_PROPERTIES $@-1.h $@-2.h > $@.tmp || :; \
+ $(MV) $@.tmp $@ && \
+ $(CP) $? $(?:.kwd=.src) && \
+ $(CP) $@ $(?:.kwd=.h.blt); \
+ fi
.c.@OBJEXT@:
- $(CC) $(CFLAGS) $(CPPFLAGS) -c $<
-
-lex.c: keywords
- gperf -p -j1 -i 1 -g -o -t -N rb_reserved_word -k1,3,$$ $(srcdir)/keywords > lex.c
-
-parse.c: parse.y
- $(YACC) $<
- mv -f y.tab.c parse.c
-
-parse.@OBJEXT@: parse.c
-
-alloca.@OBJEXT@: $(srcdir)/missing/alloca.c
- $(CC) -I. $(CFLAGS) $(CPPFLAGS) -c $(srcdir)/missing/alloca.c
-
-crypt.@OBJEXT@: $(srcdir)/missing/crypt.c
- $(CC) -I. $(CFLAGS) $(CPPFLAGS) -c $(srcdir)/missing/crypt.c
-
-dup2.@OBJEXT@: $(srcdir)/missing/dup2.c
- $(CC) -I. $(CFLAGS) $(CPPFLAGS) -c $(srcdir)/missing/dup2.c
-
-finite.@OBJEXT@: $(srcdir)/missing/finite.c
- $(CC) -I. $(CFLAGS) $(CPPFLAGS) -c $(srcdir)/missing/finite.c
-
-flock.@OBJEXT@: $(srcdir)/missing/flock.c
- $(CC) -I. $(CFLAGS) $(CPPFLAGS) -c $(srcdir)/missing/flock.c
-
-isinf.@OBJEXT@: $(srcdir)/missing/isinf.c
- $(CC) -I. $(CFLAGS) $(CPPFLAGS) -c $(srcdir)/missing/isinf.c
-
-isnan.@OBJEXT@: $(srcdir)/missing/isnan.c
- $(CC) -I. $(CFLAGS) $(CPPFLAGS) -c $(srcdir)/missing/isnan.c
-
-fnmatch.@OBJEXT@: $(srcdir)/missing/fnmatch.c
- $(CC) -I. $(CFLAGS) $(CPPFLAGS) -c $(srcdir)/missing/fnmatch.c
-
-memcmp.@OBJEXT@: $(srcdir)/missing/memcmp.c
- $(CC) $(CFLAGS) $(CPPFLAGS) -c $(srcdir)/missing/memcmp.c
-
-memmove.@OBJEXT@: $(srcdir)/missing/memmove.c
- $(CC) $(CFLAGS) $(CPPFLAGS) -c $(srcdir)/missing/memmove.c
-
-mkdir.@OBJEXT@: $(srcdir)/missing/mkdir.c
- $(CC) $(CFLAGS) $(CPPFLAGS) -c $(srcdir)/missing/mkdir.c
-
-vsnprintf.@OBJEXT@: $(srcdir)/missing/vsnprintf.c
- $(CC) $(CFLAGS) $(CPPFLAGS) -c $(srcdir)/missing/vsnprintf.c
-
-strcasecmp.@OBJEXT@: $(srcdir)/missing/strcasecmp.c
- $(CC) $(CFLAGS) $(CPPFLAGS) -c $(srcdir)/missing/strcasecmp.c
-
-strncasecmp.@OBJEXT@: $(srcdir)/missing/strncasecmp.c
- $(CC) $(CFLAGS) $(CPPFLAGS) -c $(srcdir)/missing/strncasecmp.c
-
-strchr.@OBJEXT@: $(srcdir)/missing/strchr.c
- $(CC) $(CFLAGS) $(CPPFLAGS) -c $(srcdir)/missing/strchr.c
-
-strerror.@OBJEXT@: $(srcdir)/missing/strerror.c
- $(CC) $(CFLAGS) $(CPPFLAGS) -c $(srcdir)/missing/strerror.c
-
-strftime.@OBJEXT@: $(srcdir)/missing/strftime.c
- $(CC) -I. $(CFLAGS) $(CPPFLAGS) -c $(srcdir)/missing/strftime.c
-
-strstr.@OBJEXT@: $(srcdir)/missing/strstr.c
- $(CC) $(CFLAGS) $(CPPFLAGS) -c $(srcdir)/missing/strstr.c
-
-strtod.@OBJEXT@: $(srcdir)/missing/strtod.c
- $(CC) $(CFLAGS) $(CPPFLAGS) -c $(srcdir)/missing/strtod.c
-
-strtol.@OBJEXT@: $(srcdir)/missing/strtol.c
- $(CC) $(CFLAGS) $(CPPFLAGS) -c $(srcdir)/missing/strtol.c
-
-strtoul.@OBJEXT@: $(srcdir)/missing/strtoul.c
- $(CC) $(CFLAGS) $(CPPFLAGS) -c $(srcdir)/missing/strtoul.c
-
-x68.@OBJEXT@: $(srcdir)/missing/x68.c
- $(CC) $(CFLAGS) $(CPPFLAGS) -c $(srcdir)/missing/x68.c
-
-os2.@OBJEXT@: $(srcdir)/missing/os2.c
- $(CC) $(CFLAGS) $(CPPFLAGS) -c $(srcdir)/missing/os2.c
-
-dl_os2.@OBJEXT@: $(srcdir)/missing/dl_os2.c
- $(CC) $(CFLAGS) $(CPPFLAGS) -c $(srcdir)/missing/dl_os2.c
-
-win32.@OBJEXT@: $(srcdir)/win32/win32.c
- $(CC) $(CFLAGS) $(CPPFLAGS) -c $(srcdir)/win32/win32.c
-
-# Prevent GNU make v3 from overflowing arg limit on SysV.
-.NOEXPORT:
-###
-parse.@OBJEXT@: parse.y ruby.h config.h defines.h intern.h env.h node.h st.h regex.h util.h lex.c
-###
-array.@OBJEXT@: array.c ruby.h config.h defines.h intern.h util.h st.h
-bignum.@OBJEXT@: bignum.c ruby.h config.h defines.h intern.h
-class.@OBJEXT@: class.c ruby.h config.h defines.h intern.h rubysig.h node.h st.h
-compar.@OBJEXT@: compar.c ruby.h config.h defines.h intern.h
-dir.@OBJEXT@: dir.c ruby.h config.h defines.h intern.h
-dln.@OBJEXT@: dln.c config.h defines.h dln.h
-dmyext.@OBJEXT@: dmyext.c
-enum.@OBJEXT@: enum.c ruby.h config.h defines.h intern.h node.h
-error.@OBJEXT@: error.c ruby.h config.h defines.h intern.h env.h version.h
-eval.@OBJEXT@: eval.c ruby.h config.h defines.h intern.h node.h env.h rubysig.h st.h dln.h
-file.@OBJEXT@: file.c ruby.h config.h defines.h intern.h rubyio.h rubysig.h dln.h
-gc.@OBJEXT@: gc.c ruby.h config.h defines.h intern.h rubysig.h st.h node.h env.h re.h regex.h
-hash.@OBJEXT@: hash.c ruby.h config.h defines.h intern.h st.h rubysig.h util.h
-inits.@OBJEXT@: inits.c ruby.h config.h defines.h intern.h
-io.@OBJEXT@: io.c ruby.h config.h defines.h intern.h rubyio.h rubysig.h env.h util.h
-main.@OBJEXT@: main.c ruby.h config.h defines.h intern.h
-marshal.@OBJEXT@: marshal.c ruby.h config.h defines.h intern.h rubyio.h st.h
-prec.@OBJEXT@: prec.c ruby.h config.h defines.h intern.h
-math.@OBJEXT@: math.c ruby.h config.h defines.h intern.h
-numeric.@OBJEXT@: numeric.c ruby.h config.h defines.h intern.h
-object.@OBJEXT@: object.c ruby.h config.h defines.h intern.h st.h
-pack.@OBJEXT@: pack.c ruby.h config.h defines.h intern.h
-process.@OBJEXT@: process.c ruby.h config.h defines.h intern.h rubysig.h st.h
-random.@OBJEXT@: random.c ruby.h config.h defines.h intern.h
-range.@OBJEXT@: range.c ruby.h config.h defines.h intern.h
-re.@OBJEXT@: re.c ruby.h config.h defines.h intern.h re.h regex.h
-regex.@OBJEXT@: regex.c config.h regex.h
-ruby.@OBJEXT@: ruby.c ruby.h config.h defines.h intern.h dln.h node.h util.h
-signal.@OBJEXT@: signal.c ruby.h config.h defines.h intern.h rubysig.h
-sprintf.@OBJEXT@: sprintf.c ruby.h config.h defines.h intern.h
-st.@OBJEXT@: st.c config.h st.h
-string.@OBJEXT@: string.c ruby.h config.h defines.h intern.h re.h regex.h
-struct.@OBJEXT@: struct.c ruby.h config.h defines.h intern.h
-time.@OBJEXT@: time.c ruby.h config.h defines.h intern.h
-util.@OBJEXT@: util.c ruby.h config.h defines.h intern.h util.h
-variable.@OBJEXT@: variable.c ruby.h config.h defines.h intern.h env.h node.h st.h
-version.@OBJEXT@: version.c ruby.h config.h defines.h intern.h version.h
+ @$(ECHO) compiling $<
+ $(Q) $(CC) $(CFLAGS) $(XCFLAGS) $(CPPFLAGS) $(COUTFLAG)$@ -c $<
+
+.s.@OBJEXT@:
+ @$(ECHO) assembling $<
+ $(Q) $(AS) $(ASFLAGS) -o $@ $<
+
+.c.S:
+ @$(ECHO) translating $<
+ $(Q) $(CC) $(CFLAGS) $(XCFLAGS) $(CPPFLAGS) $(COUTFLAG)$@ -S $<
+
+.c.i:
+ @$(ECHO) preprocessing $<
+ $(Q) $(CPP) $(warnflags) $(XCFLAGS) $(CPPFLAGS) $(COUTFLAG)$@ -E $< > $@
+
+clean-local::
+ $(Q)$(RM) ext/extinit.c ext/extinit.$(OBJEXT) ext/ripper/y.output \
+ enc/encinit.c enc/encinit.$(OBJEXT)
+ -$(Q)$(RM) $(pkgconfig_DATA)
+
+distclean-local::
+ $(Q)$(RM) ext/config.cache $(RBCONFIG) Doxyfile
+ -$(Q)$(RM) run.gdb
+ -$(Q)$(RM) $(INSTALLED_LIST) $(arch_hdrdir)/ruby/config.h verconf.h
+ -$(Q)$(RMDIRS) $(arch_hdrdir)/ruby 2> /dev/null || true
+
+clean-ext distclean-ext realclean-ext::
+ @cd ext 2>/dev/null || exit 0; set dummy `echo "${EXTS}" | tr , ' '`; shift; \
+ test "$$#" = 0 && set .; \
+ set dummy `\
+ find "$$@" -name Makefile -print | sed 's:^\./::;s:/Makefile$$:~:' | sort | sed 's:~$$::'; \
+ `; shift; \
+ cd ..; \
+ for dir do \
+ echo $(@:-ext=)ing "$$dir"; \
+ (cd "ext/$$dir" && exec $(MAKE) $(MFLAGS) $(@:-ext=)) && \
+ case "$@" in \
+ *distclean-ext*|*realclean-ext*) \
+ $(RMDIRS) "ext/$$dir" 2> /dev/null || true;; \
+ esac; \
+ done
+ -$(Q)$(RM) ext/extinit.$(OBJEXT)
+
+distclean-ext realclean-ext::
+ -$(Q)$(RM) ext/extinit.c
+ -$(Q)$(RMDIR) ext 2> /dev/null || true
+
+clean-extout:
+ -$(Q)$(RMDIRS) $(EXTOUT) 2> /dev/null || true
+
+clean-enc distclean-enc realclean-enc:
+ @test -f "$(ENC_MK)" || exit 0; \
+ echo $(@:-enc=ing) encodings; \
+ exec $(MAKE) -f $(ENC_MK) $(MFLAGS) $(@:-enc=)
+
+clean-rdoc distclean-rdoc realclean-rdoc:
+ @echo $(@:-rdoc=ing) rdoc
+ $(Q)$(RMALL) $(RDOCOUT)
+clean-capi distclean-capi realclean-capi:
+ @echo $(@:-capi=ing) capi
+ $(Q)$(RMALL) $(CAPIOUT)
+
+clean-platform:
+ @$(RM) $(PLATFORM_D)
+ -$(Q) $(RMDIR) $(PLATFORM_DIR) 2> /dev/null || true
+
+ext/extinit.$(OBJEXT): ext/extinit.c $(SETUP)
+ $(ECHO) compiling $@
+ $(Q) $(CC) $(CFLAGS) $(XCFLAGS) $(CPPFLAGS) $(COUTFLAG)$@ -c ext/extinit.c
+
+enc/encinit.$(OBJEXT): enc/encinit.c $(SETUP)
+
+up::
+ @$(CHDIR) "$(srcdir)" && LC_TIME=C exec $(VCSUP)
+
+update-mspec:
+ @$(CHDIR) $(srcdir); \
+ if [ -d spec/mspec ]; then \
+ cd spec/mspec; \
+ echo updating mspec ...; \
+ exec git pull; \
+ else \
+ echo retrieving mspec ...; \
+ exec git clone $(MSPEC_GIT_URL) spec/mspec; \
+ fi
+
+update-rubyspec: update-mspec
+ @$(CHDIR) $(srcdir); \
+ if [ -d spec/rubyspec ]; then \
+ cd spec/rubyspec; \
+ echo updating rubyspec ...; \
+ exec git pull; \
+ else \
+ echo retrieving rubyspec ...; \
+ exec git clone $(RUBYSPEC_GIT_URL) spec/rubyspec; \
+ fi
+
+test-rubyspec-precheck:
+ @if [ ! -d $(srcdir)/spec/rubyspec ]; then echo No rubyspec here. make update-rubyspec first.; exit 1; fi
+
+INSNS = opt_sc.inc optinsn.inc optunifs.inc insns.inc insns_info.inc \
+ vmtc.inc vm.inc
+
+$(INSNS): $(srcdir)/insns.def vm_opts.h \
+ $(srcdir)/defs/opt_operand.def $(srcdir)/defs/opt_insn_unif.def \
+ $(srcdir)/tool/instruction.rb $(srcdir)/tool/insns2vm.rb
+ $(ECHO) generating $@
+ $(Q) $(BASERUBY) -Ku $(srcdir)/tool/insns2vm.rb $(INSNS2VMOPT) $@
diff --git a/NEWS b/NEWS
new file mode 100644
index 0000000000..e9124a013c
--- /dev/null
+++ b/NEWS
@@ -0,0 +1,245 @@
+# -*- rd -*-
+= NEWS
+
+This document is a list of user visible feature changes made between
+releases except for bug fixes.
+
+Note that each entry is kept so brief that no reason behind or
+reference information is supplied with. For a full list of changes
+with all sufficient information, see the ChangeLog file.
+
+== Changes since the 1.9.3 release
+
+=== C API updates
+* NUM2SHORT() and NUM2USHORT() added. They are similar to NUM2INT, but short.
+
+=== Library updates (outstanding ones only)
+
+* builtin classes
+
+ * Array
+ * incompatible changes:
+ * random parameter of Array#shuffle! and Array#sample now
+ will be called with one argument, maximum value.
+
+ * Enumerable
+ * added method:
+ * added Enumerable#lazy method for lazy enumeration.
+
+ * ENV
+ * aliased method:
+ * ENV.to_h is a new alias for ENV.to_hash
+
+ * Hash
+ * added method:
+ * added Hash#to_h as explicit conversion method, like Array#to_a.
+ * extended method:
+ * Hash#default_proc= can be passed nil to clear the default proc.
+
+ * Kernel
+ * added method:
+ * added Kernel#Hash conversion method like Array() or Float().
+ * added Kernel#using, which imports refinements into the current scope.
+ [experimental]
+ * extended method:
+ * Kernel#warn accepts multiple args in like puts.
+ * Kernel#caller accepts second optional argument `n' which specify
+ required caller size.
+ * incompatible changes:
+ * system() and exec() closes non-standard file descriptors
+ (The default of :close_others option is changed to true by default.)
+ * respond_to? against a protected method now returns false unless
+ the second argument is true.
+ * __callee__ has returned to the original behavior, and now
+ returns the called name but not the original name in an
+ aliased method.
+ * Kernel#inspect does not call #to_s anymore
+ (it used to call redefined #to_s).
+
+ * LoadError
+ * added method:
+ * added LoadError#path method to return the file name that could not be
+ loaded.
+
+ * Module
+ * added method:
+ * added Module#prepend which is similar to Module#include,
+ however a method in the prepended module overrides the
+ corresponding method in the prepending module.
+ * added Module#refine, which extends a class or module locally.
+ [experimental]
+ * added Module#refinements, which returns refinements defined in the
+ receiver. [experimental]
+ * added Module#using, which imports refinements into the receiver.
+ [experimental]
+ * extended method:
+ * Module#define_method accepts a UnboundMethod from a Module.
+ * Module#const_get accepts a qualified constant string, e.g.
+ Object.const_get("Foo::Bar::Baz")
+
+ * NilClass
+ * added method:
+ * added nil.to_h which returns {}
+
+ * Signal
+ * incompatible changes:
+ * Signal.trap raises ArgumentError when :SEGV, :BUS, :ILL, :FPE, :VTALRM
+ are specified.
+
+ * Struct
+ * added method:
+ * added Struct#to_h returning values with keys corresponding to the
+ instance variable names.
+
+ * Thread
+ * added method:
+ * added Thread#thread_variable_get for getting thread local variables
+ (these are different than Fiber local variables).
+ * added Thread#thread_variable_set for setting thread local variables.
+ * added Thread#thread_variables for getting a list of the thread local
+ variable keys.
+ * added Thread#thread_variable? for testing to see if a particular thread
+ variable has been set.
+
+ * Time
+ * change return value:
+ * Time#to_s returned encoding defaults to US-ASCII but automatically
+ transcodes to Encoding.default_internal if it is set.
+
+ * Fiber
+ * incompatible changes:
+ * Fiber#resume cannot resume a fiber which invokes "Fiber#transfer".
+
+* net/http
+ * new features:
+ * Proxies are now automatically detected from the http_proxy environment
+ variable. See Net::HTTP::new for details.
+ * gzip and deflate compression are now requested for all requests by
+ default. See Net::HTTP for details.
+ * SSL sessions are now reused across connections for a single instance.
+ This speeds up connection by using a previously negotiated session.
+ * new methods:
+ * Net::HTTP#local_host
+ * Net::HTTP#local_host=
+ * Net::HTTP#local_port
+ * Net::HTTP#local_port=
+ * extended method:
+ * Net::HTTP#connect uses local_host and local_port if specified.
+
+* net/imap
+ * new methods:
+ * Net::IMAP.default_port
+ * Net::IMAP.default_imap_port
+ * Net::IMAP.default_tls_port
+ * Net::IMAP.default_ssl_port
+ * Net::IMAP.default_imaps_port
+
+* ostruct
+ * new methods:
+ * OpenStruct#[], []=
+ * OpenStruct#each_pair
+ * OpenStruct#eql?
+ * OpenStruct#hash
+ * OpenStruct#to_h converts the struct to a hash.
+ * extended method:
+ * OpenStruct.new also accepts an OpenStruct / Struct.
+
+* pathname
+ * extended method:
+ * Pathname#find returns an enumerator if no block is given.
+
+* resolv
+ * new methods:
+ * Resolv::DNS#timeouts=
+ * Resolv::DNS::Config#timeouts=
+
+* shellwords
+ * Shellwords#shellescape() now stringifies the given object using to_s.
+ * Shellwords#shelljoin() accepts non-string objects in the given
+ array, each of which is stringified using to_s.
+
+* syslog
+ * Added Syslog::Logger which provides a Logger API atop Syslog.
+ * Syslog::Priority, Syslog::Level, Syslog::Option and Syslog::Macros
+ are introduced for easy detection of available constants on a
+ running system.
+
+* lib/tmpdir.rb
+ * incompatible changes:
+ * Dir.mktmpdir uses FileUtils.remove_entry instead of
+ FileUtils.remove_entry_secure. This means that applications should not
+ change the permission of the created temporary directory to make
+ accessible from other users.
+
+* zlib
+ * Added streaming support for Zlib::Inflate and Zlib::Deflate. This allows
+ processing of a stream without the use of large amounts of memory.
+ * Added support for the new deflate strategies Zlib::RLE and Zlib::FIXED.
+ * Zlib streams are now processed without the GVL. This allows gzip, zlib and
+ deflate streams to be processed in parallel.
+
+* openssl
+ * Consistently raise an error when trying to encode nil values. All instances
+ of OpenSSL::ASN1::Primitive now raise TypeError when calling to_der on an
+ instance whose value is nil. All instances of OpenSSL::ASN1::Constructive
+ raise NoMethodError in the same case. Constructing such values is still
+ permitted.
+ * TLS 1.1 & 1.2 support by setting OpenSSL::SSL::SSLContext#ssl_version to
+ :TLSv1_2, :TLSv1_2_server, :TLSv1_2_client or :TLSv1_1, :TLSv1_1_server
+ :TLSv1_1_client. The version being effectively used can be queried
+ with OpenSSL::SSL#ssl_version. Furthermore, it is also possible to
+ blacklist the new TLS versions with OpenSSL::SSL:OP_NO_TLSv1_1 and
+ OpenSSL::SSL::OP_NO_TLSv1_2.
+ * Added OpenSSL::SSL::SSLContext#renegotiation_cb. A user-defined callback
+ may be set which gets called whenever a new handshake is negotiated. This
+ also allows to programmatically decline (client) renegotiation attempts.
+ * Support for "0/n" splitting of records as BEAST mitigation via
+ OpenSSL::SSL::OP_DONT_INSERT_EMPTY_FRAGMENTS.
+ * OpenSSL requires passwords for decrypting PEM-encoded files to be at least
+ four characters long. This led to awkward situations where an export with
+ a password with fewer than four characters was possible, but accessing the
+ file afterwards failed. OpenSSL::PKey::RSA, OpenSSL::PKey::DSA and
+ OpenSSL::PKey::EC therefore now enforce the same check when exporting a
+ private key to PEM with a password - it has to be at least four characters
+ long.
+ * SSL/TLS support for the Next Protocol Negotiation extension. Supported
+ with OpenSSL 1.0.1 and higher.
+ * OpenSSL::OPENSSL_FIPS allows client applications to detect whether OpenSSL
+ is running in FIPS mode and to react to the special requirements this
+ might impy.
+
+* yaml
+ * Syck has been removed. YAML now completely depends on libyaml being
+ installed.
+
+* objspace
+ * new method:
+ * ObjectSpace.reachable_objects_from(obj)
+
+=== Language changes
+
+ * Added %i and %I for symbol list creation (similar to %w and %W).
+
+=== Compatibility issues (excluding feature bug fixes)
+
+ * Signal.trap
+
+ See above.
+
+ * Merge Onigmo.
+ https://github.com/k-takata/Onigmo
+
+ * The :close_others option is true by default for system() and exec().
+ Also, the close-on-exec flag is set by default for all new file descriptors.
+ This means file descriptors doesn't inherit to spawned process unless
+ explicitly requested such as system(..., fd=>fd).
+
+ * Kernel#respond_to? against a protected method now returns false
+ unless the second argument is true.
+
+ * Dir.mktmpdir in lib/tmpdir.rb
+
+ See above.
+
+ * OpenStruct new methods can conflict with custom attributes named
+ "each_pair", "eql?", "hash" or "to_h".
diff --git a/README b/README
index 83a88e1359..1dd3330d31 100644
--- a/README
+++ b/README
@@ -1,37 +1,58 @@
-* What's Ruby
+= What's Ruby
Ruby is the interpreted scripting language for quick and
easy object-oriented programming. It has many features to
process text files and to do system management tasks (as in
Perl). It is simple, straight-forward, and extensible.
-* Features of Ruby
- + Simple Syntax
- + *Normal* Object-Oriented features(ex. class, method calls)
- + *Advanced* Object-Oriented features(ex. Mix-in, Singleton-method)
- + Operator Overloading
- + Exception Handling
- + Iterators and Closures
- + Garbage Collection
- + Dynamic Loading of Object files(on some architecture)
- + Highly Portable(works on many UNIX machines, and on DOS,
- Windows, Mac, BeOS etc.)
+== Features of Ruby
-* How to get Ruby
+* Simple Syntax
+* *Normal* Object-Oriented features(ex. class, method calls)
+* *Advanced* Object-Oriented features(ex. Mix-in, Singleton-method)
+* Operator Overloading
+* Exception Handling
+* Iterators and Closures
+* Garbage Collection
+* Dynamic Loading of Object files(on some architecture)
+* Highly Portable (works on many Unix-like/POSIX compatible platforms
+ as well as Windows, Mac OS X, BeOS etc.)
+ cf. http://bugs.ruby-lang.org/projects/ruby-trunk/wiki/SupportedPlatforms
-The Ruby distribution can be found on:
- ftp://ftp.netlab.co.jp/pub/lang/ruby/
+== How to get Ruby
-You can get it by anonymous CVS. How to check out is:
+The Ruby distribution files can be found in the following FTP site:
- $ cvs -d :pserver:anonymous@cvs.ruby-lang.org:/home/cvs login
- (Logging in to anonymous@cvs.ruby-lang.org)
- CVS password: guest
- $ cvs -d :pserver:anonymous@cvs.ruby-lang.org:/home/cvs checkout ruby
+ftp://ftp.ruby-lang.org/pub/ruby/
-* Mailing list
+The trunk of the Ruby source tree can be checked out with the
+following command:
+
+ $ svn co http://svn.ruby-lang.org/repos/ruby/trunk/ ruby
+
+Or if you are using git then use following command:
+
+ $ git clone git://github.com/ruby/ruby.git
+
+There are some other branches under development. Try the following
+command and see the list of branches:
+
+ $ svn ls http://svn.ruby-lang.org/repos/ruby/branches/
+
+Or if you are using git then use following command:
+
+ $ git ls-remote git://github.com/ruby/ruby.git
+
+== Ruby home-page
+
+The URL of the Ruby home-page is:
+
+http://www.ruby-lang.org/
+
+
+== Mailing list
There is a mailing list to talk about Ruby.
To subscribe this list, please send the following phrase
@@ -40,116 +61,88 @@ To subscribe this list, please send the following phrase
e.g.
subscribe Joseph Smith
-in the mail body (not subject) to the address <ruby-talk-ctl@ruby-lang.org>.
+in the mail body (not subject) to the address <mailto:ruby-talk-ctl@ruby-lang.org>.
+
-* How to compile and install
+== How to compile and install
This is what you need to do to compile and install Ruby:
- 1. If ./configure does not exist or is older than configure.in,
+1. If +./configure+ does not exist or is older than configure.in,
run autoconf to (re)generate configure.
- 2. Run ./configure, which will generate config.h and Makefile.
+2. Run +./configure+, which will generate config.h and Makefile.
- 3. Edit defines.h if you need. Probably this step will not need.
+ Some C compiler flags may be added by default depending on your
+ environment. Specify <tt>optflags=..</tt> and <tt>warnflags=..</tt> as
+ necessary to override them.
- 4. Remove comment mark(#) before the module names from ext/Setup (or
+3. Edit +defines.h+ if you need. Usually this step will not be needed.
+
+4. Remove comment mark(<tt>#</tt>) before the module names from +ext/Setup+ (or
add module names if not present), if you want to link modules
statically.
If you don't want to compile non static extension modules
(probably on architectures which does not allow dynamic loading),
- remove comment mark from the line "#option nodynamic" in
- ext/Setup.
+ remove comment mark from the line "<tt>#option nodynamic</tt>" in
+ +ext/Setup+.
- 5. Run make.
+5. Run +make+.
- 6. Optionally, run 'make test' to check whether the compiled Ruby
- interpreter works well. If you see the message "test succeeded",
+6. Optionally, run '<tt>make check</tt>' to check whether the compiled Ruby
+ interpreter works well. If you see the message "<tt>check succeeded</tt>",
your ruby works as it should (hopefully).
- 7. Run 'make install'
+7. Run '<tt>make install</tt>'
+
+ This command will create following directories and install files
+ onto them.
+
+ * <tt>${DESTDIR}${prefix}/bin</tt>
+ * <tt>${DESTDIR}${prefix}/include/ruby-${MAJOR}.${MINOR}.${TEENY}</tt>
+ * <tt>${DESTDIR}${prefix}/include/ruby-${MAJOR}.${MINOR}.${TEENY}/${PLATFORM}</tt>
+ * <tt>${DESTDIR}${prefix}/lib</tt>
+ * <tt>${DESTDIR}${prefix}/lib/ruby</tt>
+ * <tt>${DESTDIR}${prefix}/lib/ruby/${MAJOR}.${MINOR}.${TEENY}</tt>
+ * <tt>${DESTDIR}${prefix}/lib/ruby/${MAJOR}.${MINOR}.${TEENY}/${PLATFORM}</tt>
+ * <tt>${DESTDIR}${prefix}/lib/ruby/site_ruby</tt>
+ * <tt>${DESTDIR}${prefix}/lib/ruby/site_ruby/${MAJOR}.${MINOR}.${TEENY}</tt>
+ * <tt>${DESTDIR}${prefix}/lib/ruby/site_ruby/${MAJOR}.${MINOR}.${TEENY}/${PLATFORM}</tt>
+ * <tt>${DESTDIR}${prefix}/lib/ruby/vendor_ruby</tt>
+ * <tt>${DESTDIR}${prefix}/lib/ruby/vendor_ruby/${MAJOR}.${MINOR}.${TEENY}</tt>
+ * <tt>${DESTDIR}${prefix}/lib/ruby/vendor_ruby/${MAJOR}.${MINOR}.${TEENY}/${PLATFORM}</tt>
+ * <tt>${DESTDIR}${prefix}/lib/ruby/gems/${MAJOR}.${MINOR}.${TEENY}</tt>
+ * <tt>${DESTDIR}${prefix}/share/man/man1</tt>
+ * <tt>${DESTDIR}${prefix}/share/ri/${MAJOR}.${MINOR}.${TEENY}/system</tt>
+
+ If Ruby's API version is '_x.y.z_', the <tt>${MAJOR}</tt> is '_x_', the
+ <tt>${MINOR}</tt> is '_y_', and the <tt>${TEENY}</tt> is '_z_'.
+
+ *NOTE*: teeny of the API version may be different from one of
+ Ruby's program version
You may have to be a super user to install ruby.
If you fail to compile ruby, please send the detailed error report with
the error log and machine/OS type, to help others.
-* Copying
-
-Ruby is copyrighted free software by Yukihiro Matsumoto <matz@zetabits.com>.
-You can redistribute it and/or modify it under either the terms of the GPL
-(see COPYING file), or the conditions below:
- 1. You may make and give away verbatim copies of the source form of the
- software without restriction, provided that you duplicate all of the
- original copyright notices and associated disclaimers.
+== Copying
- 2. You may modify your copy of the software in any way, provided that
- you do at least ONE of the following:
-
- a) place your modifications in the Public Domain or otherwise
- make them Freely Available, such as by posting said
- modifications to Usenet or an equivalent medium, or by allowing
- the author to include your modifications in the software.
-
- b) use the modified software only within your corporation or
- organization.
-
- c) rename any non-standard executables so the names do not conflict
- with standard executables, which must also be provided.
-
- d) make other distribution arrangements with the author.
-
- 3. You may distribute the software in object code or executable
- form, provided that you do at least ONE of the following:
-
- a) distribute the executables and library files of the software,
- together with instructions (in the manual page or equivalent)
- on where to get the original distribution.
-
- b) accompany the distribution with the machine-readable source of
- the software.
-
- c) give non-standard executables non-standard names, with
- instructions on where to get the original software distribution.
-
- d) make other distribution arrangements with the author.
-
- 4. You may modify and include the part of the software into any other
- software (possibly commercial). But some files in the distribution
- are not written by the author, so that they are not under this terms.
-
- They are gc.c(partly), utils.c(partly), regex.[ch], st.[ch] and some
- files under the ./missing directory. See each file for the copying
- condition.
-
- 5. The scripts and library files supplied as input to or produced as
- output from the software do not automatically fall under the
- copyright of the software, but belong to whomever generated them,
- and may be sold commercially, and may be aggregated with this
- software.
-
- 6. THIS SOFTWARE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR
- IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
- WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- PURPOSE.
-
-* Ruby home-page
-
-The URL of the Ruby home-page is:
+See the file +COPYING+.
- http://www.ruby-lang.org/
-* The Author
+== The Author
-Feel free to send comments and bug reports to the author. Here is the
+Feel free to send comments and bug reports to the author. Here is the
author's latest mail address:
- matz@zetabits.com
+<mailto:matz@ruby-lang.org>
-------------------------------------------------------
created at: Thu Aug 3 11:57:36 JST 1995
+--
Local variables:
-mode: indented-text
+mode: rdoc
end:
diff --git a/README.EXT b/README.EXT
index 5079adb558..d81debcba9 100644
--- a/README.EXT
+++ b/README.EXT
@@ -5,23 +5,23 @@ This document explains how to make extension libraries for Ruby.
1. Basic knowledge
In C, variables have types and data do not have types. In contrast,
-Ruby variables do not have static type and data themselves have
-types. So, data need to be converted across the languages.
+Ruby variables do not have a static type, and data themselves have
+types, so data will need to be converted between the languages.
-Data in Ruby represented C type `VALUE'. Each VALUE data have its
-data-type.
+Data in Ruby are represented by the C type `VALUE'. Each VALUE data
+has its data-type.
-To retrieve an C data from the VALUE, you need to:
+To retrieve C data from a VALUE, you need to:
- (1) Identify VALUE's data type
- (2) Convert VALUE into C data
+ (1) Identify the VALUE's data type
+ (2) Convert the VALUE into C data
-Converting to wrong data type may cause serious problems.
+Converting to the wrong data type may cause serious problems.
1.1 Data-types
-Ruby interpreter has data-types as below:
+The Ruby interpreter has the following data types:
T_NIL nil
T_OBJECT ordinary object
@@ -31,31 +31,33 @@ Ruby interpreter has data-types as below:
T_STRING string
T_REGEXP regular expression
T_ARRAY array
- T_FIXNUM Fixnum(31bit integer)
T_HASH associative array
T_STRUCT (Ruby) structure
T_BIGNUM multi precision integer
+ T_FIXNUM Fixnum(31bit or 63bit integer)
+ T_COMPLEX complex number
+ T_RATIONAL rational number
+ T_FILE IO
T_TRUE true
T_FALSE false
T_DATA data
T_SYMBOL symbol
-Otherwise, there are several other types used internally:
+In addition, there are several other types used internally:
T_ICLASS
T_MATCH
T_UNDEF
- T_VARMAP
- T_SCOPE
T_NODE
+ T_ZOMBIE
Most of the types are represented by C structures.
1.2 Check Data Type of the VALUE
-The macro TYPE() defined in ruby.h shows data-type of the VALUE.
+The macro TYPE() defined in ruby.h shows the data type of the VALUE.
TYPE() returns the constant number T_XXXX described above. To handle
-data-types, the code will be like:
+data types, your code will look something like this:
switch (TYPE(obj)) {
case T_FIXNUM:
@@ -73,45 +75,71 @@ data-types, the code will be like:
break;
}
-There is the data-type check function.
+There is the data-type check function
void Check_Type(VALUE value, int type)
-It raises an exception, if the VALUE does not have the type specified.
+which raises an exception if the VALUE does not have the type
+specified.
-There are faster check-macros for fixnums and nil.
+There are also faster check macros for fixnums and nil.
FIXNUM_P(obj)
NIL_P(obj)
1.3 Convert VALUE into C data
-The data for type T_NIL, T_FALSE, T_TRUE are nil, true, false
+The data for type T_NIL, T_FALSE, T_TRUE are nil, false, true
respectively. They are singletons for the data type.
-
-The T_FIXNUM data is the 31bit length fixed integer (63bit length on
-some machines), which can be convert to the C integer by using
-FIX2INT() macro. There also be NUM2INT() which converts any Ruby
-numbers into C integer. The NUM2INT() macro includes type check, so
-the exception will be raised if conversion failed.
+The equivalent C constants are: Qnil, Qfalse, Qtrue.
+Note that Qfalse is false in C also (i.e. 0), but not Qnil.
+
+The T_FIXNUM data is a 31bit or 63bit length fixed integer.
+This size is depend on the size of long: if long is 32bit then
+T_FIXNUM is 31bit, if long is 64bit then T_FIXNUM is 63bit.
+T_FIXNUM can be converted to a C integer by using the
+FIX2INT() macro or FIX2LONG(). Though you have to check that the
+data is really FIXNUM before using them, they are faster. FIX2LONG()
+never raises exceptions, but FIX2INT() raises RangeError if the
+result is bigger or smaller than the size of int.
+There are also NUM2INT() and NUM2LONG() which converts any Ruby
+numbers into C integers. These macros includes a type check,
+so an exception will be raised if the conversion failed. NUM2DBL()
+can be used to retrieve the double float value in the same way.
+
+You can use the macros
+StringValue() and StringValuePtr() to get a char* from a VALUE.
+StringValue(var) replaces var's value with the result of "var.to_str()".
+StringValuePtr(var) does same replacement and returns char*
+representation of var. These macros will skip the replacement if var
+is a String. Notice that the macros take only the lvalue as their
+argument, to change the value of var in place.
+
+You can also use the macro named StringValueCStr(). This is just
+like StringValuePtr(), but always add nul character at the end of
+the result. If the result contains nul character, this macro causes
+the ArgumentError exception.
+StringValuePtr() doesn't guarantee the existence of a nul at the end
+of the result, and the result may contain nul.
Other data types have corresponding C structures, e.g. struct RArray
-for T_ARRAY etc. VALUE of the type which has corresponding structure
-can be cast to retrieve the pointer to the struct. The casting macro
-RXXXX for each data type like RARRAY(obj). see "ruby.h".
+for T_ARRAY etc. The VALUE of the type which has the corresponding
+structure can be cast to retrieve the pointer to the struct. The
+casting macro will be of the form RXXXX for each data type; for
+instance, RARRAY(obj). See "ruby.h".
-For example, `RSTRING(size)->len' is the way to get the size of the
-Ruby String object. The allocated region can be accessed by
-`RSTRING(str)->ptr'. For arrays, `RARRAY(ary)->len' and
-`RARRAY(ary)->ptr' respectively.
+There are some accessing macros for structure members, for example
+`RSTRING_LEN(str)' to get the size of the Ruby String object. The
+allocated region can be accessed by `RSTRING_PTR(str)'. For arrays,
+use `RARRAY_LEN(ary)' and `RARRAY_PTR(ary)' respectively.
Notice: Do not change the value of the structure directly, unless you
-are responsible about the result. It will be the cause of interesting
-bugs.
+are responsible for the result. This ends up being the cause of
+interesting bugs.
1.4 Convert C data into VALUE
-To convert C data to the values of Ruby:
+To convert C data to Ruby values:
* FIXNUM
@@ -121,25 +149,26 @@ To convert C data to the values of Ruby:
cast to VALUE.
-You can determine whether VALUE is pointer or not, by checking LSB.
+You can determine whether a VALUE is pointer or not by checking its LSB.
-Notice Ruby does not allow arbitrary pointer value to be VALUE. They
-should be pointers to the structures which Ruby knows. The known
+Notice Ruby does not allow arbitrary pointer values to be a VALUE. They
+should be pointers to the structures which Ruby knows about. The known
structures are defined in <ruby.h>.
-To convert C numbers to Ruby value, use these macros.
+To convert C numbers to Ruby values, use these macros.
INT2FIX() for integers within 31bits.
INT2NUM() for arbitrary sized integer.
-INT2NUM() converts integers into Bignums, if it is out of FIXNUM
-range, but bit slower.
+INT2NUM() converts an integer into a Bignum if it is out of the FIXNUM
+range, but is a bit slower.
-1.5 Manipulate Ruby data
+1.5 Manipulating Ruby data
-As I already told, it is not recommended to modify object's internal
-structure. To manipulate objects, use functions supplied by Ruby
-interpreter. Useful functions are listed below (not all):
+As I already mentioned, it is not recommended to modify an object's
+internal structure. To manipulate objects, use the functions supplied
+by the Ruby interpreter. Some (not all) of the useful functions are
+listed below:
String functions
@@ -148,56 +177,123 @@ interpreter. Useful functions are listed below (not all):
Creates a new Ruby string.
rb_str_new2(const char *ptr)
+ rb_str_new_cstr(const char *ptr)
- Creates a new Ruby string from C string. This is equivalent to
+ Creates a new Ruby string from a C string. This is equivalent to
rb_str_new(ptr, strlen(ptr)).
rb_tainted_str_new(const char *ptr, long len)
Creates a new tainted Ruby string. Strings from external data
- should be tainted.
+ sources should be tainted.
rb_tainted_str_new2(const char *ptr)
+ rb_tainted_str_new_cstr(const char *ptr)
+
+ Creates a new tainted Ruby string from a C string.
- Creates a new tainted Ruby string from C string.
+ rb_sprintf(const char *format, ...)
+ rb_vsprintf(const char *format, va_list ap)
+
+ Creates a new Ruby string with printf(3) format.
rb_str_cat(VALUE str, const char *ptr, long len)
- Appends len bytes data from ptr to the Ruby string.
+ Appends len bytes of data from ptr to the Ruby string.
+
+ rb_str_cat2(VALUE str, const char* ptr)
+
+ Appends C string ptr to Ruby string str. This function is
+ equivalent to rb_str_cat(str, ptr, strlen(ptr)).
+
+ rb_str_catf(VALUE str, const char* format, ...)
+ rb_str_vcatf(VALUE str, const char* format, va_list ap)
+
+ Appends C string format and successive arguments to Ruby string
+ str according to a printf-like format. These functions are
+ equivalent to rb_str_cat2(str, rb_sprintf(format, ...)) and
+ rb_str_cat2(str, rb_vsprintf(format, ap)), respectively.
+
+ rb_enc_str_new(const char *ptr, long len, rb_encoding *enc)
+
+ Creates a new Ruby string with the specified encoding.
+
+ rb_usascii_str_new(const char *ptr, long len)
+ rb_usascii_str_new_cstr(const char *ptr)
+
+ Creates a new Ruby string with encoding US-ASCII.
+
+ rb_str_resize(VALUE str, long len)
+
+ Resizes Ruby string to len bytes. If str is not modifiable, this
+ function raises an exception. The length of str must be set in
+ advance. If len is less than the old length the content beyond
+ len bytes is discarded, else if len is greater than the old length
+ the content beyond the old length bytes will not be preserved but
+ will be garbage. Note that RSTRING_PTR(str) may change by calling
+ this function.
+
+ rb_str_set_len(VALUE str, long len)
+
+ Sets the length of Ruby string. If str is not modifiable, this
+ function raises an exception. This function preserves the content
+ upto len bytes, regardless RSTRING_LEN(str). len must not exceed
+ the capacity of str.
Array functions
rb_ary_new()
- Creates an array with no element.
+ Creates an array with no elements.
rb_ary_new2(long len)
- Creates an array with no element, with allocating internal buffer
+ Creates an array with no elements, allocating internal buffer
for len elements.
rb_ary_new3(long n, ...)
- Creates an n-elements array from arguments.
+ Creates an n-element array from the arguments.
rb_ary_new4(long n, VALUE *elts)
- Creates an n-elements array from C array.
+ Creates an n-element array from a C array.
+
+ rb_ary_to_ary(VALUE obj)
+
+ Converts the object into an array.
+ Equivalent to Object#to_ary.
+
+ There are many functions to operate an array.
+ They may dump core if other types are given.
+
+ rb_ary_aref(argc, VALUE *argv, VALUE ary)
+
+ Equivaelent to Array#[].
+
+ rb_ary_entry(VALUE ary, long offset)
+
+ ary[offset]
+
+ rb_ary_subseq(VALUE ary, long beg, long len)
+
+ ary[beg, len]
rb_ary_push(VALUE ary, VALUE val)
rb_ary_pop(VALUE ary)
rb_ary_shift(VALUE ary)
rb_ary_unshift(VALUE ary, VALUE val)
- Array operations. The first argument to each functions must be an
- array. They may dump core if other types given.
+ rb_ary_cat(VALUE ary, const VALUE *ptr, long len)
-2. Extend Ruby with C
+ Appends len elements of objects from ptr to the array.
-2.1 Add new features to Ruby
+2. Extending Ruby with C
+
+2.1 Adding new features to Ruby
You can add new features (classes, methods, etc.) to the Ruby
-interpreter. Ruby provides the API to define things below:
+interpreter. Ruby provides APIs for defining the following things:
* Classes, Modules
* Methods, Singleton Methods
@@ -205,43 +301,43 @@ interpreter. Ruby provides the API to define things below:
2.1.1 Class/module definition
-To define class or module, use functions below:
+To define a class or module, use the functions below:
VALUE rb_define_class(const char *name, VALUE super)
VALUE rb_define_module(const char *name)
These functions return the newly created class or module. You may
-want to save this reference into the variable to use later.
+want to save this reference into a variable to use later.
-To define nested class or module, use functions below:
+To define nested classes or modules, use the functions below:
VALUE rb_define_class_under(VALUE outer, const char *name, VALUE super)
VALUE rb_define_module_under(VALUE outer, const char *name)
2.1.2 Method/singleton method definition
-To define methods or singleton methods, use functions below:
+To define methods or singleton methods, use these functions:
- void rb_define_method(VALUE klass, const char *name,
+ void rb_define_method(VALUE klass, const char *name,
VALUE (*func)(), int argc)
- void rb_define_singleton_method(VALUE object, const char *name,
+ void rb_define_singleton_method(VALUE object, const char *name,
VALUE (*func)(), int argc)
The `argc' represents the number of the arguments to the C function,
-which must be less than 17. But I believe you don't need that much. :-)
+which must be less than 17. But I doubt you'll need that many.
-If `argc' is negative, it specifies calling sequence, not number of
-the arguments.
+If `argc' is negative, it specifies the calling sequence, not number of
+the arguments.
-If argc is -1, the function will be called like:
+If argc is -1, the function will be called as:
VALUE func(int argc, VALUE *argv, VALUE obj)
where argc is the actual number of arguments, argv is the C array of
the arguments, and obj is the receiver.
-if argc is -2, the arguments are passed in Ruby array. The function
+If argc is -2, the arguments are passed in a Ruby array. The function
will be called like:
VALUE func(VALUE obj, VALUE args)
@@ -249,15 +345,23 @@ will be called like:
where obj is the receiver, and args is the Ruby array containing
actual arguments.
-There're two more functions to define method. One is to define
-private method:
+There are some more functions to define methods. One takes an ID
+as the name of method to be defined. See 2.2.2 for IDs.
+
+ void rb_define_method_id(VALUE klass, ID name,
+ VALUE (*func)(ANYARGS), int argc)
+
+There are two functions to define private/protected methods:
- void rb_define_private_method(VALUE klass, const char *name,
+ void rb_define_private_method(VALUE klass, const char *name,
VALUE (*func)(), int argc)
+ void rb_define_protected_method(VALUE klass, const char *name,
+ VALUE (*func)(), int argc)
-The other is to define module function, which is private AND singleton
-method of the module. For example, sqrt is the module function
-defined in Math module. It can be call in the form like:
+At last, rb_define_module_function defines a module functions,
+which are private AND singleton methods of the module.
+For example, sqrt is the module function defined in Math module.
+It can be called in the following way:
Math.sqrt(4)
@@ -266,20 +370,33 @@ or
include Math
sqrt(4)
-To define module function
+To define module functions, use:
- void rb_define_module_function(VALUE module, const char *name,
+ void rb_define_module_function(VALUE module, const char *name,
VALUE (*func)(), int argc)
-Oh, in addition, function-like method, which is private method defined
-in Kernel module, can be defined using:
+In addition, function-like methods, which are private methods defined
+in the Kernel module, can be defined using:
void rb_define_global_function(const char *name, VALUE (*func)(), int argc)
-To define alias to the method,
+To define an alias for the method,
void rb_define_alias(VALUE module, const char* new, const char* old);
+To define a reader/writer for an attribute,
+
+ void rb_define_attr(VALUE klass, const char *name, int read, int write)
+
+To define and undefine the `allocate' class method,
+
+ void rb_define_alloc_func(VALUE klass, VALUE (*func)(VALUE klass));
+ void rb_undef_alloc_func(VALUE klass);
+
+func has to take the klass as the argument and return a newly
+allocated instance. This instance should be as empty as possible,
+without any expensive (including external) resources.
+
2.1.3 Constant definition
We have 2 functions to define constants:
@@ -287,35 +404,70 @@ We have 2 functions to define constants:
void rb_define_const(VALUE klass, const char *name, VALUE val)
void rb_define_global_const(const char *name, VALUE val)
-The former is to define constant under specified class/module. The
-latter is to define global constant.
+The former is to define a constant under specified class/module. The
+latter is to define a global constant.
2.2 Use Ruby features from C
There are several ways to invoke Ruby's features from C code.
-2.2.1 Evaluate Ruby Program in String
+2.2.1 Evaluate Ruby Programs in a String
-Easiest way to call Ruby's function from C program is to evaluate the
-string as Ruby program. This function will do the job.
+The easiest way to use Ruby's functionality from a C program is to
+evaluate the string as Ruby program. This function will do the job:
VALUE rb_eval_string(const char *str)
-Evaluation is done under current context, thus current local variables
+Evaluation is done under the current context, thus current local variables
of the innermost method (which is defined by Ruby) can be accessed.
+Note that the evaluation can raise an exception. There is a safer
+function:
+
+ VALUE rb_eval_string_protect(const char *str, int *state)
+
+It returns nil when an error occur. Moreover, *state is zero if str was
+successfully evaluated, or nonzero otherwise.
+
+
2.2.2 ID or Symbol
You can invoke methods directly, without parsing the string. First I
-need to explain about symbols (which data type is ID). ID is the
-integer number to represent Ruby's identifiers such as variable names.
-It can be accessed from Ruby in the form like:
+need to explain about ID. ID is the integer number to represent
+Ruby's identifiers such as variable names. The Ruby data type
+corresponding to ID is Symbol. It can be accessed from Ruby in the
+form:
:Identifier
+or
+ :"any kind of string"
-You can get the symbol value from string within C code, by using
+You can get the ID value from a string within C code by using
rb_intern(const char *name)
+ rb_intern_str(VALUE name)
+
+You can retrieve ID from Ruby object (Symbol or String) given as an
+argument by using
+
+ rb_to_id(VALUE symbol)
+ rb_check_id(volatile VALUE *name)
+ rb_check_id_cstr(const char *name, long len, rb_encoding *enc)
+
+These functions try to convert the argument to a String if it was not
+a Symbol nor a String. The second function stores the converted
+result into *name, and returns 0 if the string is not a known symbol.
+After this function returned a non-zero value, *name is always a
+Symbol or a String, otherwise it is a String if the result is 0.
+The third function takes NUL-terminated C string, not Ruby VALUE.
+
+You can convert C ID to Ruby Symbol by using
+
+ VALUE ID2SYM(ID id)
+
+and to convert Ruby Symbol object to ID, use
+
+ ID SYM2ID(VALUE symbol)
2.2.3 Invoke Ruby method from C
@@ -323,14 +475,14 @@ To invoke methods directly, you can use the function below
VALUE rb_funcall(VALUE recv, ID mid, int argc, ...)
-This function invokes the method of the recv, which name is specified
-by the symbol mid.
+This function invokes a method on the recv, with the method name
+specified by the symbol mid.
2.2.4 Accessing the variables and constants
-You can access class variables, and instance variables using access
-functions. Also, global variables can be shared between both worlds.
-There's no way to access Ruby's local variables.
+You can access class variables and instance variables using access
+functions. Also, global variables can be shared between both
+environments. There's no way to access Ruby's local variables.
The functions to access/modify instance variables are below:
@@ -347,14 +499,15 @@ See 2.1.3 for defining new constant.
3. Information sharing between Ruby and C
-3.1 Ruby constant that C can be accessed from C
+3.1 Ruby constants that C can be accessed from C
-Following Ruby constants can be referred from C.
+As stated in section 1.3,
+the following Ruby constants can be referred from C.
Qtrue
Qfalse
-Boolean values. Qfalse is false in the C also (i.e. 0).
+Boolean values. Qfalse is false in C also (i.e. 0).
Qnil
@@ -362,16 +515,16 @@ Ruby nil in C scope.
3.2 Global variables shared between C and Ruby
-Information can be shared between two worlds, using shared global
+Information can be shared between the two environments using shared global
variables. To define them, you can use functions listed below:
void rb_define_variable(const char *name, VALUE *var)
-This function defines the variable which is shared by the both world.
-The value of the global variable pointed by `var', can be accessed
+This function defines the variable which is shared by both environments.
+The value of the global variable pointed to by `var' can be accessed
through Ruby's global variable named `name'.
-You can define read-only (from Ruby, of course) variable by the
+You can define read-only (from Ruby, of course) variables using the
function below.
void rb_define_readonly_variable(const char *name, VALUE *var)
@@ -379,36 +532,48 @@ function below.
You can defined hooked variables. The accessor functions (getter and
setter) are called on access to the hooked variables.
- void rb_define_hooked_variable(constchar *name, VALUE *var,
+ void rb_define_hooked_variable(const char *name, VALUE *var,
VALUE (*getter)(), void (*setter)())
If you need to supply either setter or getter, just supply 0 for the
hook you don't need. If both hooks are 0, rb_define_hooked_variable()
works just like rb_define_variable().
+The prototypes of the getter and setter functions are as follows:
+
+ VALUE (*getter)(ID id, VALUE *var);
+ void (*setter)(VALUE val, ID id, VALUE *var);
+
+
+Also you can define a Ruby global variable without a corresponding C
+variable. The value of the variable will be set/get only by hooks.
+
void rb_define_virtual_variable(const char *name,
VALUE (*getter)(), void (*setter)())
-This function defines the Ruby global variable without corresponding C
-variable. The value of the variable will be set/get only by hooks.
+The prototypes of the getter and setter functions are as follows:
-The prototypes of the getter and setter functions are as following:
+ VALUE (*getter)(ID id);
+ void (*setter)(VALUE val, ID id);
- (*getter)(ID id, void *data, struct global_entry* entry);
- (*setter)(VALUE val, ID id, void *data, struct global_entry* entry);
-3.3 Encapsulate C data into Ruby object
+3.3 Encapsulate C data into a Ruby object
-To wrapping and objectify the C pointer as Ruby object (so called
+To wrap and objectify a C pointer as a Ruby object (so called
DATA), use Data_Wrap_Struct().
- Data_Wrap_Struct(klass, mark, free, ptr)
+ Data_Wrap_Struct(klass, mark, free, sval)
Data_Wrap_Struct() returns a created DATA object. The klass argument
is the class for the DATA object. The mark argument is the function
to mark Ruby objects pointed by this data. The free argument is the
-function to free the pointer allocation. The functions, mark and
-free, will be called from garbage collector.
+function to free the pointer allocation. If this is -1, the pointer
+will be just freed. The functions mark and free will be called from
+garbage collector.
+
+These mark / free functions are invoked during GC execution. No
+object allocations are allowed during it, so do not allocate ruby
+objects inside them.
You can allocate and wrap the structure in one step.
@@ -419,23 +584,23 @@ the structure, which is also allocated. This macro works like:
(sval = ALLOC(type), Data_Wrap_Struct(klass, mark, free, sval))
-Arguments, klass, mark, free, works like their counterpart of
-Data_Wrap_Struct(). The pointer to allocated structure will be
-assigned to sval, which should be the pointer to the type specified.
+Arguments klass, mark, and free work like their counterparts in
+Data_Wrap_Struct(). A pointer to the allocated structure will be
+assigned to sval, which should be a pointer of the type specified.
To retrieve the C pointer from the Data object, use the macro
Data_Get_Struct().
Data_Get_Struct(obj, type, sval)
-The pointer to the structure will be assigned to the variable sval.
+A pointer to the structure will be assigned to the variable sval.
-See example below for detail.
+See the example below for details.
4. Example - Creating dbm extension
-OK, here's the example to make extension library. This is the
-extension to access dbm. The full source is included in ext/
+OK, here's the example of making an extension library. This is the
+extension to access DBMs. The full source is included in the ext/
directory in the Ruby's source tree.
(1) make the directory
@@ -444,25 +609,20 @@ directory in the Ruby's source tree.
Make a directory for the extension library under ext directory.
-(2) create MANIFEST file
-
- % cd ext/dbm
- % touch MANIFEST
-
-There should be MANIFEST file in the directory for the extension
-library. Make empty file now.
-
-(3) design the library
+(2) design the library
You need to design the library features, before making it.
-(4) write C code.
+(3) write C code.
You need to write C code for your extension library. If your library
has only one source file, choosing ``LIBRARY.c'' as a file name is
-preferred. On the other hand, in case your library has plural source
+preferred. On the other hand, in case your library has multiple source
files, avoid choosing ``LIBRARY.c'' for a file name. It may conflict
-with intermediate file ``LIBRARY.o'' on some platforms.
+with an intermediate file ``LIBRARY.o'' on some platforms.
+Note that some functions in mkmf library described below generate
+a file ``conftest.c'' for checking with compilation. You shouldn't
+choose ``conftest.c'' as a name of a source file.
Ruby will execute the initializing function named ``Init_LIBRARY'' in
the library. For example, ``Init_dbm()'' will be executed when loading
@@ -471,7 +631,8 @@ the library.
Here's the example of an initializing function.
--
-Init_dbm()
+void
+Init_dbm(void)
{
/* define DBM class */
cDBM = rb_define_class("DBM", rb_cObject);
@@ -487,10 +648,13 @@ Init_dbm()
rb_define_method(cDBM, "[]", fdbm_fetch, 1);
:
+ /* ID for a instance variable to store DBM data */
+ id_dbm = rb_intern("dbm");
}
--
-The dbm extension wrap dbm struct in C world using Data_Make_Struct.
+The dbm extension wraps the dbm struct in the C environment using
+Data_Make_Struct.
--
struct dbmdata {
@@ -502,10 +666,11 @@ struct dbmdata {
obj = Data_Make_Struct(klass, struct dbmdata, 0, free_dbm, dbmp);
--
-This code wraps dbmdata structure into Ruby object. We avoid wrapping
-DBM* directly, because we want to cache size information.
+This code wraps the dbmdata structure into a Ruby object. We avoid
+wrapping DBM* directly, because we want to cache size information.
-To retrieve dbmdata structure from Ruby object, we define the macro below:
+To retrieve the dbmdata structure from a Ruby object, we define the
+following macro:
--
#define GetDBM(obj, dbmp) {\
@@ -514,16 +679,15 @@ To retrieve dbmdata structure from Ruby object, we define the macro below:
}
--
-This sort of complicated macro do the retrieving and close check for
+This sort of complicated macro does the retrieving and close checking for
the DBM.
-There are three kind of way to receiving method arguments. First, the
-methods with fixed number of arguments receives arguments like this:
+There are three kinds of way to receive method arguments. First,
+methods with a fixed number of arguments receive arguments like this:
--
static VALUE
-fdbm_delete(obj, keystr)
- VALUE obj, keystr;
+fdbm_delete(VALUE obj, VALUE keystr)
{
:
}
@@ -532,15 +696,12 @@ fdbm_delete(obj, keystr)
The first argument of the C function is the self, the rest are the
arguments to the method.
-Second, the methods with arbitrary number of arguments receives
+Second, methods with an arbitrary number of arguments receive
arguments like this:
--
static VALUE
-fdbm_s_open(argc, argv, klass)
- int argc;
- VALUE *argv;
- VALUE klass;
+fdbm_s_open(int argc, VALUE *argv, VALUE klass)
{
:
if (rb_scan_args(argc, argv, "11", &file, &vmode) == 1) {
@@ -550,21 +711,22 @@ fdbm_s_open(argc, argv, klass)
}
--
-The first argument is the number of method arguments. the second
-argument is the C array of the method arguments. And the third
+The first argument is the number of method arguments, the second
+argument is the C array of the method arguments, and the third
argument is the receiver of the method.
You can use the function rb_scan_args() to check and retrieve the
-arguments. For example "11" means, the method requires at least one
-argument, and at most receives two arguments.
+arguments. The third argument is a string that specifies how to
+capture method arguments and assign them to the following VALUE
+references.
-The methods with arbitrary number of arguments can receives arguments
-by Ruby's array, like this:
+
+The following is an example of a method that takes arguments by Ruby's
+array:
--
static VALUE
-fdbm_indexes(obj, args)
- VALUE obj, args;
+thread_initialize(VALUE thread, VALUE args)
{
:
}
@@ -575,139 +737,223 @@ which contains the arguments to the method.
** Notice
-GC should know about global variables which refers Ruby's objects, but
-not exported to the Ruby world. You need to protect them by
+GC should know about global variables which refer to Ruby's objects, but
+are not exported to the Ruby world. You need to protect them by
void rb_global_variable(VALUE *var)
-(5) prepare extconf.rb
+(4) prepare extconf.rb
-If there exists the file named extconf.rb, it will be executed to
-generate Makefile. If not, compilation scheme try to generate
-Makefile anyway.
+If the file named extconf.rb exists, it will be executed to generate
+Makefile.
-The extconf.rb is the file to check compilation condition etc. You
+extconf.rb is the file for checking compilation conditions etc. You
need to put
require 'mkmf'
-at the top of the file. You can use the functions below to check the
-condition.
-
- have_library(lib, func): check whether library containing function exists.
- have_func(func, header): check whether function exists
- have_header(header): check whether header file exists
- create_makefile(target): generate Makefile
-
-The value of variables below will affect Makefile.
-
- $CFLAGS: included in CFLAGS make variable (such as -I)
+at the top of the file. You can use the functions below to check
+various conditions.
+
+ have_macro(macro[, headers[, opt]]): check whether macro is defined
+ have_library(lib[, func[, headers[, opt]]]): check whether library containing function exists
+ find_library(lib[, func, *paths]): find library from paths
+ have_func(func[, headers[, opt]): check whether function exists
+ have_var(var[, headers[, opt]]): check whether variable exists
+ have_header(header[, preheaders[, opt]]): check whether header file exists
+ find_header(header, *paths): find header from paths
+ have_framework(fw): check whether framework exists (for MacOS X)
+ have_struct_member(type, member[, headers[, opt]]): check whether struct has member
+ have_type(type[, headers[, opt]]): check whether type exists
+ find_type(type, opt, *headers): check whether type exists in headers
+ have_const(const[, headers[, opt]]): check whether constant is defined
+ check_sizeof(type[, headers[, opts]]): check size of type
+ check_signedness(type[, headers[, opts]]): check signedness of type
+ convertible_int(type[, headers[, opts]]): find convertible integer type
+ find_executable(bin[, path]): find excutable file path
+ create_header(header): generate configured header
+ create_makefile(target[, target_prefix]): generate Makefile
+
+See MakeMakefile for full documentation of these functions.
+
+The value of the variables below will affect the Makefile.
+
+ $CFLAGS: included in CFLAGS make variable (such as -O)
+ $CPPFLAGS: included in CPPFLAGS make variable (such as -I, -D)
$LDFLAGS: included in LDFLAGS make variable (such as -L)
+ $objs: list of object file names
+
+Normally, the object files list is automatically generated by searching
+source files, but you must define them explicitly if any sources will
+be generated while building.
-If compilation condition is not fulfilled, you do not call
-``create_makefile''. Makefile will not generated, compilation will
+If a compilation condition is not fulfilled, you should not call
+``create_makefile''. The Makefile will not be generated, compilation will
not be done.
-(6) prepare depend (optional)
+(5) prepare depend (optional)
If the file named depend exists, Makefile will include that file to
-check dependency. You can make this file by invoking
+check dependencies. You can make this file by invoking
% gcc -MM *.c > depend
-It's no harm. Prepare it.
+It's harmless. Prepare it.
-(7) put file names into MANIFEST (optional)
+(6) generate Makefile
- % find * -type f -print > MANIFEST
- % vi MANIFEST
+Try generating the Makefile by:
-Append file names into MANIFEST. The compilation scheme requires
-MANIFEST only to be exist. But, you'd better take this step to
-distinguish required files.
-
-(8) generate Makefile
+ ruby extconf.rb
-Try generate Makefile by:
+If the library should be installed under vendor_ruby directory
+instead of site_ruby directory, use --vendor option as follows.
- ruby extconf.rb
+ ruby extconf.rb --vendor
-You don't need this step, if you put extension library under ext
+You don't need this step if you put the extension library under the ext
directory of the ruby source tree. In that case, compilation of the
interpreter will do this step for you.
-(9) make
+(7) make
Type
make
-to compile your extension. You don't need this step neither, if you
-put extension library under ext directory of the ruby source tree.
+to compile your extension. You don't need this step either if you have
+put the extension library under the ext directory of the ruby source tree.
-(9) debug
+(8) debug
-You may need to rb_debug the extension. The extensions can be linked
-statically by adding directory name in the ext/Setup file, so that you
-can inspect the extension with the debugger.
+You may need to rb_debug the extension. Extensions can be linked
+statically by adding the directory name in the ext/Setup file so that
+you can inspect the extension with the debugger.
-(10) done, now you have the extension library
+(9) done, now you have the extension library
You can do anything you want with your library. The author of Ruby
-will not claim any restriction about your code depending Ruby API.
+will not claim any restrictions on your code depending on the Ruby API.
Feel free to use, modify, distribute or sell your program.
Appendix A. Ruby source files overview
ruby language core
- class.c
- error.c
- eval.c
- gc.c
- object.c
+ class.c : classes and modules
+ error.c : exception classes and exception mechanism
+ gc.c : memory management
+ load.c : library loading
+ object.c : objects
+ variable.c : variables and constants
+
+ruby syntax parser
parse.y
- variable.c
+ -> parse.c : automatically generated
+ keywords : reserved keywords
+ -> lex.c : automatically generated
+
+ruby evaluator (a.k.a. YARV)
+ compile.c
+ eval.c
+ eval_error.c
+ eval_jump.c
+ eval_safe.c
+ insns.def : definition of VM instructions
+ iseq.c : implementation of VM::ISeq
+ thread.c : thread management and context swiching
+ thread_win32.c : thread implementation
+ thread_pthread.c : ditto
+ vm.c
+ vm_dump.c
+ vm_eval.c
+ vm_exec.c
+ vm_insnhelper.c
+ vm_method.c
+
+ opt_insns_unif.def : instruction unification
+ opt_operand.def : definitions for optimization
+
+ -> insn*.inc : automatically generated
+ -> opt*.inc : automatically generated
+ -> vm.inc : automatically generated
+
+regular expression engine (oniguruma)
+ regex.c
+ regcomp.c
+ regenc.c
+ regerror.c
+ regexec.c
+ regparse.c
+ regsyntax.c
utility functions
- dln.c
- regex.c
- st.c
- util.c
+ debug.c : debug symbols for C debuggger
+ dln.c : dynamic loading
+ st.c : general purpose hash table
+ strftime.c : formatting times
+ util.c : misc utilities
ruby interpreter implementation
dmyext.c
+ dmydln.c
+ dmyencoding.c
+ id.c
inits.c
main.c
ruby.c
version.c
+ gem_prelude.rb
+ prelude.rb
+
+
class library
- array.c
- bignum.c
- compar.c
- dir.c
- enum.c
- file.c
- hash.c
- io.c
- marshal.c
- math.c
- numeric.c
- pack.c
- prec.c
- process.c
- random.c
- range.c
- re.c
- signal.c
- sprintf.c
- string.c
- struct.c
- time.c
+ array.c : Array
+ bignum.c : Bignum
+ compar.c : Comparable
+ complex.c : Complex
+ cont.c : Fiber, Continuation
+ dir.c : Dir
+ enum.c : Enumerable
+ enumerator.c : Enumerator
+ file.c : File
+ hash.c : Hash
+ io.c : IO
+ marshal.c : Marshal
+ math.c : Math
+ numeric.c : Numeric, Integer, Fixnum, Float
+ pack.c : Array#pack, String#unpack
+ proc.c : Binding, Proc
+ process.c : Process
+ random.c : random number
+ range.c : Range
+ rational.c : Rational
+ re.c : Regexp, MatchData
+ signal.c : Signal
+ sprintf.c :
+ string.c : String
+ struct.c : Struct
+ time.c : Time
+
+ defs/known_errors.def : Errno::* exception classes
+ -> known_errors.inc : automatically generated
+
+multilingualization
+ encoding.c : Encoding
+ transcode.c : Encoding::Converter
+ enc/*.c : encoding classes
+ enc/trans/* : codepoint mapping tables
+
+goruby interpreter implementation
+
+ goruby.c
+ golf_prelude.rb : goruby specific libraries.
+ -> golf_prelude.c : automatically generated
+
Appendix B. Ruby extension API reference
@@ -715,7 +961,7 @@ Appendix B. Ruby extension API reference
VALUE
-The type for Ruby object. Actual structures are defined in ruby.h,
+The type for the Ruby object. Actual structures are defined in ruby.h,
such as struct RString, etc. To refer the values in structures, use
casting macros like RSTRING(obj).
@@ -737,10 +983,11 @@ const: false object
Data_Wrap_Struct(VALUE klass, void (*mark)(), void (*free)(), void *sval)
-Wrap C pointer into Ruby object. If object has references to other
-Ruby object, they should be marked by using mark function during GC
-process. Otherwise, mark should be 0. When this object is no longer
-referred by anywhere, the pointer will be discarded by free function.
+Wrap a C pointer into a Ruby object. If object has references to other
+Ruby objects, they should be marked by using the mark function during
+the GC process. Otherwise, mark should be 0. When this object is no
+longer referred by anywhere, the pointer will be discarded by free
+function.
Data_Make_Struct(klass, type, mark, free, sval)
@@ -750,56 +997,84 @@ sval, and returns the DATA encapsulating the pointer to memory region.
Data_Get_Struct(data, type, sval)
This macro retrieves the pointer value from DATA, and assigns it to
-the variable sval.
+the variable sval.
+
+** Checking data types
+
+TYPE(value)
+FIXNUM_P(value)
+NIL_P(value)
+void Check_Type(VALUE value, int type)
+void Check_SafeStr(VALUE value)
+
+** Data type conversion
+
+FIX2INT(value), INT2FIX(i)
+FIX2LONG(value), LONG2FIX(l)
+NUM2INT(value), INT2NUM(i)
+NUM2UINT(value), UINT2NUM(ui)
+NUM2LONG(value), LONG2NUM(l)
+NUM2ULONG(value), ULONG2NUM(ul)
+NUM2LL(value), LL2NUM(ll)
+NUM2ULL(value), ULL2NUM(ull)
+NUM2OFFT(value), OFFT2NUM(off)
+NUM2SIZET(value), SIZET2NUM(size)
+NUM2SSIZET(value), SSIZET2NUM(ssize)
+NUM2DBL(value)
+rb_float_new(f)
+StringValue(value)
+StringValuePtr(value)
+StringValueCStr(value)
+rb_str_new2(s)
** defining class/module
VALUE rb_define_class(const char *name, VALUE super)
-Defines new Ruby class as subclass of super.
+Defines a new Ruby class as a subclass of super.
VALUE rb_define_class_under(VALUE module, const char *name, VALUE super)
-Creates new Ruby class as subclass of super, under the module's
+Creates a new Ruby class as a subclass of super, under the module's
namespace.
VALUE rb_define_module(const char *name)
-Defines new Ruby module.
+Defines a new Ruby module.
- VALUE rb_define_module_under(VALUE module, const char *name, VALUE super)
+ VALUE rb_define_module_under(VALUE module, const char *name)
-Defines new Ruby module, under the module's namespace.
+Defines a new Ruby module under the module's namespace.
void rb_include_module(VALUE klass, VALUE module)
Includes module into class. If class already includes it, just
-ignore.
+ignored.
void rb_extend_object(VALUE object, VALUE module)
-Extend the object with module's attribute.
+Extend the object with the module's attributes.
** Defining Global Variables
void rb_define_variable(const char *name, VALUE *var)
Defines a global variable which is shared between C and Ruby. If name
-contains the character which is not allowed to be part of the symbol,
+contains a character which is not allowed to be part of the symbol,
it can't be seen from Ruby programs.
void rb_define_readonly_variable(const char *name, VALUE *var)
Defines a read-only global variable. Works just like
-rb_define_variable(), except defined variable is read-only.
+rb_define_variable(), except the defined variable is read-only.
void rb_define_virtual_variable(const char *name,
VALUE (*getter)(), VALUE (*setter)())
-Defines a virtual variable, whose behavior is defined by pair of C
+Defines a virtual variable, whose behavior is defined by a pair of C
functions. The getter function is called when the variable is
-referred. The setter function is called when the value is set to the
-variable. The prototype for getter/setter functions are:
+referenced. The setter function is called when the variable is set to a
+value. The prototype for getter/setter functions are:
VALUE getter(ID id)
void setter(VALUE val, ID id)
@@ -809,16 +1084,16 @@ The getter function must return the value for the access.
void rb_define_hooked_variable(const char *name, VALUE *var,
VALUE (*getter)(), VALUE (*setter)())
-Defines hooked variable. It's virtual variable with C variable. The
-getter is called as
+Defines hooked variable. It's a virtual variable with a C variable.
+The getter is called as
VALUE getter(ID id, VALUE *var)
-returning new value. The setter is called as
+returning a new value. The setter is called as
void setter(VALUE val, ID id, VALUE *var)
-GC requires to mark the C global variables which hold Ruby values.
+GC requires C global variables which hold Ruby values to be marked.
void rb_global_variable(VALUE *var)
@@ -832,7 +1107,7 @@ Defines a new constant under the class/module.
void rb_define_global_const(const char *name, VALUE val)
-Defines global constant. This is just work as
+Defines a global constant. This is just the same as
rb_define_const(cKernal, name, val)
@@ -842,8 +1117,8 @@ Defines global constant. This is just work as
Defines a method for the class. func is the function pointer. argc
is the number of arguments. if argc is -1, the function will receive
-3 arguments argc, argv, and self. if argc is -2, the function will
-receive 2 arguments, self and args, where args is the Ruby array of
+3 arguments: argc, argv, and self. if argc is -2, the function will
+receive 2 arguments, self and args, where args is a Ruby array of
the method arguments.
rb_define_private_method(VALUE klass, const char *name, VALUE (*func)(), int argc)
@@ -857,29 +1132,73 @@ Defines a singleton method. Arguments are same as rb_define_method().
rb_scan_args(int argc, VALUE *argv, const char *fmt, ...)
-Retrieve argument from argc, argv. The fmt is the format string for
-the arguments, such as "12" for 1 non-optional argument, 2 optional
-arguments. If `*' appears at the end of fmt, it means the rest of
-the arguments are assigned to corresponding variable, packed in
-array.
+Retrieve argument from argc and argv to given VALUE references
+according to the format string. The format can be described in ABNF
+as follows:
+
+--
+scan-arg-spec := param-arg-spec [option-hash-arg-spec] [block-arg-spec]
+
+param-arg-spec := pre-arg-spec [post-arg-spec] / post-arg-spec / pre-opt-post-arg-spec
+pre-arg-spec := num-of-leading-mandatory-args [num-of-optional-args]
+post-arg-spec := sym-for-variable-length-args [num-of-trailing-mandatory-args]
+pre-opt-post-arg-spec := num-of-leading-mandatory-args num-of-optional-args num-of-trailing-mandatory-args
+option-hash-arg-spec := sym-for-option-hash-arg
+block-arg-spec := sym-for-block-arg
+
+num-of-leading-mandatory-args := DIGIT ; The number of leading
+ ; mandatory arguments
+num-of-optional-args := DIGIT ; The number of optional
+ ; arguments
+sym-for-variable-length-args := "*" ; Indicates that variable
+ ; length arguments are
+ ; captured as a ruby array
+num-of-trailing-mandatory-args := DIGIT ; The number of trailing
+ ; mandatory arguments
+sym-for-option-hash-arg := ":" ; Indicates that an option
+ ; hash is captured if the last
+ ; argument is a hash or can be
+ ; converted to a hash with
+ ; #to_hash. When the last
+ ; argument is nil, it is
+ ; captured if it is not
+ ; ambiguous to take it as
+ ; empty option hash; i.e. '*'
+ ; is not specified and
+ ; arguments are given more
+ ; than sufficient.
+sym-for-block-arg := "&" ; Indicates that an iterator
+ ; block should be captured if
+ ; given
+--
+
+For example, "12" means that the method requires at least one
+argument, and at most receives three (1+2) arguments. So, the format
+string must be followed by three variable references, which are to be
+assigned to captured arguments. For omitted arguments, variables are
+set to Qnil. NULL can be put in place of a variable reference, which
+means the corresponding captured argument(s) should be just dropped.
+
+The number of given arguments, excluding an option hash or iterator
+block, is returned.
** Invoking Ruby method
VALUE rb_funcall(VALUE recv, ID mid, int narg, ...)
-Invokes the method. To retrieve mid from method name, use rb_intern().
+Invokes a method. To retrieve mid from a method name, use rb_intern().
VALUE rb_funcall2(VALUE recv, ID mid, int argc, VALUE *argv)
-Invokes method, passing arguments by array of values.
+Invokes a method, passing arguments by an array of values.
VALUE rb_eval_string(const char *str)
-Compiles and executes the string as Ruby program.
+Compiles and executes the string as a Ruby program.
ID rb_intern(const char *name)
-Returns ID corresponding the name.
+Returns ID corresponding to the name.
char *rb_id2name(ID id)
@@ -906,49 +1225,93 @@ Sets the value of the instance variable.
** Control Structure
- VALUE rb_iterate(VALUE (*func1)(), void *arg1, VALUE (*func2)(), void *arg2)
+ VALUE rb_block_call(VALUE recv, ID mid, int argc, VALUE * argv,
+ VALUE (*func) (ANYARGS), VALUE data2)
+
+Calls a method on the recv, with the method name specified by the
+symbol mid, with argc arguments in argv, supplying func as the
+block. When func is called as the block, it will receive the value
+from yield as the first argument, and data2 as the second argument.
+When yielded with multiple values (in C, rb_yield_values(),
+rb_yield_values2() and rb_yield_splat()), data2 is packed as an Array,
+whereas yielded values can be gotten via argc/argv of the third/fourth
+arguments.
+
+ [OBSOLETE] VALUE rb_iterate(VALUE (*func1)(), void *arg1, VALUE (*func2)(), void *arg2)
Calls the function func1, supplying func2 as the block. func1 will be
called with the argument arg1. func2 receives the value from yield as
the first argument, arg2 as the second argument.
-
+
+When rb_iterate is used in 1.9, func1 has to call some Ruby-level method.
+This function is obsolete since 1.9; use rb_block_call instead.
+
VALUE rb_yield(VALUE val)
Evaluates the block with value val.
- VALUE rb_rescue(VALUE (*func1)(), void *arg1, VALUE (*func2)(), void *arg2)
+ VALUE rb_rescue(VALUE (*func1)(), VALUE arg1, VALUE (*func2)(), VALUE arg2)
-Calls the function func1, with arg1 as the argument. If exception
+Calls the function func1, with arg1 as the argument. If an exception
occurs during func1, it calls func2 with arg2 as the argument. The
return value of rb_rescue() is the return value from func1 if no
exception occurs, from func2 otherwise.
- VALUE rb_ensure(VALUE (*func1)(), void *arg1, void (*func2)(), void *arg2)
+ VALUE rb_ensure(VALUE (*func1)(), VALUE arg1, VALUE (*func2)(), VALUE arg2)
Calls the function func1 with arg1 as the argument, then calls func2
-with arg2, whenever execution terminated. The return value from
-rb_ensure() is that of func1.
+with arg2 if execution terminated. The return value from
+rb_ensure() is that of func1 when no exception occured.
+
+ VALUE rb_protect(VALUE (*func) (VALUE), VALUE arg, int *state)
+
+Calls the function func with arg as the argument. If no exception
+occured during func, it returns the result of func and *state is zero.
+Otherwise, it returns Qnil and sets *state to nonzero. If state is
+NULL, it is not set in both cases.
+You have to clear the error info with rb_set_errinfo(Qnil) when
+ignoring the caught exception.
+
+ void rb_jump_tag(int state)
+
+Continues the exception caught by rb_protect() and rb_eval_string_protect().
+state must be the returned value from those functions. This function
+never return to the caller.
+
+ void rb_iter_break()
+
+Exits from the current innermost block. This function never return to
+the caller.
+
+ void rb_iter_break_value(VALUE value)
+
+Exits from the current innermost block with the value. The block will
+return the given argument value. This function never return to the
+caller.
** Exceptions and Errors
void rb_warn(const char *fmt, ...)
-Prints warning message according to the printf-like format.
+Prints a warning message according to a printf-like format.
void rb_warning(const char *fmt, ...)
-Prints warning message according to the printf-like format, if
+Prints a warning message according to a printf-like format, if
$VERBOSE is true.
+void rb_raise(rb_eRuntimeError, const char *fmt, ...)
+
+Raises RuntimeError. The fmt is a format string just like printf().
+
void rb_raise(VALUE exception, const char *fmt, ...)
-Raises an exception of class exception. The fmt is the format string
-just like printf().
+Raises a class exception. The fmt is a format string just like printf().
void rb_fatal(const char *fmt, ...)
-Raises fatal error, terminates the interpreter. No exception handling
-will be done for fatal error, but ensure blocks will be executed.
+Raises a fatal error, terminates the interpreter. No exception handling
+will be done for fatal errors, but ensure blocks will be executed.
void rb_bug(const char *fmt, ...)
@@ -956,9 +1319,9 @@ Terminates the interpreter immediately. This function should be
called under the situation caused by the bug in the interpreter. No
exception handling nor ensure execution will be done.
-** Initialize and Starts the Interpreter
+** Initialize and Start the Interpreter
-The embedding API are below (not needed for extension libraries):
+The embedding API functions are below (not needed for extension libraries):
void ruby_init()
@@ -976,29 +1339,75 @@ Starts execution of the interpreter.
Specifies the name of the script ($0).
-Appendix B. Functions Available in extconf.rb
+** Hooks for the Interpreter Events
+
+ void rb_add_event_hook(rb_event_hook_func_t func, rb_event_flag_t events, VALUE data)
+
+Adds a hook function for the specified interpreter events.
+events should be Or'ed value of:
+
+ RUBY_EVENT_LINE
+ RUBY_EVENT_CLASS
+ RUBY_EVENT_END
+ RUBY_EVENT_CALL
+ RUBY_EVENT_RETURN
+ RUBY_EVENT_C_CALL
+ RUBY_EVENT_C_RETURN
+ RUBY_EVENT_RAISE
+ RUBY_EVENT_ALL
+
+The definition of rb_event_hook_func_t is below:
+
+ typedef void (*rb_event_hook_func_t)(rb_event_t event, VALUE data,
+ VALUE self, ID id, VALUE klass)
+
+The third argument `data' to rb_add_event_hook() is passed to the hook
+function as the second argument, which was the pointer to the current
+NODE in 1.8. See RB_EVENT_HOOKS_HAVE_CALLBACK_DATA below.
+
+ int rb_remove_event_hook(rb_event_hook_func_t func)
+
+Removes the specified hook function.
+
+** Macros for the Compatibilities
+
+Some macros to check API compatibilities are available by default.
+
+ NORETURN_STYLE_NEW
+
+Means that NORETURN macro is functional style instead of prefix.
+
+ HAVE_RB_DEFINE_ALLOC_FUNC
+
+Means that function rb_define_alloc_func() is provided, that means the
+allocation framework is used. This is same as the result of
+have_func("rb_define_alloc_func", "ruby.h").
+
+ HAVE_RB_REG_NEW_STR
-These functions are available in extconf.rb:
+Means that function rb_reg_new_str() is provided, that creates Regexp
+object from String object. This is same as the result of
+have_func("rb_reg_new_str", "ruby.h").
- have_library(lib, func)
+ HAVE_RB_IO_T
-Checks whether library which contains specified function exists.
-Returns true if the library exists.
+Means that type rb_io_t is provided.
- have_func(func, header)
+ USE_SYMBOL_AS_METHOD_NAME
-Checks whether func exists with header. Returns true if the function
-exists. To check functions in the additional library, you need to
-check that library first using have_library().
+Means that Symbols will be returned as method names, e.g.,
+Module#methods, #singleton_methods and so on.
- have_header(header)
+ HAVE_RUBY_*_H
-Checks for the header files. Returns true if the header file exists.
+Defined in ruby.h and means correspoinding header is available. For
+instance, when HAVE_RUBY_ST_H is defined you should use ruby/st.h not
+mere st.h.
- create_makefile(target)
+ RB_EVENT_HOOKS_HAVE_CALLBACK_DATA
-Generates the Makefile for the extension library. If you don't invoke
-this method, the compilation will not be done.
+Means that rb_add_event_hook() takes the third argument `data', to be
+passed to the given event hook function.
/*
* Local variables:
diff --git a/README.EXT.ja b/README.EXT.ja
new file mode 100644
index 0000000000..4ae8b50221
--- /dev/null
+++ b/README.EXT.ja
@@ -0,0 +1,1596 @@
+.\" README.EXT.ja - -*- Text -*- created at: Mon Aug 7 16:45:54 JST 1995
+
+Rubyã®æ‹¡å¼µãƒ©ã‚¤ãƒ–ラリã®ä½œã‚Šæ–¹ã‚’説明ã—ã¾ã™ï¼Ž
+
+1.基礎知識
+
+Cã®å¤‰æ•°ã«ã¯åž‹ãŒã‚り,データã«ã¯åž‹ãŒã‚りã¾ã›ã‚“.ã§ã™ã‹ã‚‰ï¼ŒãŸ
+ã¨ãˆã°ãƒã‚¤ãƒ³ã‚¿ã‚’intã®å¤‰æ•°ã«ä»£å…¥ã™ã‚‹ã¨ï¼Œãã®å€¤ã¯æ•´æ•°ã¨ã—ã¦å–
+り扱ã‚れã¾ã™ï¼Žé€†ã«Rubyã®å¤‰æ•°ã«ã¯åž‹ãŒãªã,データã«åž‹ãŒã‚りã¾
+ã™ï¼Žã“ã®é•ã„ã®ãŸã‚,Cã¨Rubyã¯ç›¸äº’ã«å¤‰æ›ã—ãªã‘れã°ï¼ŒãŠäº’ã„ã®
+データをアクセスã§ãã¾ã›ã‚“.
+
+Rubyã®ãƒ‡ãƒ¼ã‚¿ã¯VALUEã¨ã„ã†Cã®åž‹ã§è¡¨ç¾ã•れã¾ã™ï¼ŽVALUEåž‹ã®ãƒ‡ãƒ¼
+ã‚¿ã¯ãã®ãƒ‡ãƒ¼ã‚¿ã‚¿ã‚¤ãƒ—を自分ã§çŸ¥ã£ã¦ã„ã¾ã™ï¼Žã“ã®ãƒ‡ãƒ¼ã‚¿ã‚¿ã‚¤ãƒ—ã¨
+ã„ã†ã®ã¯ãƒ‡ãƒ¼ã‚¿(オブジェクト)ã®å®Ÿéš›ã®æ§‹é€ ã‚’æ„味ã—ã¦ã„ã¦ï¼ŒRuby
+ã®ã‚¯ãƒ©ã‚¹ã¨ã¯ã¾ãŸé•ã£ãŸã‚‚ã®ã§ã™ï¼Ž
+
+VALUEã‹ã‚‰Cã«ã¨ã£ã¦æ„味ã®ã‚るデータをå–り出ã™ãŸã‚ã«ã¯
+
+ (1) VALUEã®ãƒ‡ãƒ¼ã‚¿ã‚¿ã‚¤ãƒ—を知る
+ (2) VALUEã‚’Cã®ãƒ‡ãƒ¼ã‚¿ã«å¤‰æ›ã™ã‚‹
+
+ã®ä¸¡æ–¹ãŒå¿…è¦ã§ã™ï¼Ž(1)を忘れるã¨é–“é•ã£ãŸãƒ‡ãƒ¼ã‚¿ã®å¤‰æ›ãŒè¡Œã‚れ
+ã¦ï¼Œæœ€æ‚ªãƒ—ログラムãŒcore dumpã—ã¾ã™ï¼Ž
+
+1.1 データタイプ
+
+Rubyã«ã¯ãƒ¦ãƒ¼ã‚¶ãŒä½¿ã†å¯èƒ½æ€§ã®ã‚る以下ã®ã‚¿ã‚¤ãƒ—ãŒã‚りã¾ã™ï¼Ž
+
+ T_NIL nil
+ T_OBJECT 通常ã®ã‚ªãƒ–ジェクト
+ T_CLASS クラス
+ T_MODULE モジュール
+ T_FLOAT æµ®å‹•å°æ•°ç‚¹æ•°
+ T_STRING 文字列
+ T_REGEXP æ­£è¦è¡¨ç¾
+ T_ARRAY é…列
+ T_HASH 連想é…列
+ T_STRUCT (Rubyã®)構造体
+ T_BIGNUM 多å€é•·æ•´æ•°
+ T_FIXNUM Fixnum(31bitã¾ãŸã¯63bité•·æ•´æ•°)
+ T_COMPLEX 複素数
+ T_RATIONAL æœ‰ç†æ•°
+ T_FILE 入出力
+ T_TRUE 真
+ T_FALSE å½
+ T_DATA データ
+ T_SYMBOL シンボル
+
+ãã®ä»–ã«å†…部ã§åˆ©ç”¨ã•れã¦ã„る以下ã®ã‚¿ã‚¤ãƒ—ãŒã‚りã¾ã™ï¼Ž
+
+ T_ICLASS
+ T_MATCH
+ T_UNDEF
+ T_NODE
+ T_ZOMBIE
+
+ã»ã¨ã‚“ã©ã®ã‚¿ã‚¤ãƒ—ã¯Cã®æ§‹é€ ä½“ã§å®Ÿè£…ã•れã¦ã„ã¾ã™ï¼Ž
+
+1.2 VALUEã®ãƒ‡ãƒ¼ã‚¿ã‚¿ã‚¤ãƒ—ã‚’ãƒã‚§ãƒƒã‚¯ã™ã‚‹
+
+ruby.hã§ã¯TYPE()ã¨ã„ã†ãƒžã‚¯ãƒ­ãŒå®šç¾©ã•れã¦ã„ã¦ï¼ŒVALUEã®ãƒ‡ãƒ¼ã‚¿
+タイプを知るã“ã¨ãŒå‡ºæ¥ã¾ã™ï¼ŽTYPE()マクロã¯ä¸Šã§ç´¹ä»‹ã—ãŸT_XXXX
+ã®å½¢å¼ã®å®šæ•°ã‚’è¿”ã—ã¾ã™ï¼ŽVALUEã®ãƒ‡ãƒ¼ã‚¿ã‚¿ã‚¤ãƒ—ã«å¿œã˜ã¦å‡¦ç†ã™ã‚‹
+å ´åˆã«ã¯ï¼ŒTYPE()ã®å€¤ã§åˆ†å²ã™ã‚‹ã“ã¨ã«ãªã‚Šã¾ã™ï¼Ž
+
+ switch (TYPE(obj)) {
+ case T_FIXNUM:
+ /* FIXNUMã®å‡¦ç† */
+ break;
+ case T_STRING:
+ /* 文字列ã®å‡¦ç† */
+ break;
+ case T_ARRAY:
+ /* é…列ã®å‡¦ç† */
+ break;
+ default:
+ /* 例外を発生ã•ã›ã‚‹ */
+ rb_raise(rb_eTypeError, "not valid value");
+ break;
+ }
+
+ãれã¨ãƒ‡ãƒ¼ã‚¿ã‚¿ã‚¤ãƒ—ã‚’ãƒã‚§ãƒƒã‚¯ã—ã¦ï¼Œæ­£ã—ããªã‘れã°ä¾‹å¤–を発生ã™
+る関数ãŒç”¨æ„ã•れã¦ã„ã¾ã™ï¼Ž
+
+ void Check_Type(VALUE value, int type)
+
+ã“ã®é–¢æ•°ã¯valueãŒtypeã§ç„¡ã‘れã°ï¼Œä¾‹å¤–を発生ã•ã›ã¾ã™ï¼Žå¼•æ•°ã¨
+ã—ã¦ä¸Žãˆã‚‰ã‚ŒãŸVALUEã®ãƒ‡ãƒ¼ã‚¿ã‚¿ã‚¤ãƒ—ãŒæ­£ã—ã„ã‹ã©ã†ã‹ãƒã‚§ãƒƒã‚¯ã™
+ã‚‹ãŸã‚ã«ã¯ï¼Œã“ã®é–¢æ•°ã‚’使ã„ã¾ã™ï¼Ž
+
+FIXNUMã¨NILã«é–¢ã—ã¦ã¯ã‚ˆã‚Šé«˜é€Ÿãªåˆ¤åˆ¥ãƒžã‚¯ãƒ­ãŒç”¨æ„ã•れã¦ã„ã¾ã™ï¼Ž
+
+ FIXNUM_P(obj)
+ NIL_P(obj)
+
+1.3 VALUEã‚’Cã®ãƒ‡ãƒ¼ã‚¿ã«å¤‰æ›ã™ã‚‹
+
+データタイプãŒT_NIL,T_FALSE,T_TRUEã§ã‚る時,データã¯ãれãž
+れnil,false,trueã§ã™ï¼Žã“ã®ãƒ‡ãƒ¼ã‚¿ã‚¿ã‚¤ãƒ—ã®ã‚ªãƒ–ジェクトã¯ã²ã¨
+ã¤ãšã¤ã—ã‹å­˜åœ¨ã—ã¾ã›ã‚“.
+
+データタイプãŒT_FIXNUMã®æ™‚,ã“れã¯31bitã¾ãŸã¯63bitã®ã‚µã‚¤ã‚ºã‚’
+æŒã¤æ•´æ•°ã§ã™ï¼Žlongã®ã‚µã‚¤ã‚ºãŒ32bitã®ãƒ—ラットフォームã§ã‚れã°
+31bitã«ï¼Œlongã®ã‚µã‚¤ã‚ºãŒ64bitã®ãƒ—ラットフォームã§ã‚れã°63bit
+ã«ãªã‚Šã¾ã™. FIXNUM ã‚’ C ã®æ•´æ•°ã«å¤‰æ›ã™ã‚‹ãŸã‚ã«ã¯ãƒžã‚¯ãƒ­
+「FIX2INT()ã€ã¾ãŸã¯ã€ŒFIX2LONG()ã€ã‚’使ã„ã¾ã™ï¼Žã“れらã®ãƒžã‚¯ãƒ­
+を使用ã™ã‚‹éš›ã«ã¯äº‹å‰ã«ãƒ‡ãƒ¼ã‚¿ã‚¿ã‚¤ãƒ—ãŒFIXNUMã§ã‚ã‚‹ã“ã¨ã‚’確èªã™
+ã‚‹å¿…è¦ãŒã‚りã¾ã™ãŒï¼Œæ¯”較的高速ã«å¤‰æ›ã‚’行ã†ã“ã¨ãŒã§ãã¾ã™ï¼Žã¾
+ãŸï¼Œã€ŒFIX2LONG()ã€ã¯ä¾‹å¤–を発生ã—ã¾ã›ã‚“ãŒï¼Œã€ŒFIX2INT()ã€ã¯å¤‰
+æ›çµæžœãŒintã®ã‚µã‚¤ã‚ºã«åŽã¾ã‚‰ãªã„å ´åˆã«ã¯ä¾‹å¤–を発生ã—ã¾ã™ï¼Ž
+ãれã‹ã‚‰ï¼ŒFIXNUMã«é™ã‚‰ãšRubyã®ãƒ‡ãƒ¼ã‚¿ã‚’æ•´æ•°ã«å¤‰æ›ã™ã‚‹
+「NUM2INT()ã€ãŠã‚ˆã³ã€ŒNUM2LONG()ã€ã¨ã„ã†ãƒžã‚¯ãƒ­ãŒã‚りã¾ã™ï¼Žã“
+れらã®ãƒžã‚¯ãƒ­ã¯ãƒžã‚¯ãƒ­ã¯ãƒ‡ãƒ¼ã‚¿ã‚¿ã‚¤ãƒ—ã®ãƒã‚§ãƒƒã‚¯ç„¡ã—ã§ä½¿ãˆã¾ã™
+(æ•´æ•°ã«å¤‰æ›ã§ããªã„å ´åˆã«ã¯ä¾‹å¤–ãŒç™ºç”Ÿã™ã‚‹)ï¼ŽåŒæ§˜ã«ãƒã‚§ãƒƒã‚¯ç„¡
+ã§ä½¿ãˆã‚‹å¤‰æ›ãƒžã‚¯ãƒ­ã¯doubleã‚’å–り出ã™ã€ŒNUM2DBL()ã€ãŒã‚りã¾ã™ï¼Ž
+
+char* ã‚’å–り出ã™å ´åˆï¼Œ StringValue() 㨠StringValuePtr()
+を使ã„ã¾ã™ï¼Ž
+StringValue(var) 㯠var ㌠String
+ã§ã‚れã°ä½•ã‚‚ã›ãšï¼Œãã†ã§ãªã‘れ㰠var ã‚’ var.to_str() ã®çµæžœ
+ã«ç½®ãæ›ãˆã‚‹ãƒžã‚¯ãƒ­ï¼ŒStringValuePtr(var) ã¯åŒæ§˜ã« var ã‚’
+String ã«ç½®ãæ›ãˆã¦ã‹ã‚‰ var ã®ãƒã‚¤ãƒˆåˆ—表ç¾ã«å¯¾ã™ã‚‹ char* ã‚’
+è¿”ã™ãƒžã‚¯ãƒ­ã§ã™ï¼Žvar ã®å†…å®¹ã‚’ç›´æŽ¥ç½®ãæ›ãˆã‚‹å‡¦ç†ãŒå…¥ã‚‹ã®ã§ï¼Œ
+var 㯠lvalue ã§ã‚ã‚‹å¿…è¦ãŒã‚りã¾ã™ï¼Ž
+ã¾ãŸï¼ŒStringValuePtr() ã«é¡žä¼¼ã—㟠StringValueCStr() ã¨ã„ã†ãƒž
+クロもã‚りã¾ã™ï¼ŽStringValueCStr(var) 㯠var ã‚’ String ã«ç½®ã
+æ›ãˆã¦ã‹ã‚‰ var ã®æ–‡å­—列表ç¾ã«å¯¾ã™ã‚‹ char* ã‚’è¿”ã—ã¾ã™ï¼Žè¿”ã•れ
+ã‚‹æ–‡å­—åˆ—ã®æœ«å°¾ã«ã¯ nul 文字ãŒä»˜åŠ ã•れã¾ã™ï¼ŽãªãŠï¼Œé€”中㫠nul
+文字ãŒå«ã¾ã‚Œã‚‹å ´åˆã¯ ArgumentError ãŒç™ºç”Ÿã—ã¾ã™ï¼Ž
+一方,StringValuePtr() ã§ã¯ï¼Œæœ«å°¾ã« nul 文字ãŒã‚ã‚‹ä¿è¨¼ã¯ãªã,
+途中㫠nul 文字ãŒå«ã¾ã‚Œã¦ã„ã‚‹å¯èƒ½æ€§ã‚‚ã‚りã¾ã™ï¼Ž
+
+ãれ以外ã®ãƒ‡ãƒ¼ã‚¿ã‚¿ã‚¤ãƒ—ã¯å¯¾å¿œã™ã‚‹Cã®æ§‹é€ ä½“ãŒã‚りã¾ã™ï¼Žå¯¾å¿œã™
+る構造体ã®ã‚ã‚‹VALUEã¯ãã®ã¾ã¾ã‚­ãƒ£ã‚¹ãƒˆ(型変æ›)ã™ã‚Œã°æ§‹é€ ä½“ã®
+ãƒã‚¤ãƒ³ã‚¿ã«å¤‰æ›ã§ãã¾ã™ï¼Ž
+
+構造体ã¯ã€Œstruct RXxxxxã€ã¨ã„ã†åå‰ã§ruby.hã§å®šç¾©ã•れã¦ã„ã¾
+ã™ï¼Žä¾‹ãˆã°æ–‡å­—列ã¯ã€Œstruct RStringã€ã§ã™ï¼Žå®Ÿéš›ã«ä½¿ã†å¯èƒ½æ€§ãŒ
+ã‚ã‚‹ã®ã¯æ–‡å­—列ã¨é…列ãらã„ã ã¨æ€ã„ã¾ã™ï¼Ž
+
+ruby.hã§ã¯æ§‹é€ ä½“ã¸ã‚­ãƒ£ã‚¹ãƒˆã™ã‚‹ãƒžã‚¯ãƒ­ã‚‚「RXXXXX()ã€(全部大文
+å­—ã«ã—ãŸã‚‚ã®)ã¨ã„ã†åå‰ã§æä¾›ã•れã¦ã„ã¾ã™(例: RSTRING()).
+
+構造体ã‹ã‚‰ãƒ‡ãƒ¼ã‚¿ã‚’å–り出ã™ãƒžã‚¯ãƒ­ãŒæä¾›ã•れã¦ã„ã¾ã™ï¼Žæ–‡å­—列
+strã®é•·ã•ã‚’å¾—ã‚‹ãŸã‚ã«ã¯ã€ŒRSTRING_LEN(str)ã€ã¨ã—,文字列strã‚’
+char*ã¨ã—ã¦å¾—ã‚‹ãŸã‚ã«ã¯ã€ŒRSTRING_PTR(str)ã€ã¨ã—ã¾ã™ï¼Žé…列ã®
+å ´åˆã«ã¯ï¼Œãれãžã‚Œã€ŒRARRAY_LEN(ary)ã€ï¼Œã€ŒRARRAY_PTR(ary)ã€ã¨
+ãªã‚Šã¾ã™ï¼Ž
+
+Rubyã®æ§‹é€ ä½“を直接アクセスã™ã‚‹æ™‚ã«æ°—ã‚’ã¤ã‘ãªã‘れã°ãªã‚‰ãªã„ã“
+ã¨ã¯ï¼Œé…åˆ—ã‚„æ–‡å­—åˆ—ã®æ§‹é€ ä½“ã®ä¸­èº«ã¯å‚ç…§ã™ã‚‹ã ã‘ã§ï¼Œç›´æŽ¥å¤‰æ›´ã—
+ãªã„ã“ã¨ã§ã™ï¼Žç›´æŽ¥å¤‰æ›´ã—ãŸå ´åˆï¼Œã‚ªãƒ–ジェクトã®å†…å®¹ã®æ•´åˆæ€§ãŒ
+ã¨ã‚Œãªããªã£ã¦ï¼Œæ€ã‚ã¬ãƒã‚°ã®åŽŸå› ã«ãªã‚Šã¾ã™ï¼Ž
+
+1.4 Cã®ãƒ‡ãƒ¼ã‚¿ã‚’VALUEã«å¤‰æ›ã™ã‚‹
+
+VALUEã®å®Ÿéš›ã®æ§‹é€ ã¯
+
+ * FIXNUMã®å ´åˆ
+
+ 1bit左シフトã—ã¦ï¼ŒLSBã‚’ç«‹ã¦ã‚‹ï¼Ž
+
+ * ãã®ä»–ã®ãƒã‚¤ãƒ³ã‚¿ã®å ´åˆ
+
+ ãã®ã¾ã¾VALUEã«ã‚­ãƒ£ã‚¹ãƒˆã™ã‚‹ï¼Ž
+
+ã¨ãªã£ã¦ã„ã¾ã™ï¼Žã‚ˆã£ã¦ï¼ŒLSBã‚’ãƒã‚§ãƒƒã‚¯ã™ã‚Œã°VALUEãŒFIXNUMã‹ã©
+ã†ã‹ã‚ã‹ã‚‹ã‚ã‘ã§ã™(ãƒã‚¤ãƒ³ã‚¿ã®LSBãŒç«‹ã£ã¦ã„ãªã„ã“ã¨ã‚’仮定ã—ã¦
+ã„ã‚‹).
+
+ã§ã™ã‹ã‚‰ï¼ŒFIXNUM以外ã®Rubyã®ã‚ªãƒ–ã‚¸ã‚§ã‚¯ãƒˆã®æ§‹é€ ä½“ã¯å˜ã«VALUE
+ã«ã‚­ãƒ£ã‚¹ãƒˆã™ã‚‹ã ã‘ã§VALUEã«å¤‰æ›å‡ºæ¥ã¾ã™ï¼ŽãŸã ã—,任æ„ã®æ§‹é€ 
+体ãŒVALUEã«ã‚­ãƒ£ã‚¹ãƒˆå‡ºæ¥ã‚‹ã‚ã‘ã§ã¯ã‚りã¾ã›ã‚“.キャストã™ã‚‹ã®
+ã¯Rubyã®çŸ¥ã£ã¦ã„る構造体(ruby.hã§å®šç¾©ã•れã¦ã„ã‚‹struct RXxxx
+ã®ã‚‚ã®)ã ã‘ã§ã™ï¼Ž
+
+FIXNUMã«é–¢ã—ã¦ã¯å¤‰æ›ãƒžã‚¯ãƒ­ã‚’経由ã™ã‚‹å¿…è¦ãŒã‚りã¾ã™ï¼ŽCã®æ•´æ•°
+ã‹ã‚‰VALUEã«å¤‰æ›ã™ã‚‹ãƒžã‚¯ãƒ­ã¯ä»¥ä¸‹ã®ã‚‚ã®ãŒã‚りã¾ã™ï¼Žå¿…è¦ã«å¿œã˜
+ã¦ä½¿ã„分ã‘ã¦ãã ã•ã„.
+
+ INT2FIX() ã‚‚ã¨ã®æ•´æ•°ãŒ31bitã¾ãŸã¯63bit以内ã«åŽã¾ã‚‹è‡ªä¿¡
+ ãŒã‚る時
+ INT2NUM() ä»»æ„ã®æ•´æ•°ã‹ã‚‰VALUEã¸
+
+INT2NUM()ã¯æ•´æ•°ãŒFIXNUMã®ç¯„囲ã«åŽã¾ã‚‰ãªã„å ´åˆï¼ŒBignumã«å¤‰æ›
+ã—ã¦ãれã¾ã™(ãŒï¼Œå°‘ã—é…ã„).
+
+1.5 Rubyã®ãƒ‡ãƒ¼ã‚¿ã‚’æ“作ã™ã‚‹
+
+先程も述ã¹ãŸé€šã‚Šï¼ŒRubyã®æ§‹é€ ä½“をアクセスã™ã‚‹æ™‚ã«å†…å®¹ã®æ›´æ–°ã‚’
+行ã†ã“ã¨ã¯å‹§ã‚られã¾ã›ã‚“.ã§ï¼ŒRubyã®ãƒ‡ãƒ¼ã‚¿ã‚’æ“作ã™ã‚‹æ™‚ã«ã¯
+RubyãŒç”¨æ„ã—ã¦ã„る関数を用ã„ã¦ãã ã•ã„.
+
+ã“ã“ã§ã¯ã‚‚ã£ã¨ã‚‚使ã‚れるã§ã‚ã‚ã†æ–‡å­—列ã¨é…列ã®ç”Ÿæˆ/æ“作を行
+ã„関数をã‚ã’ã¾ã™(全部ã§ã¯ãªã„ã§ã™).
+
+ 文字列ã«å¯¾ã™ã‚‹é–¢æ•°
+
+ rb_str_new(const char *ptr, long len)
+
+ æ–°ã—ã„Rubyã®æ–‡å­—列を生æˆã™ã‚‹ï¼Ž
+
+ rb_str_new2(const char *ptr)
+ rb_str_new_cstr(const char *ptr)
+
+ Cã®æ–‡å­—列ã‹ã‚‰Rubyã®æ–‡å­—列を生æˆã™ã‚‹ï¼Žã“ã®é–¢æ•°ã®æ©Ÿèƒ½ã¯
+ rb_str_new(ptr, strlen(ptr))ã¨åŒç­‰ã§ã‚る.
+
+ rb_tainted_str_new(const char *ptr, long len)
+
+ 汚染マークãŒä»˜åŠ ã•ã‚ŒãŸæ–°ã—ã„Rubyã®æ–‡å­—列を生æˆã™ã‚‹ï¼Žå¤–部
+ ã‹ã‚‰ã®ãƒ‡ãƒ¼ã‚¿ã«åŸºã¥ã文字列ã«ã¯æ±šæŸ“マークãŒä»˜åŠ ã•れるã¹ã
+ ã§ã‚る.
+
+ rb_tainted_str_new2(const char *ptr)
+ rb_tainted_str_new_cstr(const char *ptr)
+
+ Cã®æ–‡å­—列ã‹ã‚‰æ±šæŸ“マークãŒä»˜åŠ ã•れãŸRubyã®æ–‡å­—列を生æˆã™ã‚‹ï¼Ž
+
+ rb_sprintf(const char *format, ...)
+ rb_vsprintf(const char *format, va_list ap)
+
+ Cã®æ–‡å­—列formatã¨ç¶šã引数をprintf(3)ã®ãƒ•ォーマットã«ã—ãŸãŒã£ã¦
+ æ•´å½¢ã—,Rubyã®æ–‡å­—列を生æˆã™ã‚‹ï¼Ž
+
+ rb_str_cat(VALUE str, const char *ptr, long len)
+
+ Rubyã®æ–‡å­—列strã«lenãƒã‚¤ãƒˆã®æ–‡å­—列ptrを追加ã™ã‚‹ï¼Ž
+
+ rb_str_cat2(VALUE str, const char* ptr)
+
+ Rubyã®æ–‡å­—列strã«Cã®æ–‡å­—列ptrを追加ã™ã‚‹ï¼Žã“ã®é–¢æ•°ã®æ©Ÿèƒ½ã¯
+ rb_str_cat(str, ptr, strlen(ptr))ã¨åŒç­‰ã§ã‚る.
+
+ rb_str_catf(VALUE str, const char* format, ...)
+ rb_str_vcatf(VALUE str, const char* format, va_list ap)
+
+ Cã®æ–‡å­—列formatã¨ç¶šã引数をprintf(3)ã®ãƒ•ォーマットã«ã—ãŸãŒã£ã¦
+ æ•´å½¢ã—,Rubyã®æ–‡å­—列strã«è¿½åŠ ã™ã‚‹ï¼Žã“ã®é–¢æ•°ã®æ©Ÿèƒ½ã¯ï¼Œãれãžã‚Œ
+ rb_str_cat2(str, rb_sprintf(format, ...)) ã‚„
+ rb_str_cat2(str, rb_vsprintf(format, ap)) ã¨åŒç­‰ã§ã‚る.
+
+ rb_enc_str_new(const char *ptr, long len, rb_encoding *enc)
+
+ 指定ã•れãŸã‚¨ãƒ³ã‚³ãƒ¼ãƒ‡ã‚£ãƒ³ã‚°ã§Rubyã®æ–‡å­—列を生æˆã™ã‚‹.
+
+ rb_usascii_str_new(const char *ptr, long len)
+ rb_usascii_str_new_cstr(const char *ptr)
+
+ エンコーディングãŒUS-ASCIIã®Rubyã®æ–‡å­—列を生æˆã™ã‚‹.
+
+ rb_str_resize(VALUE str, long len)
+
+ Rubyã®æ–‡å­—列ã®ã‚µã‚¤ã‚ºã‚’lenãƒã‚¤ãƒˆã«å¤‰æ›´ã™ã‚‹ï¼Žstrã®é•·ã•ã¯å‰
+ 以ã¦ã‚»ãƒƒãƒˆã•れã¦ã„ãªã‘れã°ãªã‚‰ãªã„.lenãŒå…ƒã®é•·ã•よりも短
+ ã„æ™‚ã¯ï¼Œlenãƒã‚¤ãƒˆã‚’è¶ŠãˆãŸéƒ¨åˆ†ã®å†…å®¹ã¯æ¨ã¦ã‚‰ã‚Œã‚‹ï¼ŽlenãŒå…ƒ
+ ã®é•·ã•ã‚ˆã‚Šã‚‚é•·ã„æ™‚ã¯ï¼Œå…ƒã®é•·ã•ã‚’è¶ŠãˆãŸéƒ¨åˆ†ã®å†…容ã¯ä¿å­˜ã•
+ れãªã„ã§ã‚´ãƒŸã«ãªã‚‹ã ã‚ã†ï¼Žã“ã®é–¢æ•°ã®å‘¼ã³å‡ºã—ã«ã‚ˆã£ã¦
+ RSTRING_PTR(str)ãŒå¤‰æ›´ã•れるã‹ã‚‚ã—れãªã„ã“ã¨ã«æ³¨æ„.
+
+ rb_str_set_len(VALUE str, long len)
+
+ Rubyã®æ–‡å­—列ã®ã‚µã‚¤ã‚ºã‚’lenãƒã‚¤ãƒˆã«ã‚»ãƒƒãƒˆã™ã‚‹ï¼ŽstrãŒå¤‰æ›´å¯
+ 能ã§ãªã‘れã°ä¾‹å¤–ãŒç™ºç”Ÿã™ã‚‹ï¼ŽRSTRING_LEN(str)ã¨ã¯ç„¡é–¢ä¿‚ã«ï¼Œ
+ lenãƒã‚¤ãƒˆã¾ã§ã®å†…容ã¯ä¿å­˜ã•れる.lenã¯strã®å®¹é‡ã‚’è¶Šãˆã¦ã„
+ ã¦ã¯ãªã‚‰ãªã„.
+
+
+ é…列ã«å¯¾ã™ã‚‹é–¢æ•°
+
+ rb_ary_new()
+
+ è¦ç´ ãŒ0ã®é…列を生æˆã™ã‚‹ï¼Ž
+
+ rb_ary_new2(long len)
+
+ è¦ç´ ãŒ0ã®é…列を生æˆã™ã‚‹ï¼Žlenè¦ç´ åˆ†ã®é ˜åŸŸã‚’ã‚らã‹ã˜ã‚割り
+ 当ã¦ã¦ãŠã.
+
+ rb_ary_new3(long n, ...)
+
+ å¼•æ•°ã§æŒ‡å®šã—ãŸnè¦ç´ ã‚’å«ã‚€é…列を生æˆã™ã‚‹ï¼Ž
+
+ rb_ary_new4(long n, VALUE *elts)
+
+ é…列ã§ä¸ŽãˆãŸnè¦ç´ ã®é…列を生æˆã™ã‚‹ï¼Ž
+
+ rb_ary_to_ary(VALUE obj)
+
+ オブジェクトをé…列ã«å¤‰æ›ã™ã‚‹.
+ Object#to_aryã¨åŒç­‰ã§ã‚ã‚‹.
+
+ ä»–ã«ã‚‚é…列をæ“作ã™ã‚‹é–¢æ•°ãŒå¤šæ•°ã‚ã‚‹. ã“れらã¯
+ 引数aryã«é…列を渡ã•ãªã‘れã°ãªã‚‰ãªã„. ã•ã‚‚ãªã„ã¨
+ コアをåã.
+
+ rb_ary_aref(argc, VALUE *argv, VALUE ary)
+
+ Array#[]ã¨åŒç­‰.
+
+ rb_ary_entry(VALUE ary, long offset)
+
+ ary[offset]
+
+ rb_ary_subseq(VALUE ary, long beg, long len)
+
+ ary[beg, len]
+
+ rb_ary_push(VALUE ary, VALUE val)
+ rb_ary_pop(VALUE ary)
+ rb_ary_shift(VALUE ary)
+ rb_ary_unshift(VALUE ary, VALUE val)
+
+ rb_ary_cat(VALUE ary, const VALUE *ptr, long len)
+
+ é…列aryã«ptrã‹ã‚‰len個ã®ã‚ªãƒ–ジェクトを追加ã™ã‚‹ï¼Ž
+
+2.Rubyã®æ©Ÿèƒ½ã‚’使ã†
+
+原ç†çš„ã«Rubyã§æ›¸ã‘ã‚‹ã“ã¨ã¯Cã§ã‚‚書ã‘ã¾ã™ï¼ŽRubyãã®ã‚‚ã®ãŒCã§è¨˜
+è¿°ã•れã¦ã„ã‚‹ã‚“ã§ã™ã‹ã‚‰ï¼Œå½“ç„¶ã¨ã„ãˆã°å½“ç„¶ãªã‚“ã§ã™ã‘ã©ï¼Žã“ã“ã§
+ã¯Rubyã®æ‹¡å¼µã«ä½¿ã†ã“ã¨ãŒå¤šã„ã ã‚ã†ã¨äºˆæ¸¬ã•れる機能を中心ã«ç´¹
+介ã—ã¾ã™ï¼Ž
+
+2.1 Rubyã«æ©Ÿèƒ½ã‚’追加ã™ã‚‹
+
+Rubyã§æä¾›ã•れã¦ã„る関数を使ãˆã°Rubyã‚¤ãƒ³ã‚¿ãƒ—ãƒªã‚¿ã«æ–°ã—ã„æ©Ÿèƒ½
+を追加ã™ã‚‹ã“ã¨ãŒã§ãã¾ã™ï¼ŽRubyã§ã¯ä»¥ä¸‹ã®æ©Ÿèƒ½ã‚’追加ã™ã‚‹é–¢æ•°ãŒ
+æä¾›ã•れã¦ã„ã¾ã™ï¼Ž
+
+ * クラス,モジュール
+ * メソッド,特異メソッドãªã©
+ * 定数
+
+ã§ã¯é †ã«ç´¹ä»‹ã—ã¾ã™ï¼Ž
+
+2.1.1 クラス/モジュール定義
+
+クラスやモジュールを定義ã™ã‚‹ãŸã‚ã«ã¯ï¼Œä»¥ä¸‹ã®é–¢æ•°ã‚’使ã„ã¾ã™ï¼Ž
+
+ VALUE rb_define_class(const char *name, VALUE super)
+ VALUE rb_define_module(const char *name)
+
+ã“れらã®é–¢æ•°ã¯æ–°ã—ã定義ã•れãŸã‚¯ãƒ©ã‚¹ã‚„モジュールを返ã—ã¾ã™ï¼Ž
+メソッドや定数ã®å®šç¾©ã«ã“れらã®å€¤ãŒå¿…è¦ãªã®ã§ï¼Œã»ã¨ã‚“ã©ã®å ´åˆ
+ã¯æˆ»ã‚Šå€¤ã‚’å¤‰æ•°ã«æ ¼ç´ã—ã¦ãŠãå¿…è¦ãŒã‚ã‚‹ã§ã—ょã†ï¼Ž
+
+クラスやモジュールを他ã®ã‚¯ãƒ©ã‚¹ã®å†…部ã«ãƒã‚¹ãƒˆã—ã¦å®šç¾©ã™ã‚‹æ™‚ã«
+ã¯ä»¥ä¸‹ã®é–¢æ•°ã‚’使ã„ã¾ã™ï¼Ž
+
+ VALUE rb_define_class_under(VALUE outer, const char *name, VALUE super)
+ VALUE rb_define_module_under(VALUE outer, const char *name)
+
+2.1.2 メソッド/特異メソッド定義
+
+メソッドや特異メソッドを定義ã™ã‚‹ã«ã¯ä»¥ä¸‹ã®é–¢æ•°ã‚’使ã„ã¾ã™ï¼Ž
+
+ void rb_define_method(VALUE klass, const char *name,
+ VALUE (*func)(), int argc)
+
+ void rb_define_singleton_method(VALUE object, const char *name,
+ VALUE (*func)(), int argc)
+
+
+念ã®ãŸã‚説明ã™ã‚‹ã¨ã€Œç‰¹ç•°ãƒ¡ã‚½ãƒƒãƒ‰ã€ã¨ã¯ï¼Œãã®ç‰¹å®šã®ã‚ªãƒ–ジェク
+トã«å¯¾ã—ã¦ã ã‘有効ãªãƒ¡ã‚½ãƒƒãƒ‰ã§ã™ï¼ŽRubyã§ã¯ã‚ˆãSmalltalkã«ãŠ
+ã‘るクラスメソッドã¨ã—ã¦ï¼Œã‚¯ãƒ©ã‚¹ã«å¯¾ã™ã‚‹ç‰¹ç•°ãƒ¡ã‚½ãƒƒãƒ‰ãŒä½¿ã‚れ
+ã¾ã™ï¼Ž
+
+ã“れらã®é–¢æ•°ã® argcã¨ã„ã†å¼•æ•°ã¯Cã®é–¢æ•°ã¸æ¸¡ã•ã‚Œã‚‹å¼•æ•°ã®æ•°(ã¨
+å½¢å¼)を決ã‚ã¾ã™ï¼ŽargcãŒ0ä»¥ä¸Šã®æ™‚ã¯é–¢æ•°ã«å¼•ãæ¸¡ã™å¼•æ•°ã®æ•°ã‚’æ„
+味ã—ã¾ã™ï¼Ž16個以上ã®å¼•æ•°ã¯ä½¿ãˆã¾ã›ã‚“(ãŒï¼Œè¦ã‚Šã¾ã›ã‚“よã­ï¼Œã
+ã‚“ãªã«).実際ã®é–¢æ•°ã«ã¯å…ˆé ­ã®å¼•æ•°ã¨ã—ã¦selfãŒä¸Žãˆã‚‰ã‚Œã¾ã™ã®
+ã§ï¼ŒæŒ‡å®šã—ãŸæ•°ã‚ˆã‚Š1多ã„引数をæŒã¤ã“ã¨ã«ãªã‚Šã¾ã™ï¼Ž
+
+argcãŒè² ã®æ™‚ã¯å¼•æ•°ã®æ•°ã§ã¯ãªã,形å¼ã‚’指定ã—ãŸã“ã¨ã«ãªã‚Šã¾ã™ï¼Ž
+argcãŒ-1ã®æ™‚ã¯å¼•æ•°ã‚’é…列ã«å…¥ã‚Œã¦æ¸¡ã•れã¾ã™ï¼ŽargcãŒ-2ã®æ™‚ã¯å¼•
+æ•°ã¯Rubyã®é…列ã¨ã—ã¦æ¸¡ã•れã¾ã™ï¼Ž
+
+メソッドを定義ã™ã‚‹é–¢æ•°ã¯ã¾ã ã„ãã¤ã‹ã‚りã¾ã™. ã²ã¨ã¤ã¯ãƒ¡ã‚½ãƒƒãƒ‰
+åã¨ã—ã¦IDã‚’å–りã¾ã™. IDã«ã¤ã„ã¦ã¯2.2.2ã‚’å‚ç…§.
+
+ void rb_define_method_id(VALUE klass, ID name,
+ VALUE (*func)(ANYARGS), int argc)
+
+private/protectedãªãƒ¡ã‚½ãƒƒãƒ‰ã‚’定義ã™ã‚‹ãµãŸã¤ã®é–¢æ•°ãŒã‚りã¾ã™.
+
+ void rb_define_private_method(VALUE klass, const char *name,
+ VALUE (*func)(), int argc)
+ void rb_define_protected_method(VALUE klass, const char *name,
+ VALUE (*func)(), int argc)
+
+privateメソッドã¨ã¯é–¢æ•°å½¢å¼ã§ã—ã‹å‘¼ã³å‡ºã™ã“ã¨ã®å‡ºæ¥ãªã„メソッ
+ドã§ã™ï¼Ž
+
+最後ã«ï¼Œ rb_define_module関数ã¯ãƒ¢ã‚¸ãƒ¥ãƒ¼ãƒ«é–¢æ•°ã‚’定義ã—ã¾ã™ï¼Ž
+モジュール関数ã¨ã¯ãƒ¢ã‚¸ãƒ¥ãƒ¼ãƒ«ã®ç‰¹ç•°ãƒ¡ã‚½ãƒƒãƒ‰ã§ã‚ã‚Šï¼ŒåŒæ™‚ã«
+privateメソッドã§ã‚‚ã‚ã‚‹ã‚‚ã®ã§ã™ï¼Žä¾‹ã‚’ã‚ã’ã‚‹ã¨Mathモジュール
+ã®sqrt()ãªã©ãŒã‚ã’られã¾ã™ï¼Žã“ã®ãƒ¡ã‚½ãƒƒãƒ‰ã¯
+
+ Math.sqrt(4)
+
+ã¨ã„ã†å½¢å¼ã§ã‚‚
+
+ include Math
+ sqrt(4)
+
+ã¨ã„ã†å½¢å¼ã§ã‚‚使ãˆã¾ã™ï¼Žãƒ¢ã‚¸ãƒ¥ãƒ¼ãƒ«é–¢æ•°ã‚’定義ã™ã‚‹é–¢æ•°ã¯ä»¥ä¸‹ã®
+通りã§ã™ï¼Ž
+
+ void rb_define_module_function(VALUE module, const char *name,
+ VALUE (*func)(), int argc)
+
+関数的メソッド(Kernelモジュールã®private method)を定義ã™ã‚‹ãŸ
+ã‚ã®é–¢æ•°ã¯ä»¥ä¸‹ã®é€šã‚Šã§ã™ï¼Ž
+
+ void rb_define_global_function(const char *name, VALUE (*func)(), int argc)
+
+
+メソッドã®åˆ¥åを定義ã™ã‚‹ãŸã‚ã®é–¢æ•°ã¯ä»¥ä¸‹ã®é€šã‚Šã§ã™ï¼Ž
+
+ void rb_define_alias(VALUE module, const char* new, const char* old);
+
+属性ã®å–得・設定メソッドを定義ã™ã‚‹ã«ã¯
+
+ void rb_define_attr(VALUE klass, const char *name, int read, int write)
+
+クラスメソッドallocateを定義ã—ãŸã‚Šå‰Šé™¤ã—ãŸã‚Šã™ã‚‹ãŸã‚ã®é–¢æ•°ã¯
+以下ã®é€šã‚Šã§ã™ï¼Ž
+
+ void rb_define_alloc_func(VALUE klass, VALUE (*func)(VALUE klass));
+ void rb_undef_alloc_func(VALUE klass);
+
+funcã¯ã‚¯ãƒ©ã‚¹ã‚’引数ã¨ã—ã¦å—ã‘å–ã£ã¦ï¼Œæ–°ã—ã割り当ã¦ã‚‰ã‚ŒãŸã‚¤ãƒ³
+スタンスを返ã•ãªãã¦ã¯ãªã‚Šã¾ã›ã‚“.ã“ã®ã‚¤ãƒ³ã‚¹ã‚¿ãƒ³ã‚¹ã¯ï¼Œå¤–部リ
+ソースãªã©ã‚’å«ã¾ãªã„,ã§ãã‚‹ã ã‘「空ã€ã®ã¾ã¾ã«ã—ã¦ãŠã„ãŸã»ã†
+ãŒã‚ˆã„ã§ã—ょã†ï¼Ž
+
+2.1.3 定数定義
+
+拡張ライブラリãŒå¿…è¦ãªå®šæ•°ã¯ã‚らã‹ã˜ã‚定義ã—ã¦ãŠã„ãŸæ–¹ãŒè‰¯ã„
+ã§ã—ょã†ï¼Žå®šæ•°ã‚’定義ã™ã‚‹é–¢æ•°ã¯äºŒã¤ã‚りã¾ã™ï¼Ž
+
+ void rb_define_const(VALUE klass, const char *name, VALUE val)
+ void rb_define_global_const(const char *name, VALUE val)
+
+å‰è€…ã¯ç‰¹å®šã®ã‚¯ãƒ©ã‚¹/モジュールã«å±žã™ã‚‹å®šæ•°ã‚’定義ã™ã‚‹ã‚‚ã®ï¼Œå¾Œ
+者ã¯ã‚°ãƒ­ãƒ¼ãƒãƒ«ãªå®šæ•°ã‚’定義ã™ã‚‹ã‚‚ã®ã§ã™ï¼Ž
+
+2.2 Rubyã®æ©Ÿèƒ½ã‚’Cã‹ã‚‰å‘¼ã³å‡ºã™
+
+æ—¢ã«ã€Ž1.5 Rubyã®ãƒ‡ãƒ¼ã‚¿ã‚’æ“作ã™ã‚‹ã€ã§ä¸€éƒ¨ç´¹ä»‹ã—ãŸã‚ˆã†ãªé–¢æ•°ã‚’
+使ãˆã°ï¼ŒRubyã®æ©Ÿèƒ½ã‚’実ç¾ã—ã¦ã„る関数を直接呼ã³å‡ºã™ã“ã¨ãŒå‡ºæ¥
+ã¾ã™ï¼Ž
+
+# ã“ã®ã‚ˆã†ãªé–¢æ•°ã®ä¸€è¦§è¡¨ã¯ã„ã¾ã®ã¨ã“ã‚ã‚りã¾ã›ã‚“.ソースを見
+# ã‚‹ã—ã‹ãªã„ã§ã™ã­ï¼Ž
+
+ãれ以外ã«ã‚‚Rubyã®æ©Ÿèƒ½ã‚’呼ã³å‡ºã™æ–¹æ³•ã¯ã„ãã¤ã‹ã‚りã¾ã™ï¼Ž
+
+2.2.1 Rubyã®ãƒ—ログラムをevalã™ã‚‹
+
+Cã‹ã‚‰Rubyã®æ©Ÿèƒ½ã‚’呼ã³å‡ºã™ã‚‚ã£ã¨ã‚‚ç°¡å˜ãªæ–¹æ³•ã¨ã—ã¦ï¼Œæ–‡å­—列ã§
+与ãˆã‚‰ã‚ŒãŸRubyã®ãƒ—ログラムを評価ã™ã‚‹ä»¥ä¸‹ã®é–¢æ•°ãŒã‚りã¾ã™ï¼Ž
+
+ VALUE rb_eval_string(const char *str)
+
+ã“ã®è©•価ã¯ç¾åœ¨ã®ç’°å¢ƒã§è¡Œã‚れã¾ã™ï¼Žã¤ã¾ã‚Šï¼Œç¾åœ¨ã®ãƒ­ãƒ¼ã‚«ãƒ«å¤‰æ•°
+ãªã©ã‚’å—ã‘ç¶™ãŽã¾ã™ï¼Ž
+
+評価ã¯ä¾‹å¤–を発生ã™ã‚‹ã‹ã‚‚ã—れãªã„ã“ã¨ã«æ³¨æ„ã—ã¾ã—ょã†. より安全
+ãªé–¢æ•°ã‚‚ã‚りã¾ã™.
+
+ VALUE rb_eval_string_protect(const char *str, int *state)
+
+ã“ã®é–¢æ•°ã¯ã‚¨ãƒ©ãƒ¼ãŒç™ºç”Ÿã™ã‚‹ã¨nilã‚’è¿”ã—ã¾ã™ï¼Žãã—ã¦ï¼ŒæˆåŠŸæ™‚ã«ã¯
+*stateã¯ã‚¼ãƒ­ã«ï¼Œã•ã‚‚ãªãã°éžã‚¼ãƒ­ã«ãªã‚Šã¾ã™ï¼Ž
+
+
+2.2.2 IDã¾ãŸã¯ã‚·ãƒ³ãƒœãƒ«
+
+Cã‹ã‚‰æ–‡å­—列を経由ã›ãšã«Rubyã®ãƒ¡ã‚½ãƒƒãƒ‰ã‚’呼ã³å‡ºã™ã“ã¨ã‚‚ã§ãã¾
+ã™ï¼Žãã®å‰ã«ï¼ŒRubyインタプリタ内ã§ãƒ¡ã‚½ãƒƒãƒ‰ã‚„変数åを指定ã™ã‚‹
+時ã«ä½¿ã‚れã¦ã„ã‚‹IDã«ã¤ã„ã¦èª¬æ˜Žã—ã¦ãŠãã¾ã—ょã†ï¼Ž
+
+IDã¨ã¯å¤‰æ•°å,メソッドåã‚’è¡¨ã™æ•´æ•°ã§ã™ï¼ŽRubyã®ä¸­ã§ã¯
+
+ :識別å­
+ã¾ãŸã¯
+ :"ä»»æ„ã®æ–‡å­—列"
+
+ã§ã‚¢ã‚¯ã‚»ã‚¹ã§ãã¾ã™ï¼ŽCã‹ã‚‰ã“ã®æ•´æ•°ã‚’å¾—ã‚‹ãŸã‚ã«ã¯é–¢æ•°
+
+ rb_intern(const char *name)
+ rb_intern_str(VALUE name)
+
+を使ã„ã¾ã™ï¼ŽRubyã‹ã‚‰å¼•æ•°ã¨ã—ã¦ä¸Žãˆã‚‰ã‚ŒãŸã‚·ãƒ³ãƒœãƒ«(ã¾ãŸã¯æ–‡å­—
+列)ã‚’IDã«å¤‰æ›ã™ã‚‹ã«ã¯ä»¥ä¸‹ã®é–¢æ•°ã‚’使ã„ã¾ã™ï¼Ž
+
+ rb_to_id(VALUE symbol)
+ rb_check_id(volatile VALUE *name)
+ rb_check_id_cstr(const char *name, long len, rb_encoding *enc)
+
+ã‚‚ã—引数ãŒã‚·ãƒ³ãƒœãƒ«ã§ã‚‚文字列ã§ã‚‚ãªã‘れã°ã€to_strãƒ¡ã‚½ãƒƒãƒ‰ã§æ–‡
+字列ã«å¤‰æ›ã—よã†ã¨ã—ã¾ã™ï¼Žç¬¬äºŒã®é–¢æ•°ã¯ãã®å¤‰æ›çµæžœã‚’*nameã«ä¿
+å­˜ã—,ãã®åå‰ãŒæ—¢çŸ¥ã®ã‚·ãƒ³ãƒœãƒ«ã§ãªã„å ´åˆã¯0ã‚’è¿”ã—ã¾ã™ï¼Žã“ã®é–¢
+æ•°ãŒ0以外を返ã—ãŸå ´åˆã¯*nameã¯å¸¸ã«ã‚·ãƒ³ãƒœãƒ«ã‹æ–‡å­—列ã§ã‚りã€0ã‚’
+è¿”ã—ãŸå ´åˆã¯å¸¸ã«æ–‡å­—列ã§ã™ï¼Žç¬¬ä¸‰ã®é–¢æ•°ã¯Rubyã®æ–‡å­—列ã§ã¯ãªã
+NUL終端ã•れãŸCã®æ–‡å­—列を使ã„ã¾ã™ï¼Ž
+
+2.2.3 Cã‹ã‚‰Rubyã®ãƒ¡ã‚½ãƒƒãƒ‰ã‚’呼ã³å‡ºã™
+
+Cã‹ã‚‰æ–‡å­—列を経由ã›ãšã«Rubyã®ãƒ¡ã‚½ãƒƒãƒ‰ã‚’呼ã³å‡ºã™ãŸã‚ã«ã¯ä»¥ä¸‹
+ã®é–¢æ•°ã‚’使ã„ã¾ã™ï¼Ž
+
+ VALUE rb_funcall(VALUE recv, ID mid, int argc, ...)
+
+ã“ã®é–¢æ•°ã¯ã‚ªãƒ–ジェクトrecvã®midã§æŒ‡å®šã•れるメソッドを呼ã³å‡º
+ã—ã¾ã™ï¼Žãã®ä»–ã«å¼•æ•°ã®æŒ‡å®šã®ä»•æ–¹ãŒé•ã†ä»¥ä¸‹ã®é–¢æ•°ã‚‚ã‚りã¾ã™ï¼Ž
+
+ VALUE rb_funcall2(VALUE recv, ID mid, int argc, VALUE *argv)
+ VALUE rb_apply(VALUE recv, ID mid, VALUE args)
+
+applyã«ã¯å¼•æ•°ã¨ã—ã¦Rubyã®é…列を与ãˆã¾ã™ï¼Ž
+
+2.2.4 変数/定数をå‚ç…§/æ›´æ–°ã™ã‚‹
+
+Cã‹ã‚‰é–¢æ•°ã‚’使ã£ã¦å‚照・更新ã§ãã‚‹ã®ã¯ï¼Œå®šæ•°ï¼Œã‚¤ãƒ³ã‚¹ã‚¿ãƒ³ã‚¹å¤‰
+æ•°ã§ã™ï¼Žå¤§åŸŸå¤‰æ•°ã¯ä¸€éƒ¨ã®ã‚‚ã®ã¯Cã®å¤§åŸŸå¤‰æ•°ã¨ã—ã¦ã‚¢ã‚¯ã‚»ã‚¹ã§ã
+ã¾ã™ï¼Žãƒ­ãƒ¼ã‚«ãƒ«å¤‰æ•°ã‚’å‚ç…§ã™ã‚‹æ–¹æ³•ã¯å…¬é–‹ã—ã¦ã„ã¾ã›ã‚“.
+
+オブジェクトã®ã‚¤ãƒ³ã‚¹ã‚¿ãƒ³ã‚¹å¤‰æ•°ã‚’å‚照・更新ã™ã‚‹é–¢æ•°ã¯ä»¥ä¸‹ã®é€š
+りã§ã™ï¼Ž
+
+ VALUE rb_ivar_get(VALUE obj, ID id)
+ VALUE rb_ivar_set(VALUE obj, ID id, VALUE val)
+
+idã¯rb_intern()ã§å¾—られるもã®ã‚’使ã£ã¦ãã ã•ã„.
+
+定数をå‚ç…§ã™ã‚‹ã«ã¯ä»¥ä¸‹ã®é–¢æ•°ã‚’使ã£ã¦ãã ã•ã„.
+
+ VALUE rb_const_get(VALUE obj, ID id)
+
+定数を新ã—ã定義ã™ã‚‹ãŸã‚ã«ã¯ã€Ž2.1.3 定数定義ã€ã§ç´¹ä»‹ã•
+れã¦ã„る関数を使ã£ã¦ãã ã•ã„.
+
+3.Rubyã¨Cã¨ã®æƒ…報共有
+
+C言語ã¨Rubyã®é–“ã§æƒ…報を共有ã™ã‚‹æ–¹æ³•ã«ã¤ã„ã¦è§£èª¬ã—ã¾ã™ï¼Ž
+
+3.1 Cã‹ã‚‰å‚ç…§ã§ãã‚‹Rubyã®å®šæ•°
+
+以下ã®Rubyã®å®šæ•°ã¯Cã®ãƒ¬ãƒ™ãƒ«ã‹ã‚‰å‚ç…§ã§ãã¾ã™ï¼Ž
+
+ Qtrue
+ Qfalse
+
+ 真å½å€¤ï¼ŽQfalseã¯C言語ã§ã‚‚å½ã¨ã¿ãªã•れã¾ã™(ã¤ã¾ã‚Š0).
+
+ Qnil
+
+ C言語ã‹ã‚‰è¦‹ãŸã€Œnilã€ï¼Ž
+
+3.2 Cã¨Rubyã§å…±æœ‰ã•れる大域変数
+
+Cã¨Rubyã§å¤§åŸŸå¤‰æ•°ã‚’使ã£ã¦æƒ…報を共有ã§ãã¾ã™ï¼Žå…±æœ‰ã§ãる大域
+変数ã«ã¯ã„ãã¤ã‹ã®ç¨®é¡žãŒã‚りã¾ã™ï¼Žãã®ãªã‹ã§ã‚‚ã£ã¨ã‚‚良ã使ã‚
+ã‚Œã‚‹ã¨æ€ã‚れるã®ã¯rb_define_variable()ã§ã™ï¼Ž
+
+ void rb_define_variable(const char *name, VALUE *var)
+
+ã“ã®é–¢æ•°ã¯Rubyã¨Cã¨ã§å…±æœ‰ã™ã‚‹å¤§åŸŸå¤‰æ•°ã‚’定義ã—ã¾ã™ï¼Žå¤‰æ•°åãŒ
+`$'ã§å§‹ã¾ã‚‰ãªã„時ã«ã¯è‡ªå‹•çš„ã«è¿½åŠ ã•れã¾ã™ï¼Žã“ã®å¤‰æ•°ã®å€¤ã‚’変
+æ›´ã™ã‚‹ã¨è‡ªå‹•çš„ã«Rubyã®å¯¾å¿œã™ã‚‹å¤‰æ•°ã®å€¤ã‚‚変ã‚りã¾ã™ï¼Ž
+
+ã¾ãŸRubyå´ã‹ã‚‰ã¯æ›´æ–°ã§ããªã„変数もã‚りã¾ã™ï¼Žã“ã®read onlyã®
+変数ã¯ä»¥ä¸‹ã®é–¢æ•°ã§å®šç¾©ã—ã¾ã™ï¼Ž
+
+ void rb_define_readonly_variable(const char *name, VALUE *var)
+
+ã“れら変数ã®ä»–ã«hookã‚’ã¤ã‘ãŸå¤§åŸŸå¤‰æ•°ã‚’定義ã§ãã¾ã™ï¼Žhook付ã
+ã®å¤§åŸŸå¤‰æ•°ã¯ä»¥ä¸‹ã®é–¢æ•°ã‚’用ã„ã¦å®šç¾©ã—ã¾ã™ï¼Žhook付ã大域変数ã®
+値ã®å‚照や設定ã¯hookã§è¡Œã†å¿…è¦ãŒã‚りã¾ã™ï¼Ž
+
+ void rb_define_hooked_variable(const char *name, VALUE *var,
+ VALUE (*getter)(), void (*setter)())
+
+ã“ã®é–¢æ•°ã¯Cã®é–¢æ•°ã«ã‚ˆã£ã¦hookã®ã¤ã‘られãŸå¤§åŸŸå¤‰æ•°ã‚’定義ã—ã¾
+ã™ï¼Žå¤‰æ•°ãŒå‚ç…§ã•ã‚ŒãŸæ™‚ã«ã¯é–¢æ•°getterãŒï¼Œå¤‰æ•°ã«å€¤ãŒã‚»ãƒƒãƒˆã•れ
+ãŸæ™‚ã«ã¯é–¢æ•°setterãŒå‘¼ã°ã‚Œã‚‹ï¼Žhookを指定ã—ãªã„å ´åˆã¯getterã‚„
+setterã«0を指定ã—ã¾ã™ï¼Ž
+# getterã‚‚setterã‚‚0ãªã‚‰ã°rb_define_variable()ã¨åŒã˜ã«ãªã‚‹ï¼Ž
+
+getterã¨setterã®ä»•æ§˜ã¯æ¬¡ã®é€šã‚Šã§ã™ï¼Ž
+
+ VALUE (*getter)(ID id, VALUE *var);
+ void (*setter)(VALUE val, ID id, VALUE *var);
+
+
+ãれã‹ã‚‰ï¼Œå¯¾å¿œã™ã‚‹Cã®å¤‰æ•°ã‚’æŒãŸãªã„Rubyã®å¤§åŸŸå¤‰æ•°ã‚’定義ã™ã‚‹
+ã“ã¨ã‚‚ã§ãã¾ã™. ãã®å¤‰æ•°ã®å€¤ã¯ãƒ•ック関数ã®ã¿ã«ã‚ˆã£ã¦å–得・設定
+ã•れã¾ã™.
+
+ void rb_define_virtual_variable(const char *name,
+ VALUE (*getter)(), void (*setter)())
+
+ã“ã®é–¢æ•°ã«ã‚ˆã£ã¦å®šç¾©ã•れãŸRubyã®å¤§åŸŸå¤‰æ•°ãŒå‚ç…§ã•ã‚ŒãŸæ™‚ã«ã¯
+getterãŒï¼Œå¤‰æ•°ã«å€¤ãŒã‚»ãƒƒãƒˆã•ã‚ŒãŸæ™‚ã«ã¯setterãŒå‘¼ã°ã‚Œã¾ã™ï¼Ž
+
+getterã¨setterã®ä»•様ã¯ä»¥ä¸‹ã®é€šã‚Šã§ã™ï¼Ž
+
+ (*getter)(ID id);
+ (*setter)(VALUE val, ID id);
+
+3.3 Cã®ãƒ‡ãƒ¼ã‚¿ã‚’Rubyオブジェクトã«ã™ã‚‹
+
+Cã®ä¸–界ã§å®šç¾©ã•れãŸãƒ‡ãƒ¼ã‚¿(構造体)ã‚’Rubyã®ã‚ªãƒ–ジェクトã¨ã—ã¦
+å–り扱ã„ãŸã„å ´åˆãŒã‚りãˆã¾ã™ï¼Žã“ã®ã‚ˆã†ãªå ´åˆã«ã¯ï¼ŒDataã¨ã„ã†
+Rubyオブジェクトã«Cã®æ§‹é€ ä½“(ã¸ã®ãƒã‚¤ãƒ³ã‚¿)ã‚’ãã‚‹ã‚€ã“ã¨ã§Ruby
+オブジェクトã¨ã—ã¦å–り扱ãˆã‚‹ã‚ˆã†ã«ãªã‚Šã¾ã™ï¼Ž
+
+Dataオブジェクトを生æˆã—ã¦æ§‹é€ ä½“ã‚’Rubyオブジェクトã«ã‚«ãƒ—セル
+化ã™ã‚‹ãŸã‚ã«ã¯ï¼Œä»¥ä¸‹ã®ãƒžã‚¯ãƒ­ã‚’使ã„ã¾ã™ï¼Ž
+
+ Data_Wrap_Struct(klass, mark, free, sval)
+
+ã“ã®ãƒžã‚¯ãƒ­ã®æˆ»ã‚Šå€¤ã¯ç”Ÿæˆã•れãŸDataオブジェクトã§ã™ï¼Ž
+
+klassã¯ã“ã®Dataオブジェクトã®ã‚¯ãƒ©ã‚¹ã§ã™ï¼Žptrã¯ã‚«ãƒ—セル化ã™ã‚‹
+Cã®æ§‹é€ ä½“ã¸ã®ãƒã‚¤ãƒ³ã‚¿ã§ã™ï¼Žmarkã¯ã“ã®æ§‹é€ ä½“ãŒRubyã®ã‚ªãƒ–ジェ
+クトã¸ã®å‚ç…§ãŒã‚る時ã«ä½¿ã†é–¢æ•°ã§ã™ï¼Žãã®ã‚ˆã†ãªå‚ç…§ã‚’å«ã¾ãªã„
+時ã«ã¯0を指定ã—ã¾ã™ï¼Ž
+
+# ãã®ã‚ˆã†ãªå‚ç…§ã¯å‹§ã‚られã¾ã›ã‚“.
+
+freeã¯ã“ã®æ§‹é€ ä½“ãŒã‚‚ã†ä¸è¦ã«ãªã£ãŸæ™‚ã«å‘¼ã°ã‚Œã‚‹é–¢æ•°ã§ã™ï¼Žã“ã®
+関数ãŒã‚¬ãƒ¼ãƒ™ãƒ¼ã‚¸ã‚³ãƒ¬ã‚¯ã‚¿ã‹ã‚‰å‘¼ã°ã‚Œã¾ã™ï¼Žã“れãŒ-1ã®å ´åˆã¯ï¼Œå˜
+ç´”ã«é–‹æ”¾ã•れã¾ã™ï¼Ž
+
+markãŠã‚ˆã³free関数ã¯GC実行中ã«å‘¼ã³å‡ºã•れã¾ã™.
+ãªãŠ, GC実行中ã¯Rubyオブジェクトã®ã‚¢ãƒ­ã‚±ãƒ¼ã‚·ãƒ§ãƒ³ã¯ç¦æ­¢ã•れã¾
+ã™. よã£ã¦, markãŠã‚ˆã³free関数ã§Rubyオブジェクトã®ã‚¢ãƒ­ã‚±ãƒ¼ã‚·
+ョンã¯è¡Œã‚ãªã„ã§ãã ã•ã„.
+
+Cã®æ§‹é€ ä½“ã®å‰²å½“ã¨Dataオブジェクトã®ç”Ÿæˆã‚’åŒæ™‚ã«è¡Œã†ãƒžã‚¯ãƒ­ã¨
+ã—ã¦ä»¥ä¸‹ã®ã‚‚ã®ãŒæä¾›ã•れã¦ã„ã¾ã™ï¼Ž
+
+ Data_Make_Struct(klass, type, mark, free, sval)
+
+ã“ã®ãƒžã‚¯ãƒ­ã®æˆ»ã‚Šå€¤ã¯ç”Ÿæˆã•れãŸDataオブジェクトã§ã™ï¼Ž
+
+klass, mark, freeã¯Data_Wrap_Structã¨åŒã˜åƒãã‚’ã—ã¾ã™ï¼Žtype
+ã¯å‰²ã‚Šå½“ã¦ã‚‹C構造体ã®åž‹ã§ã™ï¼Žå‰²ã‚Šå½“ã¦ã‚‰ã‚ŒãŸæ§‹é€ ä½“ã¯å¤‰æ•°sval
+ã«ä»£å…¥ã•れã¾ã™ï¼Žã“ã®å¤‰æ•°ã®åž‹ã¯ (type*) ã§ã‚ã‚‹å¿…è¦ãŒã‚りã¾ã™ï¼Ž
+
+Dataオブジェクトã‹ã‚‰ãƒã‚¤ãƒ³ã‚¿ã‚’å–り出ã™ã®ã¯ä»¥ä¸‹ã®ãƒžã‚¯ãƒ­ã‚’用ã„
+ã¾ã™ï¼Ž
+
+ Data_Get_Struct(obj, type, sval)
+
+Cã®æ§‹é€ ä½“ã¸ã®ãƒã‚¤ãƒ³ã‚¿ã¯å¤‰æ•°svalã«ä»£å…¥ã•れã¾ã™ï¼Ž
+
+ã“れらã®Dataã®ä½¿ã„æ–¹ã¯ã¡ã‚‡ã£ã¨åˆ†ã‹ã‚Šã«ãã„ã®ã§ï¼Œå¾Œã§èª¬æ˜Žã™ã‚‹
+例題をå‚ç…§ã—ã¦ãã ã•ã„.
+
+4.例題 - dbmパッケージを作る
+
+ã“ã“ã¾ã§ã®èª¬æ˜Žã§ã¨ã‚Šã‚ãˆãšæ‹¡å¼µãƒ©ã‚¤ãƒ–ãƒ©ãƒªã¯ä½œã‚Œã‚‹ã¯ãšã§ã™ï¼Ž
+Rubyã®extディレクトリã«ã™ã§ã«å«ã¾ã‚Œã¦ã„ã‚‹dbmライブラリを例ã«
+ã—ã¦æ®µéšŽçš„ã«èª¬æ˜Žã—ã¾ã™ï¼Ž
+
+(1) ディレクトリを作る
+
+ % mkdir ext/dbm
+
+Ruby 1.1ã‹ã‚‰ã¯ä»»æ„ã®ãƒ‡ã‚£ãƒ¬ã‚¯ãƒˆãƒªã§ãƒ€ã‚¤ãƒŠãƒŸãƒƒã‚¯ãƒ©ã‚¤ãƒ–ラリを作
+ã‚‹ã“ã¨ãŒã§ãるよã†ã«ãªã‚Šã¾ã—ãŸï¼ŽRubyã«é™çš„ã«ãƒªãƒ³ã‚¯ã™ã‚‹å ´åˆã«
+ã¯Rubyを展開ã—ãŸãƒ‡ã‚£ãƒ¬ã‚¯ãƒˆãƒªã®ä¸‹ï¼Œextディレクトリã®ä¸­ã«æ‹¡å¼µ
+ライブラリ用ã®ãƒ‡ã‚£ãƒ¬ã‚¯ãƒˆãƒªã‚’作る必è¦ãŒã‚りã¾ã™ï¼Žåå‰ã¯é©å½“ã«
+é¸ã‚“ã§æ§‹ã„ã¾ã›ã‚“.
+
+(2) 設計ã™ã‚‹
+
+ã¾ã‚,当然ãªã‚“ã§ã™ã‘ã©ï¼Œã©ã†ã„ã†æ©Ÿèƒ½ã‚’実ç¾ã™ã‚‹ã‹ã©ã†ã‹ã¾ãšè¨­
+計ã™ã‚‹å¿…è¦ãŒã‚りã¾ã™ï¼Žã©ã‚“ãªã‚¯ãƒ©ã‚¹ã‚’ã¤ãã‚‹ã‹ï¼Œãã®ã‚¯ãƒ©ã‚¹ã«ã¯
+ã©ã‚“ãªãƒ¡ã‚½ãƒƒãƒ‰ãŒã‚ã‚‹ã‹ï¼Œã‚¯ãƒ©ã‚¹ãŒæä¾›ã™ã‚‹å®šæ•°ãªã©ã«ã¤ã„ã¦è¨­è¨ˆ
+ã—ã¾ã™ï¼Ž
+
+(3) Cコードを書ã
+
+拡張ライブラリ本体ã¨ãªã‚‹C言語ã®ã‚½ãƒ¼ã‚¹ã‚’書ãã¾ã™ï¼ŽC言語ã®ã‚½ãƒ¼
+スãŒã²ã¨ã¤ã®æ™‚ã«ã¯ã€Œãƒ©ã‚¤ãƒ–ラリå.cã€ã‚’é¸ã¶ã¨è‰¯ã„ã§ã—ょã†ï¼ŽC
+言語ã®ã‚½ãƒ¼ã‚¹ãŒè¤‡æ•°ã®å ´åˆã«ã¯é€†ã«ã€Œãƒ©ã‚¤ãƒ–ラリå.cã€ã¨ã„ã†ãƒ•ã‚¡
+イルåã¯é¿ã‘ã‚‹å¿…è¦ãŒã‚りã¾ã™ï¼Žã‚ªãƒ–ジェクトファイルã¨ãƒ¢ã‚¸ãƒ¥ãƒ¼
+ãƒ«ç”Ÿæˆæ™‚ã«ä¸­é–“çš„ã«ç”Ÿæˆã•れる「ライブラリå.oã€ã¨ã„ã†ãƒ•ァイル
+ã¨ãŒè¡çªã™ã‚‹ã‹ã‚‰ã§ã™ï¼Žã¾ãŸï¼Œå¾Œè¿°ã™ã‚‹ mkmf ライブラリã®ã„ãã¤
+ã‹ã®é–¢æ•°ãŒã‚³ãƒ³ãƒ‘イルをè¦ã™ã‚‹ãƒ†ã‚¹ãƒˆã®ãŸã‚ã«ã€Œconftest.cã€ã¨ã„
+ã†ãƒ•ァイルåを使用ã™ã‚‹ã“ã¨ã«æ³¨æ„ã—ã¦ãã ã•ã„.ソースファイル
+åã¨ã—ã¦ã€Œconftest.cã€ã‚’使用ã—ã¦ã¯ãªã‚Šã¾ã›ã‚“.
+
+Rubyã¯æ‹¡å¼µãƒ©ã‚¤ãƒ–ラリをロードã™ã‚‹æ™‚ã«ã€ŒInit_ライブラリåã€ã¨
+ã„ã†é–¢æ•°ã‚’自動的ã«å®Ÿè¡Œã—ã¾ã™ï¼Ždbmライブラリã®å ´åˆã€ŒInit_dbmã€
+ã§ã™ï¼Žã“ã®é–¢æ•°ã®ä¸­ã§ã‚¯ãƒ©ã‚¹ï¼Œãƒ¢ã‚¸ãƒ¥ãƒ¼ãƒ«ï¼Œãƒ¡ã‚½ãƒƒãƒ‰ï¼Œå®šæ•°ãªã©ã®
+定義を行ã„ã¾ã™ï¼Ždbm.cã‹ã‚‰ä¸€éƒ¨å¼•用ã—ã¾ã™ï¼Ž
+
+--
+void
+Init_dbm(void)
+{
+ /* DBMクラスを定義ã™ã‚‹ */
+ cDBM = rb_define_class("DBM", rb_cObject);
+ /* DBMã¯Enumerateモジュールをインクルードã™ã‚‹ */
+ rb_include_module(cDBM, rb_mEnumerable);
+
+ /* DBMクラスã®ã‚¯ãƒ©ã‚¹ãƒ¡ã‚½ãƒƒãƒ‰open(): 引数ã¯Cã®é…列ã§å—ã‘ã‚‹ */
+ rb_define_singleton_method(cDBM, "open", fdbm_s_open, -1);
+
+ /* DBMクラスã®ãƒ¡ã‚½ãƒƒãƒ‰close(): 引数ã¯ãªã— */
+ rb_define_method(cDBM, "close", fdbm_close, 0);
+ /* DBMクラスã®ãƒ¡ã‚½ãƒƒãƒ‰[]: 引数ã¯1個 */
+ rb_define_method(cDBM, "[]", fdbm_fetch, 1);
+ :
+
+ /* DBMデータを格ç´ã™ã‚‹ã‚¤ãƒ³ã‚¹ã‚¿ãƒ³ã‚¹å¤‰æ•°åã®ãŸã‚ã®ID */
+ id_dbm = rb_intern("dbm");
+}
+--
+
+DBMライブラリã¯dbmã®ãƒ‡ãƒ¼ã‚¿ã¨å¯¾å¿œã™ã‚‹ã‚ªãƒ–ジェクトã«ãªã‚‹ã¯ãšã§
+ã™ã‹ã‚‰ï¼ŒCã®ä¸–界ã®dbmã‚’Rubyã®ä¸–界ã«å–り込む必è¦ãŒã‚りã¾ã™ï¼Ž
+
+
+dbm.cã§ã¯Data_Make_Structを以下ã®ã‚ˆã†ã«ä½¿ã£ã¦ã„ã¾ã™ï¼Ž
+
+--
+struct dbmdata {
+ int di_size;
+ DBM *di_dbm;
+};
+
+
+obj = Data_Make_Struct(klass, struct dbmdata, 0, free_dbm, dbmp);
+--
+
+ã“ã“ã§ã¯dbmstruct構造体ã¸ã®ãƒã‚¤ãƒ³ã‚¿ã‚’Dataã«ã‚«ãƒ—セル化ã—ã¦ã„
+ã¾ã™ï¼ŽDBM*を直接カプセル化ã—ãªã„ã®ã¯close()ã—ãŸæ™‚ã®å‡¦ç†ã‚’考
+ãˆã¦ã®ã“ã¨ã§ã™ï¼Ž
+
+Dataオブジェクトã‹ã‚‰dbmstruct構造体ã®ãƒã‚¤ãƒ³ã‚¿ã‚’å–り出ã™ãŸã‚
+ã«ä»¥ä¸‹ã®ãƒžã‚¯ãƒ­ã‚’使ã£ã¦ã„ã¾ã™ï¼Ž
+
+--
+#define GetDBM(obj, dbmp) {\
+ Data_Get_Struct(obj, struct dbmdata, dbmp);\
+ if (dbmp->di_dbm == 0) closed_dbm();\
+}
+--
+
+ã¡ã‚‡ã£ã¨è¤‡é›‘ãªãƒžã‚¯ãƒ­ã§ã™ãŒï¼Œè¦ã™ã‚‹ã«dbmdata構造体ã®ãƒã‚¤ãƒ³ã‚¿
+ã®å–り出ã—ã¨ï¼Œcloseã•れã¦ã„ã‚‹ã‹ã©ã†ã‹ã®ãƒã‚§ãƒƒã‚¯ã‚’ã¾ã¨ã‚ã¦ã„
+ã‚‹ã ã‘ã§ã™ï¼Ž
+
+DBMクラスã«ã¯ãŸãã•んメソッドãŒã‚りã¾ã™ãŒï¼Œåˆ†é¡žã™ã‚‹ã¨3種類ã®
+引数ã®å—ã‘æ–¹ãŒã‚りã¾ã™ï¼Žã²ã¨ã¤ã¯å¼•æ•°ã®æ•°ãŒå›ºå®šã®ã‚‚ã®ã§ï¼Œä¾‹ã¨
+ã—ã¦ã¯deleteメソッドãŒã‚りã¾ã™ï¼Ždeleteメソッドを実装ã—ã¦ã„ã‚‹
+fdbm_delete()ã¯ã“ã®ã‚ˆã†ã«ãªã£ã¦ã„ã¾ã™ï¼Ž
+
+--
+static VALUE
+fdbm_delete(VALUE obj, VALUE keystr)
+{
+ :
+}
+--
+
+å¼•æ•°ã®æ•°ãŒå›ºå®šã®ã‚¿ã‚¤ãƒ—ã¯ç¬¬1引数ãŒself,第2引数以é™ãŒãƒ¡ã‚½ãƒƒãƒ‰
+ã®å¼•æ•°ã¨ãªã‚Šã¾ã™ï¼Ž
+
+å¼•æ•°ã®æ•°ãŒä¸å®šã®ã‚‚ã®ã¯Cã®é…列ã§å—ã‘ã‚‹ã‚‚ã®ã¨Rubyã®é…列ã§å—ã‘
+ã‚‹ã‚‚ã®ã¨ãŒã‚りã¾ã™ï¼Ždbmライブラリã®ä¸­ã§ï¼ŒCã®é…列ã§å—ã‘ã‚‹ã‚‚ã®
+ã¯DBMã®ã‚¯ãƒ©ã‚¹ãƒ¡ã‚½ãƒƒãƒ‰ã§ã‚ã‚‹open()ã§ã™ï¼Žã“れを実装ã—ã¦ã„ã‚‹é–¢
+æ•°fdbm_s_open()ã¯ã“ã†ãªã£ã¦ã„ã¾ã™ï¼Ž
+
+--
+static VALUE
+fdbm_s_open(int argc, VALUE *argv, VALUE klass)
+{
+ :
+ if (rb_scan_args(argc, argv, "11", &file, &vmode) == 1) {
+ mode = 0666; /* default value */
+ }
+ :
+}
+--
+
+ã“ã®ã‚¿ã‚¤ãƒ—ã®é–¢æ•°ã¯ç¬¬1引数ãŒä¸Žãˆã‚‰ã‚ŒãŸå¼•æ•°ã®æ•°ï¼Œç¬¬2引数ãŒä¸Žãˆ
+られãŸå¼•æ•°ã®å…¥ã£ã¦ã„ã‚‹é…列ã«ãªã‚Šã¾ã™ï¼Žselfã¯ç¬¬3引数ã¨ã—ã¦ä¸Ž
+ãˆã‚‰ã‚Œã¾ã™ï¼Ž
+
+ã“ã®é…列ã§ä¸Žãˆã‚‰ã‚ŒãŸå¼•æ•°ã‚’è§£æžã™ã‚‹ãŸã‚ã®é–¢æ•°ãŒopen()ã§ã‚‚使ã‚
+れã¦ã„ã‚‹rb_scan_args()ã§ã™ï¼Žç¬¬3å¼•æ•°ã«æŒ‡å®šã—ãŸãƒ•ォーマットã«å¾“
+ã„,第4変数以é™ã«æŒ‡å®šã—ãŸVALUEã¸ã®å‚ç…§ã«å€¤ã‚’代入ã—ã¦ãれã¾
+ã™ï¼Ž
+
+
+引数をRubyã®é…列ã¨ã—ã¦å—ã‘å–るメソッドã®ä¾‹ã«ã¯
+Thread#initializeãŒã‚りã¾ã™ï¼Žå®Ÿè£…ã¯ã“ã†ã§ã™ï¼Ž
+
+--
+static VALUE
+thread_initialize(VALUE thread, VALUE args)
+{
+ :
+}
+--
+
+第1引数ã¯self,第2引数ã¯Rubyã®é…列ã§ã™ï¼Ž
+
+** 注æ„事項
+
+Rubyã¨å…±æœ‰ã¯ã—ãªã„ãŒRubyã®ã‚ªãƒ–ジェクトを格ç´ã™ã‚‹å¯èƒ½æ€§ã®ã‚ã‚‹
+Cã®å¤§åŸŸå¤‰æ•°ã¯ä»¥ä¸‹ã®é–¢æ•°ã‚’使ã£ã¦Rubyインタプリタã«å¤‰æ•°ã®å­˜åœ¨
+ã‚’æ•™ãˆã¦ã‚ã’ã¦ãã ã•ã„.ã§ãªã„ã¨GCã§ãƒˆãƒ©ãƒ–ルを起ã“ã—ã¾ã™ï¼Ž
+
+ void rb_global_variable(VALUE *var)
+
+(4) extconf.rbを用æ„ã™ã‚‹
+
+Makefileを作る場åˆã®é››åž‹ã«ãªã‚‹extconf.rbã¨ã„ã†ãƒ•ァイルを作り
+ã¾ã™ï¼Žextconf.rbã¯ãƒ©ã‚¤ãƒ–ラリã®ã‚³ãƒ³ãƒ‘イルã«å¿…è¦ãªæ¡ä»¶ã®ãƒã‚§ãƒƒ
+クãªã©ã‚’行ã†ã“ã¨ãŒç›®çš„ã§ã™ï¼Žã¾ãšï¼Œ
+
+ require 'mkmf'
+
+ã‚’extconf.rbã®å…ˆé ­ã«ç½®ãã¾ã™ï¼Žextconf.rbã®ä¸­ã§ã¯ä»¥ä¸‹ã®Rubyé–¢
+数を使ã†ã“ã¨ãŒå‡ºæ¥ã¾ã™ï¼Ž
+
+ have_library(lib, func): ライブラリã®å­˜åœ¨ãƒã‚§ãƒƒã‚¯
+ have_func(func, header): 関数ã®å­˜åœ¨ãƒã‚§ãƒƒã‚¯
+ have_header(header): ヘッダファイルã®å­˜åœ¨ãƒã‚§ãƒƒã‚¯
+ create_makefile(target[, target_prefix]): Makefileã®ç”Ÿæˆ
+
+以下ã®å¤‰æ•°ã‚’使ã†ã“ã¨ãŒã§ãã¾ã™ï¼Ž
+
+ $CFLAGS: コンパイル時ã«è¿½åŠ çš„ã«æŒ‡å®šã™ã‚‹ãƒ•ラグ(-Oãªã©)
+ $CPPFLAGS: プリプロセッサã«è¿½åŠ çš„ã«æŒ‡å®šã™ã‚‹ãƒ•ラグ(-Iã‚„-Dãªã©)
+ $LDFLAGS: リンク時ã«è¿½åŠ çš„ã«æŒ‡å®šã™ã‚‹ãƒ•ラグ(-Lãªã©)
+ $objs: リンクã•れるオブジェクトファイルåã®ãƒªã‚¹ãƒˆ
+
+オブジェクトファイルã®ãƒªã‚¹ãƒˆã¯ï¼Œé€šå¸¸ã¯ã‚½ãƒ¼ã‚¹ãƒ•ァイルを検索ã—
+ã¦è‡ªå‹•çš„ã«ç”Ÿæˆã•れã¾ã™ãŒï¼Œmakeã®é€”中ã§ã‚½ãƒ¼ã‚¹ã‚’生æˆã™ã‚‹ã‚ˆã†ãª
+å ´åˆã¯æ˜Žç¤ºçš„ã«æŒ‡å®šã™ã‚‹å¿…è¦ãŒã‚りã¾ã™ï¼Ž
+
+ライブラリをコンパイルã™ã‚‹æ¡ä»¶ãŒæƒã‚ãšï¼Œãã®ãƒ©ã‚¤ãƒ–ラリをコン
+パイルã—ãªã„時ã«ã¯create_makefileを呼ã°ãªã‘れã°Makefileã¯ç”Ÿ
+æˆã•れãšï¼Œã‚³ãƒ³ãƒ‘イルも行ã‚れã¾ã›ã‚“.
+
+(5) dependを用æ„ã™ã‚‹
+
+ã‚‚ã—,ディレクトリã«dependã¨ã„ã†ãƒ•ァイルãŒå­˜åœ¨ã™ã‚Œã°ï¼Œ
+MakefileãŒä¾å­˜é–¢ä¿‚ã‚’ãƒã‚§ãƒƒã‚¯ã—ã¦ãれã¾ã™ï¼Ž
+
+ % gcc -MM *.c > depend
+
+ãªã©ã§ä½œã‚‹ã“ã¨ãŒå‡ºæ¥ã¾ã™ï¼Žã‚ã£ã¦æã¯ç„¡ã„ã§ã—ょã†ï¼Ž
+
+(6) Makefileを生æˆã™ã‚‹
+
+Makefileを実際ã«ç”Ÿæˆã™ã‚‹ãŸã‚ã«ã¯
+
+ ruby extconf.rb
+
+ã¨ã—ã¾ã™ï¼Žextconf.rbã« require 'mkmf' ã®è¡ŒãŒãªã„å ´åˆã«ã¯ã‚¨ãƒ©ãƒ¼
+ã«ãªã‚Šã¾ã™ã®ã§ï¼Œå¼•数を追加ã—ã¦
+
+ ruby -r mkmf extconf.rb
+
+ã¨ã—ã¦ãã ã•ã„.
+
+site_ruby ディレクトリã§ãªã,
+vendor_ruby ディレクトリã«ã‚¤ãƒ³ã‚¹ãƒˆãƒ¼ãƒ«ã™ã‚‹å ´åˆã«ã¯
+以下ã®ã‚ˆã†ã« --vendor オプションを加ãˆã¦ãã ã•ã„.
+
+ ruby extconf.rb --vendor
+
+ディレクトリをext以下ã«ç”¨æ„ã—ãŸå ´åˆã«ã¯Ruby全体ã®makeã®æ™‚ã«
+自動的ã«MakefileãŒç”Ÿæˆã•れã¾ã™ã®ã§ï¼Œã“ã®ã‚¹ãƒ†ãƒƒãƒ—ã¯ä¸è¦ã§ã™ï¼Ž
+
+(7) makeã™ã‚‹
+
+動的リンクライブラリを生æˆã™ã‚‹å ´åˆã«ã¯ãã®å ´ã§makeã—ã¦ãã ã•
+ã„.必è¦ã§ã‚れ㰠make install ã§ã‚¤ãƒ³ã‚¹ãƒˆãƒ¼ãƒ«ã•れã¾ã™ï¼Ž
+
+ext以下ã«ãƒ‡ã‚£ãƒ¬ã‚¯ãƒˆãƒªã‚’用æ„ã—ãŸå ´åˆã¯ï¼ŒRubyã®ãƒ‡ã‚£ãƒ¬ã‚¯ãƒˆãƒªã§
+makeを実行ã™ã‚‹ã¨Makefileを生æˆã‹ã‚‰make,必è¦ã«ã‚ˆã£ã¦ã¯ãã®ãƒ¢
+ジュールã®Rubyã¸ã®ãƒªãƒ³ã‚¯ã¾ã§è‡ªå‹•çš„ã«å®Ÿè¡Œã—ã¦ãれã¾ã™ï¼Ž
+extconf.rbã‚’æ›¸ãæ›ãˆã‚‹ãªã©ã—ã¦Makefileã®å†ç”ŸæˆãŒå¿…è¦ãªæ™‚ã¯ã¾
+ãŸRubyディレクトリã§makeã—ã¦ãã ã•ã„.
+
+拡張ライブラリã¯make installã§Rubyライブラリã®ãƒ‡ã‚£ãƒ¬ã‚¯ãƒˆãƒªã®
+下ã«ã‚³ãƒ”ーã•れã¾ã™ï¼Žã‚‚ã—æ‹¡å¼µãƒ©ã‚¤ãƒ–ラリã¨å”調ã—ã¦ä½¿ã†Rubyã§è¨˜
+è¿°ã•れãŸãƒ—ログラムãŒã‚り,Rubyライブラリã«ç½®ããŸã„å ´åˆã«ã¯ï¼Œ
+拡張ライブラリ用ã®ãƒ‡ã‚£ãƒ¬ã‚¯ãƒˆãƒªã®ä¸‹ã« lib ã¨ã„ã†ãƒ‡ã‚£ãƒ¬ã‚¯ãƒˆãƒª
+を作り,ãã“ã« æ‹¡å¼µå­ .rb ã®ãƒ•ァイルを置ã„ã¦ãŠã‘ã°åŒæ™‚ã«ã‚¤ãƒ³
+ストールã•れã¾ã™ï¼Ž
+
+(8) デãƒãƒƒã‚°
+
+ã¾ã‚,デãƒãƒƒã‚°ã—ãªã„ã¨å‹•ã‹ãªã„ã§ã—ょã†ã­ï¼Žext/Setupã«ãƒ‡ã‚£ãƒ¬
+クトリåを書ãã¨é™çš„ã«ãƒªãƒ³ã‚¯ã™ã‚‹ã®ã§ãƒ‡ãƒãƒƒã‚¬ãŒä½¿ãˆã‚‹ã‚ˆã†ã«ãª
+りã¾ã™ï¼Žãã®åˆ†ã‚³ãƒ³ãƒ‘イルãŒé…ããªã‚Šã¾ã™ã‘ã©ï¼Ž
+
+(9) ã§ãã‚ãŒã‚Š
+
+後ã¯ã“ã£ãり使ã†ãªã‚Šï¼Œåºƒã公開ã™ã‚‹ãªã‚Šï¼Œå£²ã‚‹ãªã‚Šï¼Œã”自由ã«ãŠ
+使ã„ãã ã•ã„.Rubyã®ä½œè€…ã¯æ‹¡å¼µãƒ©ã‚¤ãƒ–ラリã«é–¢ã—ã¦ä¸€åˆ‡ã®æ¨©åˆ©ã‚’
+主張ã—ã¾ã›ã‚“.
+
+Appendix A. Rubyã®ã‚½ãƒ¼ã‚¹ã‚³ãƒ¼ãƒ‰ã®åˆ†é¡ž
+
+Rubyã®ã‚½ãƒ¼ã‚¹ã¯ã„ãã¤ã‹ã«åˆ†é¡žã™ã‚‹ã“ã¨ãŒå‡ºæ¥ã¾ã™ï¼Žã“ã®ã†ã¡ã‚¯ãƒ©
+スライブラリã®éƒ¨åˆ†ã¯åŸºæœ¬çš„ã«æ‹¡å¼µãƒ©ã‚¤ãƒ–ラリã¨åŒã˜ä½œã‚Šæ–¹ã«ãªã£
+ã¦ã„ã¾ã™ï¼Žã“れらã®ã‚½ãƒ¼ã‚¹ã¯ä»Šã¾ã§ã®èª¬æ˜Žã§ã»ã¨ã‚“ã©ç†è§£ã§ãã‚‹ã¨
+æ€ã„ã¾ã™ï¼Ž
+
+Ruby言語ã®ã‚³ã‚¢
+
+ class.c : クラスã¨ãƒ¢ã‚¸ãƒ¥ãƒ¼ãƒ«
+ error.c : 例外クラスã¨ä¾‹å¤–機構
+ gc.c : 記憶領域管ç†
+ load.c : ライブラリã®ãƒ­ãƒ¼ãƒ‰
+ object.c : オブジェクト
+ variable.c : 変数ã¨å®šæ•°
+
+Rubyã®æ§‹æ–‡è§£æžå™¨
+ parse.y : å­—å¥è§£æžå™¨ã¨æ§‹æ–‡å®šç¾©
+ -> parse.c : 自動生æˆ
+ keywords : 予約語
+ -> lex.c : 自動生æˆ
+
+Rubyã®è©•価器 (通称YARV)
+ compile.c
+ eval.c
+ eval_error.c
+ eval_jump.c
+ eval_safe.c
+ insns.def : 仮想機械語ã®å®šç¾©
+ iseq.c : VM::ISeqã®å®Ÿè£…
+ thread.c : スレッド管ç†ã¨ã‚³ãƒ³ãƒ†ã‚­ã‚¹ãƒˆåˆ‡ã‚Šæ›¿ãˆ
+ thread_win32.c : スレッド実装
+ thread_pthread.c : åŒä¸Š
+ vm.c
+ vm_dump.c
+ vm_eval.c
+ vm_exec.c
+ vm_insnhelper.c
+ vm_method.c
+
+ opt_insns_unif.def : 命令èžåˆ
+ opt_operand.def : 最é©åŒ–ã®ãŸã‚ã®å®šç¾©
+
+ -> insn*.inc : 自動生æˆ
+ -> opt*.inc : 自動生æˆ
+ -> vm.inc : 自動生æˆ
+
+æ­£è¦è¡¨ç¾ã‚¨ãƒ³ã‚¸ãƒ³ (鬼車)
+ regex.c
+ regcomp.c
+ regenc.c
+ regerror.c
+ regexec.c
+ regparse.c
+ regsyntax.c
+
+ユーティリティ関数
+
+ debug.c : Cデãƒãƒƒã‚¬ç”¨ã®ãƒ‡ãƒãƒƒã‚°ã‚·ãƒ³ãƒœãƒ«
+ dln.c : 動的ローディング
+ st.c : 汎用ãƒãƒƒã‚·ãƒ¥è¡¨
+ strftime.c : 時刻整形
+ util.c : ãã®ä»–ã®ãƒ¦ãƒ¼ãƒ†ã‚£ãƒªãƒ†ã‚£
+
+Rubyコマンドã®å®Ÿè£…
+
+ dmyext.c
+ dmydln.c
+ dmyencoding.c
+ id.c
+ inits.c
+ main.c
+ ruby.c
+ version.c
+
+ gem_prelude.rb
+ prelude.rb
+
+クラスライブラリ
+
+ array.c : Array
+ bignum.c : Bignum
+ compar.c : Comparable
+ complex.c : Complex
+ cont.c : Fiber, Continuation
+ dir.c : Dir
+ enum.c : Enumerable
+ enumerator.c : Enumerator
+ file.c : File
+ hash.c : Hash
+ io.c : IO
+ marshal.c : Marshal
+ math.c : Math
+ numeric.c : Numeric, Integer, Fixnum, Float
+ pack.c : Array#pack, String#unpack
+ proc.c : Binding, Proc
+ process.c : Process
+ random.c : 乱数
+ range.c : Range
+ rational.c : Rational
+ re.c : Regexp, MatchData
+ signal.c : Signal
+ sprintf.c :
+ string.c : String
+ struct.c : Struct
+ time.c : Time
+
+ defs/known_errors.def : 例外クラス Errno::*
+ -> known_errors.inc : 自動生æˆ
+
+多言語化
+ encoding.c : Encoding
+ transcode.c : Encoding::Converter
+ enc/*.c : エンコーディングクラス群
+ enc/trans/* : コードãƒã‚¤ãƒ³ãƒˆå¯¾å¿œè¡¨
+
+gorubyコマンドã®å®Ÿè£…
+
+ goruby.c
+ golf_prelude.rb : goruby固有ã®ãƒ©ã‚¤ãƒ–ラリ
+ -> golf_prelude.c : 自動生æˆ
+
+
+Appendix B. 拡張用関数リファレンス
+
+C言語ã‹ã‚‰Rubyã®æ©Ÿèƒ½ã‚’利用ã™ã‚‹APIã¯ä»¥ä¸‹ã®é€šã‚Šã§ã‚る.
+
+** åž‹
+
+VALUE
+
+ Rubyオブジェクトを表ç¾ã™ã‚‹åž‹ï¼Žå¿…è¦ã«å¿œã˜ã¦ã‚­ãƒ£ã‚¹ãƒˆã—ã¦ç”¨ã„る.
+ 組ã¿è¾¼ã¿åž‹ã‚’表ç¾ã™ã‚‹Cã®åž‹ã¯ruby.hã«è¨˜è¿°ã—ã¦ã‚ã‚‹Rã§å§‹ã¾ã‚‹æ§‹é€ 
+ 体ã§ã‚る.VALUE型をã“れらã«ã‚­ãƒ£ã‚¹ãƒˆã™ã‚‹ãŸã‚ã«Rã§å§‹ã¾ã‚‹æ§‹é€ ä½“
+ åã‚’å…¨ã¦å¤§æ–‡å­—ã«ã—ãŸåå‰ã®ãƒžã‚¯ãƒ­ãŒç”¨æ„ã•れã¦ã„る.
+
+** 変数・定数
+
+Qnil
+
+ 定数: nilオブジェクト
+
+Qtrue
+
+ 定数: trueオブジェクト(真ã®ãƒ‡ãƒ•ォルト値)
+
+Qfalse
+
+ 定数: falseオブジェクト
+
+** Cデータã®ã‚«ãƒ—セル化
+
+Data_Wrap_Struct(VALUE klass, void (*mark)(), void (*free)(), void *sval)
+
+ Cã®ä»»æ„ã®ãƒã‚¤ãƒ³ã‚¿ã‚’カプセル化ã—ãŸRubyオブジェクトを返ã™ï¼Žã“
+ ã®ãƒã‚¤ãƒ³ã‚¿ãŒRubyã‹ã‚‰ã‚¢ã‚¯ã‚»ã‚¹ã•れãªããªã£ãŸæ™‚,freeã§æŒ‡å®šã—ãŸ
+ 関数ãŒå‘¼ã°ã‚Œã‚‹ï¼Žã¾ãŸï¼Œã“ã®ãƒã‚¤ãƒ³ã‚¿ã®æŒ‡ã™ãƒ‡ãƒ¼ã‚¿ãŒä»–ã®Rubyオブ
+ ジェクトを指ã—ã¦ã„ã‚‹å ´åˆï¼Œmarkã«æŒ‡å®šã™ã‚‹é–¢æ•°ã§ãƒžãƒ¼ã‚¯ã™ã‚‹å¿…è¦
+ ãŒã‚る.
+
+Data_Make_Struct(klass, type, mark, free, sval)
+
+ typeåž‹ã®ãƒ¡ãƒ¢ãƒªã‚’mallocã—,変数svalã«ä»£å…¥ã—ãŸå¾Œï¼Œãれをカプセ
+ ル化ã—ãŸãƒ‡ãƒ¼ã‚¿ã‚’è¿”ã™ãƒžã‚¯ãƒ­ï¼Ž
+
+Data_Get_Struct(data, type, sval)
+
+ dataã‹ã‚‰typeåž‹ã®ãƒã‚¤ãƒ³ã‚¿ã‚’å–り出ã—変数svalã«ä»£å…¥ã™ã‚‹ãƒžã‚¯ãƒ­ï¼Ž
+
+** åž‹ãƒã‚§ãƒƒã‚¯
+
+TYPE(value)
+FIXNUM_P(value)
+NIL_P(value)
+void Check_Type(VALUE value, int type)
+void Check_SafeStr(VALUE value)
+
+** 型変æ›
+
+FIX2INT(value), INT2FIX(i)
+FIX2LONG(value), LONG2FIX(l)
+NUM2INT(value), INT2NUM(i)
+NUM2UINT(value), UINT2NUM(ui)
+NUM2LONG(value), LONG2NUM(l)
+NUM2ULONG(value), ULONG2NUM(ul)
+NUM2LL(value), LL2NUM(ll)
+NUM2ULL(value), ULL2NUM(ull)
+NUM2OFFT(value), OFFT2NUM(off)
+NUM2SIZET(value), SIZET2NUM(size)
+NUM2SSIZET(value), SSIZET2NUM(ssize)
+NUM2DBL(value)
+rb_float_new(f)
+StringValue(value)
+StringValuePtr(value)
+StringValueCStr(value)
+rb_str_new2(s)
+
+** クラス/モジュール定義
+
+VALUE rb_define_class(const char *name, VALUE super)
+
+ superã®ã‚µãƒ–クラスã¨ã—ã¦æ–°ã—ã„Rubyクラスを定義ã™ã‚‹ï¼Ž
+
+VALUE rb_define_class_under(VALUE module, const char *name, VALUE super)
+
+ superã®ã‚µãƒ–クラスã¨ã—ã¦æ–°ã—ã„Rubyクラスを定義ã—,moduleã®
+ 定数ã¨ã—ã¦å®šç¾©ã™ã‚‹ï¼Ž
+
+VALUE rb_define_module(const char *name)
+
+ æ–°ã—ã„Rubyモジュールを定義ã™ã‚‹ï¼Ž
+
+VALUE rb_define_module_under(VALUE module, const char *name)
+
+ æ–°ã—ã„Rubyモジュールを定義ã—,moduleã®å®šæ•°ã¨ã—ã¦å®šç¾©ã™ã‚‹ï¼Ž
+
+void rb_include_module(VALUE klass, VALUE module)
+
+ モジュールをインクルードã™ã‚‹ï¼ŽclassãŒã™ã§ã«moduleをインク
+ ルードã—ã¦ã„る時ã«ã¯ä½•ã‚‚ã—ãªã„(多é‡ã‚¤ãƒ³ã‚¯ãƒ«ãƒ¼ãƒ‰ã®ç¦æ­¢).
+
+void rb_extend_object(VALUE object, VALUE module)
+
+ オブジェクトをモジュール(ã§å®šç¾©ã•れã¦ã„るメソッド)ã§æ‹¡å¼µã™ã‚‹ï¼Ž
+
+** 大域変数定義
+
+void rb_define_variable(const char *name, VALUE *var)
+
+ Rubyã¨Cã¨ã§å…±æœ‰ã™ã‚‹ã‚°ãƒ­ãƒ¼ãƒãƒ«å¤‰æ•°ã‚’定義ã™ã‚‹ï¼Žå¤‰æ•°åãŒ`$'ã§
+ å§‹ã¾ã‚‰ãªã„時ã«ã¯è‡ªå‹•çš„ã«è¿½åŠ ã•れる.nameã¨ã—ã¦Rubyã®è­˜åˆ¥å­
+ ã¨ã—ã¦è¨±ã•れãªã„文字(例ãˆã°` ')ã‚’å«ã‚€å ´åˆã«ã¯Rubyプログラ
+ ムã‹ã‚‰ã¯è¦‹ãˆãªããªã‚‹ï¼Ž
+
+void rb_define_readonly_variable(const char *name, VALUE *var)
+
+ Rubyã¨Cã¨ã§å…±æœ‰ã™ã‚‹read onlyã®ã‚°ãƒ­ãƒ¼ãƒãƒ«å¤‰æ•°ã‚’定義ã™ã‚‹ï¼Ž
+ read onlyã§ã‚ã‚‹ã“ã¨ä»¥å¤–ã¯rb_define_variable()ã¨åŒã˜ï¼Ž
+
+void rb_define_virtual_variable(const char *name,
+ VALUE (*getter)(), void (*setter)())
+
+ 関数ã«ã‚ˆã£ã¦å®Ÿç¾ã•れるRuby変数を定義ã™ã‚‹ï¼Žå¤‰æ•°ãŒå‚ç…§ã•れãŸ
+ 時ã«ã¯getterãŒï¼Œå¤‰æ•°ã«å€¤ãŒã‚»ãƒƒãƒˆã•ã‚ŒãŸæ™‚ã«ã¯setterãŒå‘¼ã°ã‚Œ
+ る.
+
+void rb_define_hooked_variable(const char *name, VALUE *var,
+ VALUE (*getter)(), void (*setter)())
+
+ 関数ã«ã‚ˆã£ã¦hookã®ã¤ã‘られãŸã‚°ãƒ­ãƒ¼ãƒãƒ«å¤‰æ•°ã‚’定義ã™ã‚‹ï¼Žå¤‰æ•°
+ ãŒå‚ç…§ã•ã‚ŒãŸæ™‚ã«ã¯getterãŒï¼Œé–¢æ•°ã«å€¤ãŒã‚»ãƒƒãƒˆã•ã‚ŒãŸæ™‚ã«ã¯
+ setterãŒå‘¼ã°ã‚Œã‚‹ï¼Žgetterã‚„setterã«0を指定ã—ãŸæ™‚ã«ã¯hookã‚’
+ 指定ã—ãªã„ã®ã¨åŒã˜äº‹ã«ãªã‚‹ï¼Ž
+
+void rb_global_variable(VALUE *var)
+
+ GCã®ãŸã‚,Rubyプログラムã‹ã‚‰ã¯ã‚¢ã‚¯ã‚»ã‚¹ã•れãªã„ãŒ, Rubyオブ
+ ジェクトをå«ã‚€å¤§åŸŸå¤‰æ•°ã‚’マークã™ã‚‹ï¼Ž
+
+** 定数
+
+void rb_define_const(VALUE klass, const char *name, VALUE val)
+
+ 定数を定義ã™ã‚‹ï¼Ž
+
+void rb_define_global_const(const char *name, VALUE val)
+
+ 大域定数を定義ã™ã‚‹ï¼Ž
+
+ rb_define_const(rb_cObject, name, val)
+
+ ã¨åŒã˜æ„味.
+
+** メソッド定義
+
+rb_define_method(VALUE klass, const char *name, VALUE (*func)(), int argc)
+
+ メソッドを定義ã™ã‚‹ï¼Žargcã¯selfを除ãå¼•æ•°ã®æ•°ï¼ŽargcãŒ-1ã®æ™‚,
+ 関数ã«ã¯å¼•æ•°ã®æ•°(selfã‚’å«ã¾ãªã„)を第1引数, 引数ã®é…列を第2
+ 引数ã¨ã™ã‚‹å½¢å¼ã§ä¸Žãˆã‚‰ã‚Œã‚‹(第3引数ã¯self).argcãŒ-2ã®æ™‚,
+ 第1引数ãŒself, 第2引数ãŒargs(argsã¯å¼•æ•°ã‚’å«ã‚€Rubyã®é…列)ã¨
+ ã„ã†å½¢å¼ã§ä¸Žãˆã‚‰ã‚Œã‚‹ï¼Ž
+
+rb_define_private_method(VALUE klass, const char *name, VALUE (*func)(), int argc)
+
+ privateメソッドを定義ã™ã‚‹ï¼Žå¼•æ•°ã¯rb_define_method()ã¨åŒã˜ï¼Ž
+
+rb_define_singleton_method(VALUE klass, const char *name, VALUE (*func)(), int argc)
+
+ 特異メソッドを定義ã™ã‚‹ï¼Žå¼•æ•°ã¯rb_define_method()ã¨åŒã˜ï¼Ž
+
+rb_scan_args(int argc, VALUE *argv, const char *fmt, ...)
+
+ argc, argvå½¢å¼ã§ä¸Žãˆã‚‰ã‚ŒãŸæŒ‡å®šã•れãŸãƒ•ォーマットã«å¾“ã£ã¦å¼•
+ 数を分解ã—,続ãVALUEã¸ã®å‚ç…§ã«ã‚»ãƒƒãƒˆã—ã¾ã™ï¼Žã“ã®ãƒ•ォーマッ
+ トã¯ï¼ŒABNFã§è¨˜è¿°ã™ã‚‹ã¨ä»¥ä¸‹ã®é€šã‚Šã§ã™ï¼Ž
+
+--
+scan-arg-spec := param-arg-spec [option-hash-arg-spec] [block-arg-spec]
+
+param-arg-spec := pre-arg-spec [post-arg-spec] / post-arg-spec / pre-opt-post-arg-spec
+pre-arg-spec := num-of-leading-mandatory-args [num-of-optional-args]
+post-arg-spec := sym-for-variable-length-args [num-of-trailing-mandatory-args]
+pre-opt-post-arg-spec := num-of-leading-mandatory-args num-of-optional-args num-of-trailing-mandatory-args
+option-hash-arg-spec := sym-for-option-hash-arg
+block-arg-spec := sym-for-block-arg
+
+num-of-leading-mandatory-args := DIGIT ; 先頭ã«ç½®ã‹ã‚Œã‚‹çœç•¥ä¸èƒ½ãªå¼•æ•°ã®æ•°
+num-of-optional-args := DIGIT ; ç¶šã„ã¦ç½®ã‹ã‚Œã‚‹çœç•¥å¯èƒ½ãªå¼•æ•°ã®æ•°
+sym-for-variable-length-args := "*" ; ç¶šã„ã¦ç½®ã‹ã‚Œã‚‹å¯å¤‰é•·å¼•æ•°ã‚’
+ ; Rubyã®é…列ã§å–å¾—ã™ã‚‹ãŸã‚ã®æŒ‡å®š
+num-of-trailing-mandatory-args := DIGIT ; 終端ã«ç½®ã‹ã‚Œã‚‹çœç•¥ä¸èƒ½ãªå¼•æ•°ã®æ•°
+sym-for-option-hash-arg := ":" ; オプションãƒãƒƒã‚·ãƒ¥ã‚’å–å¾—ã™ã‚‹
+ ; ãŸã‚ã®æŒ‡å®š; çœç•¥ä¸èƒ½ãªå¼•æ•°ã®
+ ; 数よりも多ãã®å¼•æ•°ãŒæŒ‡å®šã•れ,
+ ; 最後ã®å¼•æ•°ãŒãƒãƒƒã‚·ãƒ¥ï¼ˆã¾ãŸã¯
+ ; #to_hashã§å¤‰æ›å¯èƒ½ï¼‰ã®å ´åˆã«
+ ; å–å¾—ã•れる.最後ã®å¼•æ•°ãŒnilã®
+ ; å ´åˆï¼Œå¯å¤‰é•·å¼•数指定ãŒãªã,
+ ; çœç•¥ä¸èƒ½å¼•æ•°ã®æ•°ã‚ˆã‚Šã‚‚多ãã®
+ ; å¼•æ•°ãŒæŒ‡å®šã•れãŸå ´åˆã«å–å¾—ã•れる
+sym-for-block-arg := "&" ; イテレータブロックをå–å¾—ã™ã‚‹ãŸã‚ã®
+ ; 指定
+--
+
+ フォーマットãŒ"12"ã®å ´åˆï¼Œå¼•æ•°ã¯æœ€ä½Ž1ã¤ã§ï¼Œ3ã¤(1+2)ã¾ã§è¨±ã•
+ れるã¨ã„ã†æ„味ã«ãªã‚Šã¾ã™ï¼Žå¾“ã£ã¦ï¼Œãƒ•ォーマット文字列ã«ç¶šã„
+ ã¦3ã¤ã®VALUEã¸ã®å‚ç…§ã‚’ç½®ãå¿…è¦ãŒã‚りã¾ã™ï¼Žãれらã«ã¯å–å¾—ã—ãŸ
+ 変数ãŒã‚»ãƒƒãƒˆã•れã¾ã™ï¼Žå¤‰æ•°ã¸ã®å‚ç…§ã®ä»£ã‚りã«NULLを指定ã™ã‚‹
+ ã“ã¨ã‚‚ã§ã,ãã®å ´åˆã¯å–å¾—ã—ãŸå¼•æ•°ã®å€¤ã¯æ¨ã¦ã‚‰ã‚Œã¾ã™ï¼ŽãªãŠï¼Œ
+ çœç•¥å¯èƒ½å¼•æ•°ãŒçœç•¥ã•ã‚ŒãŸæ™‚ã®å¤‰æ•°ã®å€¤ã¯nil(C言語ã®ãƒ¬ãƒ™ãƒ«ã§ã¯
+ Qnil)ã«ãªã‚Šã¾ã™ï¼Ž
+
+ 返り値ã¯ä¸Žãˆã‚‰ã‚ŒãŸå¼•æ•°ã®æ•°ã§ã™ï¼Žã‚ªãƒ—ションãƒãƒƒã‚·ãƒ¥ãŠã‚ˆã³ã‚¤
+ ãƒ†ãƒ¬ãƒ¼ã‚¿ãƒ–ãƒ­ãƒƒã‚¯ã¯æ•°ãˆã¾ã›ã‚“.
+
+** Rubyメソッド呼ã³å‡ºã—
+
+VALUE rb_funcall(VALUE recv, ID mid, int narg, ...)
+
+ メソッド呼ã³å‡ºã—.文字列ã‹ã‚‰midã‚’å¾—ã‚‹ãŸã‚ã«ã¯rb_intern()ã‚’
+ 使ã†ï¼Ž
+
+VALUE rb_funcall2(VALUE recv, ID mid, int argc, VALUE *argv)
+
+ メソッド呼ã³å‡ºã—.引数をargc, argvå½¢å¼ã§æ¸¡ã™ï¼Ž
+
+VALUE rb_eval_string(const char *str)
+
+ 文字列をRubyスクリプトã¨ã—ã¦ã‚³ãƒ³ãƒ‘イル・実行ã™ã‚‹ï¼Ž
+
+ID rb_intern(const char *name)
+
+ 文字列ã«å¯¾å¿œã™ã‚‹IDã‚’è¿”ã™ï¼Ž
+
+char *rb_id2name(ID id)
+
+ IDã«å¯¾å¿œã™ã‚‹æ–‡å­—列を返ã™(デãƒãƒƒã‚°ç”¨).
+
+char *rb_class2name(VALUE klass)
+
+ クラスã®åå‰ã‚’è¿”ã™(デãƒãƒƒã‚°ç”¨).クラスãŒåå‰ã‚’æŒãŸãªã„時ã«
+ ã¯, 祖先をé¡ã£ã¦åå‰ã‚’æŒã¤ã‚¯ãƒ©ã‚¹ã®åå‰ã‚’è¿”ã™ï¼Ž
+
+int rb_respond_to(VALUE obj, ID id)
+
+ objãŒidã§ç¤ºã•れるメソッドをæŒã¤ã‹ã©ã†ã‹ã‚’è¿”ã™ï¼Ž
+
+** インスタンス変数
+
+VALUE rb_iv_get(VALUE obj, const char *name)
+
+ objã®ã‚¤ãƒ³ã‚¹ã‚¿ãƒ³ã‚¹å¤‰æ•°ã®å€¤ã‚’得る.`@'ã§å§‹ã¾ã‚‰ãªã„インスタン
+ ス変数㯠Rubyプログラムã‹ã‚‰ã‚¢ã‚¯ã‚»ã‚¹ã§ããªã„「隠れãŸã€ã‚¤ãƒ³
+ スタンス変数ã«ãªã‚‹ï¼Žå®šæ•°ã¯å¤§æ–‡å­—ã®åå‰ã‚’æŒã¤ã‚¯ãƒ©ã‚¹(ã¾ãŸã¯
+ モジュール)ã®ã‚¤ãƒ³ã‚¹ã‚¿ãƒ³ã‚¹å¤‰æ•°ã¨ã—ã¦å®Ÿè£…ã•れã¦ã„る.
+
+VALUE rb_iv_set(VALUE obj, const char *name, VALUE val)
+
+ objã®ã‚¤ãƒ³ã‚¹ã‚¿ãƒ³ã‚¹å¤‰æ•°ã‚’valã«ã‚»ãƒƒãƒˆã™ã‚‹ï¼Ž
+
+** 制御構造
+
+VALUE rb_block_call(VALUE obj, ID mid, int argc, VALUE * argv,
+ VALUE (*func) (ANYARGS), VALUE data2)
+
+ funcをブロックã¨ã—ã¦è¨­å®šã—,objをレシーãƒï¼Œargcã¨argvを引数
+ ã¨ã—ã¦midメソッドを呼ã³å‡ºã™ï¼Žfuncã¯ç¬¬ä¸€å¼•æ•°ã«yieldã•れãŸå€¤ï¼Œ
+ 第二引数ã«data2ã‚’å—ã‘å–る.複数ã®å€¤ãŒyieldã•れãŸå ´åˆ(Cã§ã¯
+ rb_yield_values()ã¨rb_yield_values2(), rb_yield_splat()),
+ data2ã¯Arrayã¨ã—ã¦ãƒ‘ックã•れã¦ã„る.第三, 第四引数ã®argcã¨
+ argvã«ã‚ˆã£ã¦yieldã•れãŸå€¤ã‚’å–り出ã™ã“ã¨ãŒã§ãる.
+
+[OBSOLETE] VALUE rb_iterate(VALUE (*func1)(), VALUE arg1, VALUE (*func2)(), VALUE arg2)
+
+ func2をブロックã¨ã—ã¦è¨­å®šã—, func1をイテレータã¨ã—ã¦å‘¼ã¶ï¼Ž
+ func1ã«ã¯ arg1ãŒå¼•æ•°ã¨ã—ã¦æ¸¡ã•れ, func2ã«ã¯ç¬¬1引数ã«ã‚¤ãƒ†ãƒ¬ãƒ¼
+ ã‚¿ã‹ã‚‰ä¸Žãˆã‚‰ã‚ŒãŸå€¤, 第2引数ã«arg2ãŒæ¸¡ã•れる.
+
+ 1.9ã§rb_iterateを使ã†å ´åˆã¯, func1ã®ä¸­ã§Rubyレベルã®ãƒ¡ã‚½ãƒƒãƒ‰
+ を呼ã³å‡ºã•ãªã‘れã°ãªã‚‰ãªã„.
+ 1.9ã§obsoleteã¨ãªã£ãŸ. 代ã‚りã«rb_block_callãŒç”¨æ„ã•れãŸ.
+
+VALUE rb_yield(VALUE val)
+
+ valを値ã¨ã—ã¦ã‚¤ãƒ†ãƒ¬ãƒ¼ã‚¿ãƒ–ロックを呼ã³å‡ºã™ï¼Ž
+
+VALUE rb_rescue(VALUE (*func1)(), VALUE arg1, VALUE (*func2)(), VALUE arg2)
+
+ 関数func1ã‚’arg1を引数ã«å‘¼ã³å‡ºã™ï¼Žfunc1ã®å®Ÿè¡Œä¸­ã«ä¾‹å¤–ãŒç™ºç”Ÿ
+ ã—ãŸæ™‚ã«ã¯ func2ã‚’arg2を引数ã¨ã—ã¦å‘¼ã¶ï¼Žæˆ»ã‚Šå€¤ã¯ä¾‹å¤–ãŒç™ºç”Ÿ
+ ã—ãªã‹ã£ãŸæ™‚ã¯func1ã®æˆ»ã‚Šå€¤, 例外ãŒç™ºç”Ÿã—ãŸæ™‚ã«ã¯func2ã®æˆ»
+ り値ã§ã‚る.
+
+VALUE rb_ensure(VALUE (*func1)(), VALUE arg1, VALUE (*func2)(), VALUE arg2)
+
+ 関数func1ã‚’arg1を引数ã¨ã—ã¦å®Ÿè¡Œã—, 実行終了後(ãŸã¨ãˆä¾‹å¤–ãŒ
+ 発生ã—ã¦ã‚‚) func2ã‚’arg2を引数ã¨ã—ã¦å®Ÿè¡Œã™ã‚‹ï¼Žæˆ»ã‚Šå€¤ã¯func1
+ ã®æˆ»ã‚Šå€¤ã§ã‚ã‚‹(例外ãŒç™ºç”Ÿã—ãŸæ™‚ã¯æˆ»ã‚‰ãªã„).
+
+VALUE rb_protect(VALUE (*func) (VALUE), VALUE arg, int *state)
+
+ 関数funcã‚’argを引数ã¨ã—ã¦å®Ÿè¡Œã—, 例外ãŒç™ºç”Ÿã—ãªã‘れã°ãã®æˆ»
+ り値を返ã™ï¼Žä¾‹å¤–ãŒç™ºç”Ÿã—ãŸå ´åˆã¯, *stateã«éž0をセットã—ã¦
+ Qnilã‚’è¿”ã™ï¼Ž
+ rb_jump_tag()を呼ã°ãšã«æ•æ‰ã—ãŸä¾‹å¤–を無視ã™ã‚‹å ´åˆã«ã¯ï¼Œ
+ rb_set_errinfo(Qnil)ã§ã‚¨ãƒ©ãƒ¼æƒ…報をクリアã—ãªã‘れã°ãªã‚‰ãªã„.
+
+void rb_jump_tag(int state)
+
+ rb_protect()ã‚„rb_eval_string_protect()ã§æ•æ‰ã•れãŸä¾‹å¤–ã‚’å†
+ é€ã™ã‚‹ï¼Žstateã¯ãれらã®é–¢æ•°ã‹ã‚‰è¿”ã•れãŸå€¤ã§ãªã‘れã°ãªã‚‰ãªã„.
+ ã“ã®é–¢æ•°ã¯ç›´æŽ¥ã®å‘¼ã³å‡ºã—å…ƒã«æˆ»ã‚‰ãªã„.
+
+void rb_iter_break()
+
+ ç¾åœ¨ã®æœ€ã‚‚内å´ã®ãƒ–ロックを終了ã™ã‚‹ï¼Žã“ã®é–¢æ•°ã¯ç›´æŽ¥ã®å‘¼ã³å‡º
+ ã—å…ƒã«æˆ»ã‚‰ãªã„.
+
+void rb_iter_break_value(VALUE value)
+
+ ç¾åœ¨ã®æœ€ã‚‚内å´ã®ãƒ–ロックをvalueã§çµ‚了ã™ã‚‹ï¼Žãƒ–ロックã¯å¼•æ•°ã§
+ 与ãˆã‚‰ã‚ŒãŸvalueã‚’è¿”ã™ï¼Žã“ã®é–¢æ•°ã¯ç›´æŽ¥ã®å‘¼ã³å‡ºã—å…ƒã«æˆ»ã‚‰ãªã„.
+
+** 例外・エラー
+
+void rb_warning(const char *fmt, ...)
+
+ rb_verboseæ™‚ã«æ¨™æº–エラー出力ã«è­¦å‘Šæƒ…報を表示ã™ã‚‹ï¼Žå¼•æ•°ã¯
+ printf()ã¨åŒã˜ï¼Ž
+
+void rb_raise(rb_eRuntimeError, const char *fmt, ...)
+
+ RuntimeError例外を発生ã•ã›ã‚‹ï¼Žå¼•æ•°ã¯printf()ã¨åŒã˜ï¼Ž
+
+void rb_raise(VALUE exception, const char *fmt, ...)
+
+ exceptionã§æŒ‡å®šã—ãŸä¾‹å¤–を発生ã•ã›ã‚‹ï¼Žfmt以下ã®å¼•æ•°ã¯
+ printf()ã¨åŒã˜ï¼Ž
+
+void rb_fatal(const char *fmt, ...)
+
+ 致命的例外を発生ã•ã›ã‚‹ï¼Žé€šå¸¸ã®ä¾‹å¤–処ç†ã¯è¡Œãªã‚れãš, インター
+ プリタãŒçµ‚了ã™ã‚‹(ãŸã ã—ensureã§æŒ‡å®šã•れãŸã‚³ãƒ¼ãƒ‰ã¯çµ‚了å‰ã«
+ 実行ã•れる).
+
+void rb_bug(const char *fmt, ...)
+
+ インタープリタãªã©ãƒ—ログラムã®ãƒã‚°ã§ã—ã‹ç™ºç”Ÿã™ã‚‹ã¯ãšã®ãªã„
+ 状æ³ã®æ™‚呼ã¶ï¼Žã‚¤ãƒ³ã‚¿ãƒ¼ãƒ—リタã¯ã‚³ã‚¢ãƒ€ãƒ³ãƒ—ã—ç›´ã¡ã«çµ‚了ã™ã‚‹ï¼Ž
+ 例外処ç†ã¯ä¸€åˆ‡è¡Œãªã‚れãªã„.
+
+** Rubyã®åˆæœŸåŒ–・実行
+
+Rubyをアプリケーションã«åŸ‹ã‚込む場åˆã«ã¯ä»¥ä¸‹ã®ã‚¤ãƒ³ã‚¿ãƒ•ェース
+を使ã†ï¼Žé€šå¸¸ã®æ‹¡å¼µãƒ©ã‚¤ãƒ–ラリã«ã¯å¿…è¦ãªã„.
+
+void ruby_init()
+
+ Rubyインタプリタã®åˆæœŸåŒ–を行ãªã†ï¼Ž
+
+void ruby_options(int argc, char **argv)
+
+ Rubyインタプリタã®ã‚³ãƒžãƒ³ãƒ‰ãƒ©ã‚¤ãƒ³å¼•æ•°ã®å‡¦ç†ã‚’行ãªã†ï¼Ž
+
+void ruby_run()
+
+ Rubyインタプリタを実行ã™ã‚‹ï¼Ž
+
+void ruby_script(char *name)
+
+ Rubyã®ã‚¹ã‚¯ãƒªãƒ—トå($0)を設定ã™ã‚‹ï¼Ž
+
+** インタプリタã®ã‚¤ãƒ™ãƒ³ãƒˆã®ãƒ•ック
+
+ void rb_add_event_hook(rb_event_hook_func_t func, rb_event_flag_t events, VALUE data)
+
+指定ã•れãŸã‚¤ãƒ³ã‚¿ãƒ—リタã®ã‚¤ãƒ™ãƒ³ãƒˆã«å¯¾ã™ã‚‹ãƒ•ック関数を追加ã—ã¾ã™ï¼Ž
+eventsã¯ä»¥ä¸‹ã®å€¤ã®orã§ãªã‘れã°ãªã‚Šã¾ã›ã‚“:
+
+ RUBY_EVENT_LINE
+ RUBY_EVENT_CLASS
+ RUBY_EVENT_END
+ RUBY_EVENT_CALL
+ RUBY_EVENT_RETURN
+ RUBY_EVENT_C_CALL
+ RUBY_EVENT_C_RETURN
+ RUBY_EVENT_RAISE
+ RUBY_EVENT_ALL
+
+rb_event_hook_func_tã®å®šç¾©ã¯ä»¥ä¸‹ã®é€šã‚Šã§ã™:
+
+ typedef void (*rb_event_hook_func_t)(rb_event_t event, VALUE data,
+ VALUE self, ID id, VALUE klass)
+
+rb_add_event_hook() ã®ç¬¬3引数 data ã¯ï¼Œãƒ•ック関数ã®ç¬¬2引数ã¨
+ã—ã¦æ¸¡ã•れã¾ã™ï¼Žã“れã¯1.8ã§ã¯ç¾åœ¨ã®NODEã¸ã®ãƒã‚¤ãƒ³ã‚¿ã§ã—ãŸï¼Žä»¥
+下㮠RB_EVENT_HOOKS_HAVE_CALLBACK_DATA ã‚‚å‚ç…§ã—ã¦ãã ã•ã„.
+
+ int rb_remove_event_hook(rb_event_hook_func_t func)
+
+指定ã•れãŸãƒ•ック関数を削除ã—ã¾ã™ï¼Ž
+
+** äº’æ›æ€§ã®ãŸã‚ã®ãƒžã‚¯ãƒ­
+
+APIã®äº’æ›æ€§ã‚’ãƒã‚§ãƒƒã‚¯ã™ã‚‹ãŸã‚ã«ä»¥ä¸‹ã®ãƒžã‚¯ãƒ­ãŒãƒ‡ãƒ•ォルトã§å®šç¾©ã•れã¦ã„ã¾ã™ï¼Ž
+
+NORETURN_STYLE_NEW
+
+ NORETURN マクロãŒé–¢æ•°åž‹ãƒžã‚¯ãƒ­ã¨ã—ã¦å®šç¾©ã•れã¦ã„ã‚‹ã“ã¨ã‚’æ„味ã™ã‚‹ï¼Ž
+
+HAVE_RB_DEFINE_ALLOC_FUNC
+
+ rb_define_alloc_func() é–¢æ•°ãŒæä¾›ã•れã¦ã„ã‚‹ã“ã¨ï¼Œã¤ã¾ã‚Š
+ allocation framework ãŒä½¿ã‚れるã“ã¨ã‚’æ„味ã™ã‚‹ï¼Ž
+ have_func("rb_define_alloc_func", "ruby.h")
+ ã®çµæžœã¨åŒã˜ï¼Ž
+
+HAVE_RB_REG_NEW_STR
+
+ Stringオブジェクトã‹ã‚‰Regexpオブジェクトを作る
+ rb_reg_new_str() é–¢æ•°ãŒæä¾›ã•れã¦ã„ã‚‹ã“ã¨ã‚’æ„味ã™ã‚‹ï¼Ž
+ have_func("rb_reg_new_str", "ruby.h").
+ ã®çµæžœã¨åŒã˜ï¼Ž
+
+HAVE_RB_IO_T
+
+ rb_io_t åž‹ãŒæä¾›ã•れã¦ã„ã‚‹ã“ã¨ã‚’æ„味ã™ã‚‹ï¼Ž
+
+USE_SYMBOL_AS_METHOD_NAME
+
+ メソッドåã‚’è¿”ã™ãƒ¡ã‚½ãƒƒãƒ‰ï¼ŒModule#methods, #singleton_methods
+ ãªã©ãŒSymbolã‚’è¿”ã™ã“ã¨ã‚’æ„味ã™ã‚‹ï¼Ž
+
+HAVE_RUBY_*_H
+
+ ruby.h ã§å®šç¾©ã•れã¦ã„る.対応ã™ã‚‹ãƒ˜ãƒƒãƒ€ãŒæä¾›ã•れã¦ã„ã‚‹ã“ã¨
+ ã‚’æ„味ã™ã‚‹ï¼ŽãŸã¨ãˆã°ï¼ŒHAVE_RUBY_ST_H ãŒå®šç¾©ã•れã¦ã„ã‚‹å ´åˆã¯
+ å˜ãªã‚‹ st.h ã§ã¯ãªã ruby/st.h を使用ã™ã‚‹ï¼Ž
+
+RB_EVENT_HOOKS_HAVE_CALLBACK_DATA
+
+ rb_add_event_hook() ãŒãƒ•ãƒƒã‚¯é–¢æ•°ã«æ¸¡ã™ data を第3引数ã¨ã—ã¦
+ å—ã‘å–ã‚‹ã“ã¨ã‚’æ„味ã™ã‚‹ï¼Ž
+
+Appendix C. extconf.rbã§ä½¿ãˆã‚‹é–¢æ•°ãŸã¡
+
+extconf.rbã®ä¸­ã§ã¯åˆ©ç”¨å¯èƒ½ãªã‚³ãƒ³ãƒ‘イルæ¡ä»¶ãƒã‚§ãƒƒã‚¯ã®é–¢æ•°ã¯ä»¥
+下ã®é€šã‚Šã§ã‚る.
+
+have_macro(macro, headers)
+
+ ヘッダファイルheaderをインクルードã—ã¦ãƒžã‚¯ãƒ­macroãŒå®šç¾©ã•
+ れã¦ã„ã‚‹ã‹ã©ã†ã‹ãƒã‚§ãƒƒã‚¯ã™ã‚‹ï¼Žãƒžã‚¯ãƒ­ãŒå®šç¾©ã•れã¦ã„る時true
+ ã‚’è¿”ã™ï¼Ž
+
+have_library(lib, func)
+
+ 関数funcを定義ã—ã¦ã„るライブラリlibã®å­˜åœ¨ã‚’ãƒã‚§ãƒƒã‚¯ã™ã‚‹ï¼Ž
+ ライブラリãŒå­˜åœ¨ã™ã‚‹æ™‚,trueã‚’è¿”ã™ï¼Ž
+
+find_library(lib, func, path...)
+
+ 関数funcを定義ã—ã¦ã„るライブラリlibã®å­˜åœ¨ã‚’ -Lpath を追加
+ ã—ãªãŒã‚‰ãƒã‚§ãƒƒã‚¯ã™ã‚‹ï¼Žãƒ©ã‚¤ãƒ–ラリãŒè¦‹ä»˜ã‹ã£ãŸæ™‚,trueã‚’è¿”ã™ï¼Ž
+
+have_func(func, header)
+
+ ヘッダファイルheaderをインクルードã—ã¦é–¢æ•°funcã®å­˜åœ¨ã‚’ãƒã‚§
+ ックã™ã‚‹ï¼ŽfuncãŒæ¨™æº–ã§ã¯ãƒªãƒ³ã‚¯ã•れãªã„ライブラリ内ã®ã‚‚ã®ã§
+ ã‚る時ã«ã¯å…ˆã«have_libraryã§ãã®ãƒ©ã‚¤ãƒ–ラリをãƒã‚§ãƒƒã‚¯ã—ã¦ãŠ
+ ã事.関数ãŒå­˜åœ¨ã™ã‚‹æ™‚trueã‚’è¿”ã™ï¼Ž
+
+have_var(var, header)
+
+ ヘッダファイルheaderをインクルードã—ã¦å¤‰æ•°varã®å­˜åœ¨ã‚’ãƒã‚§ãƒƒ
+ クã™ã‚‹ï¼ŽvarãŒæ¨™æº–ã§ã¯ãƒªãƒ³ã‚¯ã•れãªã„ライブラリ内ã®ã‚‚ã®ã§ã‚
+ る時ã«ã¯å…ˆã«have_libraryã§ãã®ãƒ©ã‚¤ãƒ–ラリをãƒã‚§ãƒƒã‚¯ã—ã¦ãŠã
+ 事.変数ãŒå­˜åœ¨ã™ã‚‹æ™‚trueã‚’è¿”ã™ï¼Ž
+
+have_header(header)
+
+ ヘッダファイルã®å­˜åœ¨ã‚’ãƒã‚§ãƒƒã‚¯ã™ã‚‹ï¼Žãƒ˜ãƒƒãƒ€ãƒ•ァイルãŒå­˜åœ¨ã™
+ る時trueã‚’è¿”ã™ï¼Ž
+
+find_header(header, path...)
+
+ ヘッダファイルheaderã®å­˜åœ¨ã‚’ -Ipath を追加ã—ãªãŒã‚‰ãƒã‚§ãƒƒã‚¯
+ ã™ã‚‹ï¼Žãƒ˜ãƒƒãƒ€ãƒ•ァイルãŒè¦‹ä»˜ã‹ã£ãŸæ™‚,trueã‚’è¿”ã™ï¼Ž
+
+have_struct_member(type, member[, header[, opt]])
+
+ ヘッダファイルheaderをインクルードã—ã¦åž‹typeã«ãƒ¡ãƒ³ãƒmember
+ ãŒå­˜åœ¨ã™ã‚‹ã‹ã‚’ãƒã‚§ãƒƒã‚¯ã™ã‚‹ï¼ŽtypeãŒå®šç¾©ã•れã¦ã„ã¦ï¼Œmemberã‚’
+ æŒã¤ã™ã‚‹æ™‚trueã‚’è¿”ã™ï¼Ž
+
+have_type(type, header, opt)
+
+ ヘッダファイルheaderをインクルードã—ã¦åž‹typeãŒå­˜åœ¨ã™ã‚‹ã‹ã‚’
+ ãƒã‚§ãƒƒã‚¯ã™ã‚‹ï¼ŽtypeãŒå®šç¾©ã•れã¦ã„る時trueã‚’è¿”ã™ï¼Ž
+
+check_sizeof(type, header)
+
+ ヘッダファイルheaderをインクルードã—ã¦åž‹typeã®charå˜ä½ã‚µã‚¤
+ ズを調ã¹ã‚‹ï¼ŽtypeãŒå®šç¾©ã•れã¦ã„る時ãã®ã‚µã‚¤ã‚ºã‚’è¿”ã™ï¼Žå®šç¾©ã•
+ れã¦ã„ãªã„ã¨ãã¯nilã‚’è¿”ã™ï¼Ž
+
+create_makefile(target[, target_prefix])
+
+ 拡張ライブラリ用ã®Makefileを生æˆã™ã‚‹ï¼Žã“ã®é–¢æ•°ã‚’呼ã°ãªã‘れ
+ ã°ãã®ãƒ©ã‚¤ãƒ–ラリã¯ã‚³ãƒ³ãƒ‘イルã•れãªã„.targetã¯ãƒ¢ã‚¸ãƒ¥ãƒ¼ãƒ«å
+ を表ã™ï¼Ž
+
+find_executable(command, path)
+
+ コマンドcommandã‚’File::PATH_SEPARATORã§åŒºåˆ‡ã‚‰ã‚ŒãŸãƒ‘スåã®
+ リストpathã‹ã‚‰æŽ¢ã™ï¼ŽpathãŒnilã¾ãŸã¯çœç•¥ã•れãŸå ´åˆã¯ï¼Œç’°å¢ƒ
+ 変数PATHã®å€¤ã‚’使用ã™ã‚‹ï¼Žå®Ÿè¡Œå¯èƒ½ãªã‚³ãƒžãƒ³ãƒ‰ãŒè¦‹ã¤ã‹ã£ãŸå ´åˆ
+ ã¯ãƒ‘スをå«ã‚€ãƒ•ァイルå,見ã¤ã‹ã‚‰ãªã‹ã£ãŸå ´åˆã¯nilã‚’è¿”ã™ï¼Ž
+
+with_config(withval[, default=nil])
+
+ コマンドライン上ã®--with-<withval>ã§æŒ‡å®šã•れãŸã‚ªãƒ—ション値
+ を得る.
+
+enable_config(config, *defaults)
+disable_config(config, *defaults)
+
+ コマンドライン上ã®--enable-<config>ã¾ãŸã¯
+ --disable-<config>ã§æŒ‡å®šã•れãŸçœŸå½å€¤ã‚’得る.
+ --enable-<config>ãŒæŒ‡å®šã•れã¦ã„ãŸå ´åˆã¯true,
+ --disable-<config>ãŒæŒ‡å®šã•れã¦ã„ãŸå ´åˆã¯falseã‚’è¿”ã™ï¼Ž
+ ã©ã¡ã‚‰ã‚‚指定ã•れã¦ã„ãªã„å ´åˆã¯ï¼Œãƒ–ロックã¤ãã§å‘¼ã³å‡ºã•れã¦
+ ã„ã‚‹å ´åˆã¯*defaultsã‚’yieldã—ãŸçµæžœï¼Œãƒ–ロックãªã—ãªã‚‰
+ *defaultsã‚’è¿”ã™ï¼Ž
+
+dir_config(target[, default_dir])
+dir_config(target[, default_include, default_lib])
+
+ コマンドライン上ã®--with-<target>-dir, --with-<target>-include,
+ --with-<target>-libã®ã„ãšã‚Œã‹ã§æŒ‡å®šã•れるディレクトリを
+ $CFLAGS ã‚„ $LDFLAGS ã«è¿½åŠ ã™ã‚‹ï¼Ž--with-<target>-dir=/pathã¯
+ --with-<target>-include=/path/include --with-<target>-lib=/path/lib
+ ã¨ç­‰ä¾¡ã§ã‚る.追加ã•れ㟠include ディレクトリ㨠lib ディレ
+ クトリã®é…列を返ã™ï¼Ž ([include_dir, lib_dir])
+
+pkg_config(pkg)
+
+ pkg-configコマンドã‹ã‚‰ãƒ‘ッケージpkgã®æƒ…報を得る.
+ pkg-configã®å®Ÿéš›ã®ã‚³ãƒžãƒ³ãƒ‰åã¯ï¼Œ--with-pkg-configコマンド
+ ãƒ©ã‚¤ãƒ³ã‚ªãƒ—ã‚·ãƒ§ãƒ³ã§æŒ‡å®šå¯èƒ½ï¼Ž
+
+/*
+ * Local variables:
+ * fill-column: 60
+ * end:
+ */
diff --git a/README.EXT.jp b/README.EXT.jp
deleted file mode 100644
index 0db954818e..0000000000
--- a/README.EXT.jp
+++ /dev/null
@@ -1,1188 +0,0 @@
-.\" README.EXT - -*- Text -*- created at: Mon Aug 7 16:45:54 JST 1995
-
-Ruby¤Î³ÈÄ¥¥é¥¤¥Ö¥é¥ê¤Îºî¤êÊý¤òÀâÌÀ¤·¤Þ¤¹¡¥
-
-1¡¥´ðÁÃÃμ±
-
-C¤ÎÊÑ¿ô¤Ë¤Ï·¿¤¬¤¢¤ê¡¤¥Ç¡¼¥¿¤Ë¤Ï·¿¤¬¤¢¤ê¤Þ¤»¤ó¡¥¤Ç¤¹¤«¤é¡¤¤¿
-¤È¤¨¤Ð¥Ý¥¤¥ó¥¿¤òint¤ÎÊÑ¿ô¤ËÂåÆþ¤¹¤ë¤È¡¤¤½¤ÎÃͤÏÀ°¿ô¤È¤·¤Æ¼è
-¤ê°·¤ï¤ì¤Þ¤¹¡¥µÕ¤ËRuby¤ÎÊÑ¿ô¤Ë¤Ï·¿¤¬¤Ê¤¯¡¤¥Ç¡¼¥¿¤Ë·¿¤¬¤¢¤ê¤Þ
-¤¹¡¥¤³¤Î°ã¤¤¤Î¤¿¤á¡¤C¤ÈRuby¤ÏÁê¸ß¤ËÊÑ´¹¤·¤Ê¤±¤ì¤Ð¡¤¤ª¸ß¤¤¤Î
-¥Ç¡¼¥¿¤ò¥¢¥¯¥»¥¹¤Ç¤­¤Þ¤»¤ó¡¥
-
-Ruby¤Î¥Ç¡¼¥¿¤ÏVALUE¤È¤¤¤¦C¤Î·¿¤Çɽ¸½¤µ¤ì¤Þ¤¹¡¥VALUE·¿¤Î¥Ç¡¼
-¥¿¤Ï¤½¤Î¥Ç¡¼¥¿¥¿¥¤¥×¤ò¼«Ê¬¤ÇÃΤäƤ¤¤Þ¤¹¡¥¤³¤Î¥Ç¡¼¥¿¥¿¥¤¥×¤È
-¤¤¤¦¤Î¤Ï¥Ç¡¼¥¿(¥ª¥Ö¥¸¥§¥¯¥È)¤Î¼ÂºÝ¤Î¹½Â¤¤ò°ÕÌ£¤·¤Æ¤¤¤Æ¡¤Ruby
-¤Î¥¯¥é¥¹¤È¤Ï¤Þ¤¿°ã¤Ã¤¿¤â¤Î¤Ç¤¹¡¥
-
-VALUE¤«¤éC¤Ë¤È¤Ã¤Æ°ÕÌ£¤Î¤¢¤ë¥Ç¡¼¥¿¤ò¼è¤ê½Ð¤¹¤¿¤á¤Ë¤Ï
-
- (1) VALUE¤Î¥Ç¡¼¥¿¥¿¥¤¥×¤òÃΤë
- (2) VALUE¤òC¤Î¥Ç¡¼¥¿¤ËÊÑ´¹¤¹¤ë
-
-¤ÎξÊý¤¬É¬ÍפǤ¹¡¥(1)¤ò˺¤ì¤ë¤È´Ö°ã¤Ã¤¿¥Ç¡¼¥¿¤ÎÊÑ´¹¤¬¹Ô¤ï¤ì
-¤Æ¡¤ºÇ°­¥×¥í¥°¥é¥à¤¬core dump¤·¤Þ¤¹¡¥
-
-1.1 ¥Ç¡¼¥¿¥¿¥¤¥×
-
-Ruby¤Ë¤Ï¥æ¡¼¥¶¤¬»È¤¦²ÄǽÀ­¤Î¤¢¤ë°Ê²¼¤Î¥¿¥¤¥×¤¬¤¢¤ê¤Þ¤¹¡¥
-
- T_NIL nil
- T_OBJECT Ä̾ï¤Î¥ª¥Ö¥¸¥§¥¯¥È
- T_CLASS ¥¯¥é¥¹
- T_MODULE ¥â¥¸¥å¡¼¥ë
- T_FLOAT ÉâÆ°¾®¿ôÅÀ¿ô
- T_STRING ʸ»úÎó
- T_REGEXP Àµµ¬É½¸½
- T_ARRAY ÇÛÎó
- T_FIXNUM Fixnum(31bitĹÀ°¿ô)
- T_HASH Ï¢ÁÛÇÛÎó
- T_STRUCT (Ruby¤Î)¹½Â¤ÂÎ
- T_BIGNUM ¿ÇÜĹÀ°¿ô
- T_FILE Æþ½ÐÎÏ
- T_TRUE ¿¿
- T_FALSE µ¶
- T_DATA ¥Ç¡¼¥¿
- T_SYMBOL ¥·¥ó¥Ü¥ë
-
-¤½¤Î¾¤ËÆâÉô¤ÇÍøÍѤµ¤ì¤Æ¤¤¤ë°Ê²¼¤Î¥¿¥¤¥×¤¬¤¢¤ê¤Þ¤¹¡¥
-
- T_ICLASS
- T_MATCH
- T_UNDEF
- T_VARMAP
- T_SCOPE
- T_NODE
-
-¤Û¤È¤ó¤É¤Î¥¿¥¤¥×¤ÏC¤Î¹½Â¤ÂΤǼÂÁõ¤µ¤ì¤Æ¤¤¤Þ¤¹¡¥
-
-1.2 VALUE¤Î¥Ç¡¼¥¿¥¿¥¤¥×¤ò¥Á¥§¥Ã¥¯¤¹¤ë
-
-ruby.h¤Ç¤ÏTYPE()¤È¤¤¤¦¥Þ¥¯¥í¤¬ÄêµÁ¤µ¤ì¤Æ¤¤¤Æ¡¤VALUE¤Î¥Ç¡¼¥¿
-¥¿¥¤¥×¤òÃΤ뤳¤È¤¬½ÐÍè¤Þ¤¹¡¥TYPE()¥Þ¥¯¥í¤Ï¾å¤Ç¾Ò²ð¤·¤¿T_XXXX
-¤Î·Á¼°¤ÎÄê¿ô¤òÊÖ¤·¤Þ¤¹¡¥VALUE¤Î¥Ç¡¼¥¿¥¿¥¤¥×¤Ë±þ¤¸¤Æ½èÍý¤¹¤ë
-¾ì¹ç¤Ë¤Ï¡¤TYPE()¤ÎÃͤÇʬ´ô¤¹¤ë¤³¤È¤Ë¤Ê¤ê¤Þ¤¹¡¥
-
- switch (TYPE(obj)) {
- case T_FIXNUM:
- /* FIXNUM¤Î½èÍý */
- break;
- case T_STRING:
- /* ʸ»úÎó¤Î½èÍý */
- break;
- case T_ARRAY:
- /* ÇÛÎó¤Î½èÍý */
- break;
- default:
- /* Îã³°¤òȯÀ¸¤µ¤»¤ë */
- rb_raise(rb_eTypeError, "not valid value");
- break;
- }
-
-¤½¤ì¤È¥Ç¡¼¥¿¥¿¥¤¥×¤ò¥Á¥§¥Ã¥¯¤·¤Æ¡¤Àµ¤·¤¯¤Ê¤±¤ì¤ÐÎã³°¤òȯÀ¸¤¹
-¤ë´Ø¿ô¤¬ÍѰդµ¤ì¤Æ¤¤¤Þ¤¹¡¥
-
- void Check_Type(VALUE value, int type)
-
-¤³¤Î´Ø¿ô¤Ïvalue¤¬type¤Ç̵¤±¤ì¤Ð¡¤Îã³°¤òȯÀ¸¤µ¤»¤Þ¤¹¡¥°ú¿ô¤È
-¤·¤ÆÍ¿¤¨¤é¤ì¤¿VALUE¤Î¥Ç¡¼¥¿¥¿¥¤¥×¤¬Àµ¤·¤¤¤«¤É¤¦¤«¥Á¥§¥Ã¥¯¤¹
-¤ë¤¿¤á¤Ë¤Ï¡¤¤³¤Î´Ø¿ô¤ò»È¤¤¤Þ¤¹¡¥
-
-FIXNUM¤ÈNIL¤Ë´Ø¤·¤Æ¤Ï¤è¤ê¹â®¤ÊȽÊÌ¥Þ¥¯¥í¤¬ÍѰդµ¤ì¤Æ¤¤¤Þ¤¹¡¥
-
- FIXNUM_P(obj)
- NIL_P(obj)
-
-1.3 VALUE¤òC¤Î¥Ç¡¼¥¿¤ËÊÑ´¹¤¹¤ë
-
-¥Ç¡¼¥¿¥¿¥¤¥×¤¬T_NIL, T_FALSE, T_TRUE¤Ç¤¢¤ë»þ¡¤¥Ç¡¼¥¿¤Ï¤½¤ì¤¾
-¤ìnil, false, true¤Ç¤¹¡¥¤³¤Î¥Ç¡¼¥¿¥¿¥¤¥×¤Î¥ª¥Ö¥¸¥§¥¯¥È¤Ï¤Ò¤È
-¤Ä¤º¤Ä¤·¤«Â¸ºß¤·¤Þ¤»¤ó¡¥
-
-¥Ç¡¼¥¿¥¿¥¤¥×¤¬T_FIXNUM¤Î»þ¡¤¤³¤ì¤Ï31bit¤Î¥µ¥¤¥º¤ò»ý¤ÄÀ°¿ô¤Ç
-¤¹¡¥FIXNUM¤òC¤ÎÀ°¿ô¤ËÊÑ´¹¤¹¤ë¤¿¤á¤Ë¤Ï¥Þ¥¯¥í¡ÖFIX2INT()¡×¤ò»È
-¤¤¤Þ¤¹¡¥¤½¤ì¤«¤é¡¤FIXNUM¤Ë¸Â¤é¤ºRuby¤Î¥Ç¡¼¥¿¤òÀ°¿ô¤ËÊÑ´¹¤¹¤ë
-¡ÖNUM2INT()¡×¤È¤¤¤¦¥Þ¥¯¥í¤¬¤¢¤ê¤Þ¤¹¡¥¤³¤Î¥Þ¥¯¥í¤Ï¥Ç¡¼¥¿¥¿¥¤
-¥×¤Î¥Á¥§¥Ã¥¯Ìµ¤·¤Ç»È¤¨¤Þ¤¹(À°¿ô¤ËÊÑ´¹¤Ç¤­¤Ê¤¤¾ì¹ç¤Ë¤ÏÎã³°¤¬
-ȯÀ¸¤¹¤ë)¡¥
-
-ƱÍͤ˥Á¥§¥Ã¥¯Ìµ¤·¤Ç»È¤¨¤ëÊÑ´¹¥Þ¥¯¥í¤Ïdouble¤ò¼è¤ê½Ð¤¹
-¡ÖNUM2DBL()¡×¤Èchar*¤ò¼è¤ê½Ð¤¹¡ÖSTR2CSTR()¡×¤¬¤¢¤ê¤Þ¤¹¡¥
-
-¤½¤ì°Ê³°¤Î¥Ç¡¼¥¿¥¿¥¤¥×¤ÏÂбþ¤¹¤ëC¤Î¹½Â¤ÂΤ¬¤¢¤ê¤Þ¤¹¡¥Âбþ¤¹
-¤ë¹½Â¤ÂΤΤ¢¤ëVALUE¤Ï¤½¤Î¤Þ¤Þ¥­¥ã¥¹¥È(·¿ÊÑ´¹)¤¹¤ì¤Ð¹½Â¤ÂΤÎ
-¥Ý¥¤¥ó¥¿¤ËÊÑ´¹¤Ç¤­¤Þ¤¹¡¥
-
-¹½Â¤ÂΤϡÖstruct RXxxxx¡×¤È¤¤¤¦Ì¾Á°¤Çruby.h¤ÇÄêµÁ¤µ¤ì¤Æ¤¤¤Þ
-¤¹¡¥Î㤨¤Ðʸ»úÎó¤Ï¡Östruct RString¡×¤Ç¤¹¡¥¼ÂºÝ¤Ë»È¤¦²ÄǽÀ­¤¬
-¤¢¤ë¤Î¤Ïʸ»úÎó¤ÈÇÛÎ󤯤餤¤À¤È»×¤¤¤Þ¤¹¡¥
-
-ruby.h¤Ç¤Ï¹½Â¤ÂΤإ­¥ã¥¹¥È¤¹¤ë¥Þ¥¯¥í¤â¡ÖRXXXXX()¡×(Á´ÉôÂçʸ
-»ú¤Ë¤·¤¿¤â¤Î)¤È¤¤¤¦Ì¾Á°¤ÇÄ󶡤µ¤ì¤Æ¤¤¤Þ¤¹(Îã: RSTRING())¡¥
-
-Î㤨¤Ð¡¤Ê¸»úÎóstr¤ÎŤµ¤òÆÀ¤ë¤¿¤á¤Ë¤Ï¡ÖRSTRING(str)->len¡×¤È
-¤·¡¤Ê¸»úÎóstr¤òchar*¤È¤·¤ÆÆÀ¤ë¤¿¤á¤Ë¤Ï¡ÖRSTRING(str)->ptr¡×
-¤È¤·¤Þ¤¹¡¥ÇÛÎó¤Î¾ì¹ç¤Ë¤Ï¡¤¤½¤ì¤¾¤ì¡ÖRARRAY(ary)->len¡×¡¤
-¡ÖRARRAY(ary)->ptr¡×¤È¤Ê¤ê¤Þ¤¹¡¥
-
-Ruby¤Î¹½Â¤ÂΤòľÀÜ¥¢¥¯¥»¥¹¤¹¤ë»þ¤Ëµ¤¤ò¤Ä¤±¤Ê¤±¤ì¤Ð¤Ê¤é¤Ê¤¤¤³
-¤È¤Ï¡¤ÇÛÎó¤äʸ»úÎó¤Î¹½Â¤ÂΤÎÃæ¿È¤Ï»²¾È¤¹¤ë¤À¤±¤Ç¡¤Ä¾ÀÜÊѹ¹¤·
-¤Ê¤¤¤³¤È¤Ç¤¹¡¥Ä¾ÀÜÊѹ¹¤·¤¿¾ì¹ç¡¤¥ª¥Ö¥¸¥§¥¯¥È¤ÎÆâÍÆ¤ÎÀ°¹çÀ­¤¬
-¤È¤ì¤Ê¤¯¤Ê¤Ã¤Æ¡¤»×¤ï¤Ì¥Ð¥°¤Î¸¶°ø¤Ë¤Ê¤ê¤Þ¤¹¡¥
-
-1.4 C¤Î¥Ç¡¼¥¿¤òVALUE¤ËÊÑ´¹¤¹¤ë
-
-VALUE¤Î¼ÂºÝ¤Î¹½Â¤¤Ï
-
- * FIXNUM¤Î¾ì¹ç
-
- 1bitº¸¥·¥Õ¥È¤·¤Æ¡¤LSB¤òΩ¤Æ¤ë¡¥
-
- * ¤½¤Î¾¤Î¥Ý¥¤¥ó¥¿¤Î¾ì¹ç
-
- ¤½¤Î¤Þ¤ÞVALUE¤Ë¥­¥ã¥¹¥È¤¹¤ë¡¥
-
-¤È¤Ê¤Ã¤Æ¤¤¤Þ¤¹¡¥¤è¤Ã¤Æ¡¤LSB¤ò¥Á¥§¥Ã¥¯¤¹¤ì¤ÐVALUE¤¬FIXNUM¤«¤É
-¤¦¤«¤ï¤«¤ë¤ï¤±¤Ç¤¹(¥Ý¥¤¥ó¥¿¤ÎLSB¤¬Î©¤Ã¤Æ¤¤¤Ê¤¤¤³¤È¤ò²¾Äꤷ¤Æ
-¤¤¤ë)¡¥
-
-¤Ç¤¹¤«¤é¡¤FIXNUM°Ê³°¤ÎRuby¤Î¥ª¥Ö¥¸¥§¥¯¥È¤Î¹½Â¤ÂΤÏñ¤ËVALUE
-¤Ë¥­¥ã¥¹¥È¤¹¤ë¤À¤±¤ÇVALUE¤ËÊÑ´¹½ÐÍè¤Þ¤¹¡¥¤¿¤À¤·¡¤Ç¤°Õ¤Î¹½Â¤
-ÂΤ¬VALUE¤Ë¥­¥ã¥¹¥È½ÐÍè¤ë¤ï¤±¤Ç¤Ï¤¢¤ê¤Þ¤»¤ó¡¥¥­¥ã¥¹¥È¤¹¤ë¤Î
-¤ÏRuby¤ÎÃΤäƤ¤¤ë¹½Â¤ÂÎ(ruby.h¤ÇÄêµÁ¤µ¤ì¤Æ¤¤¤ëstruct RXxxx
-¤Î¤â¤Î)¤À¤±¤Ç¤¹¡¥
-
-FIXNUM¤Ë´Ø¤·¤Æ¤ÏÊÑ´¹¥Þ¥¯¥í¤ò·Ðͳ¤¹¤ëɬÍפ¬¤¢¤ê¤Þ¤¹¡¥C¤ÎÀ°¿ô
-¤«¤éVALUE¤ËÊÑ´¹¤¹¤ë¥Þ¥¯¥í¤Ï°Ê²¼¤Î¤â¤Î¤¬¤¢¤ê¤Þ¤¹¡¥É¬Íפ˱þ¤¸
-¤Æ»È¤¤Ê¬¤±¤Æ¤¯¤À¤µ¤¤¡¥
-
- INT2FIX() ¤â¤È¤ÎÀ°¿ô¤¬31bit°ÊÆâ¤Ë¼ý¤Þ¤ë¼«¿®¤¬¤¢¤ë»þ
- INT2NUM() Ǥ°Õ¤ÎÀ°¿ô¤«¤éVALUE¤Ø
-
-INT2NUM()¤ÏÀ°¿ô¤¬FIXNUM¤ÎÈϰϤ˼ý¤Þ¤é¤Ê¤¤¾ì¹ç¡¤Bignum¤ËÊÑ´¹
-¤·¤Æ¤¯¤ì¤Þ¤¹(¤¬¡¤¾¯¤·ÃÙ¤¤)¡¥
-
-1.5 Ruby¤Î¥Ç¡¼¥¿¤òÁàºî¤¹¤ë
-
-ÀèÄø¤â½Ò¤Ù¤¿Ä̤ꡤRuby¤Î¹½Â¤ÂΤò¥¢¥¯¥»¥¹¤¹¤ë»þ¤ËÆâÍÆ¤Î¹¹¿·¤ò
-¹Ô¤¦¤³¤È¤Ï´«¤á¤é¤ì¤Þ¤»¤ó¡¥¤Ç¡¤Ruby¤Î¥Ç¡¼¥¿¤òÁàºî¤¹¤ë»þ¤Ë¤Ï
-Ruby¤¬ÍѰդ·¤Æ¤¤¤ë´Ø¿ô¤òÍѤ¤¤Æ¤¯¤À¤µ¤¤¡¥
-
-¤³¤³¤Ç¤Ï¤â¤Ã¤È¤â»È¤ï¤ì¤ë¤Ç¤¢¤í¤¦Ê¸»úÎó¤ÈÇÛÎó¤ÎÀ¸À®/Áàºî¤ò¹Ô
-¤¤´Ø¿ô¤ò¤¢¤²¤Þ¤¹(Á´Éô¤Ç¤Ï¤Ê¤¤¤Ç¤¹)¡¥
-
- ʸ»úÎó¤ËÂФ¹¤ë´Ø¿ô
-
- rb_str_new(const char *ptr, long len)
-
- ¿·¤·¤¤Ruby¤Îʸ»úÎó¤òÀ¸À®¤¹¤ë¡¥
-
- rb_str_new2(const char *ptr)
-
- C¤Îʸ»úÎ󤫤éRuby¤Îʸ»úÎó¤òÀ¸À®¤¹¤ë¡¥¤³¤Î´Ø¿ô¤Îµ¡Ç½¤Ï
- rb_str_new(ptr, strlen(ptr))¤ÈƱÅù¤Ç¤¢¤ë¡¥
-
- rb_tainted_str_new(const char *ptr, long len)
-
- ±øÀ÷¥Þ¡¼¥¯¤¬Éղ䵤줿¿·¤·¤¤Ruby¤Îʸ»úÎó¤òÀ¸À®¤¹¤ë¡¥³°Éô
- ¤«¤é¤Î¥Ç¡¼¥¿¤Ë´ð¤Å¤¯Ê¸»úÎó¤Ë¤Ï±øÀ÷¥Þ¡¼¥¯¤¬Éղ䵤ì¤ë¤Ù¤­
- ¤Ç¤¢¤ë¡¥
-
- rb_tainted_str_new2(const char *ptr)
-
- C¤Îʸ»úÎ󤫤鱸À÷¥Þ¡¼¥¯¤¬Éղ䵤줿Ruby¤Îʸ»úÎó¤òÀ¸À®¤¹¤ë¡¥
-
- rb_str_cat(VALUE str, const char *ptr, long len)
-
- Ruby¤Îʸ»úÎóstr¤Ëlen¥Ð¥¤¥È¤Îʸ»úÎóptr¤òÄɲ乤롥
-
- ÇÛÎó¤ËÂФ¹¤ë´Ø¿ô
-
- rb_ary_new()
-
- Í×ÁǤ¬0¤ÎÇÛÎó¤òÀ¸À®¤¹¤ë¡¥
-
- rb_ary_new2(long len)
-
- Í×ÁǤ¬0¤ÎÇÛÎó¤òÀ¸À®¤¹¤ë¡¥lenÍ×ÁÇʬ¤ÎÎΰè¤ò¤¢¤é¤«¤¸¤á³ä¤ê
- Åö¤Æ¤Æ¤ª¤¯¡¥
-
- rb_ary_new3(long n, ...)
-
- °ú¿ô¤Ç»ØÄꤷ¤¿nÍ×ÁǤò´Þ¤àÇÛÎó¤òÀ¸À®¤¹¤ë¡¥
-
- rb_ary_new4(long n, VALUE *elts)
-
- ÇÛÎó¤ÇÍ¿¤¨¤¿nÍ×ÁǤÎÇÛÎó¤òÀ¸À®¤¹¤ë¡¥
-
- rb_ary_push(VALUE ary, VALUE val)
- rb_ary_pop(VALUE ary)
- rb_ary_shift(VALUE ary)
- rb_ary_unshift(VALUE ary, VALUE val)
-
- Array¤ÎƱ̾¤Î¥á¥½¥Ã¥É¤ÈƱ¤¸Æ¯¤­¤ò¤¹¤ë´Ø¿ô¡¥Âè1°ú¿ô¤Ïɬ¤º
- ÇÛÎó¤Ç¤Ê¤±¤ì¤Ð¤Ê¤é¤Ê¤¤¡¥
-
-2¡¥Ruby¤Îµ¡Ç½¤ò»È¤¦
-
-¸¶ÍýŪ¤ËRuby¤Ç½ñ¤±¤ë¤³¤È¤ÏC¤Ç¤â½ñ¤±¤Þ¤¹¡¥Ruby¤½¤Î¤â¤Î¤¬C¤Çµ­
-½Ò¤µ¤ì¤Æ¤¤¤ë¤ó¤Ç¤¹¤«¤é¡¤ÅöÁ³¤È¤¤¤¨¤ÐÅöÁ³¤Ê¤ó¤Ç¤¹¤±¤É¡¥¤³¤³¤Ç
-¤ÏRuby¤Î³ÈÄ¥¤Ë»È¤¦¤³¤È¤¬Â¿¤¤¤À¤í¤¦¤Èͽ¬¤µ¤ì¤ëµ¡Ç½¤òÃæ¿´¤Ë¾Ò
-²ð¤·¤Þ¤¹¡¥
-
-2.1 Ruby¤Ëµ¡Ç½¤òÄɲ乤ë
-
-Ruby¤ÇÄ󶡤µ¤ì¤Æ¤¤¤ë´Ø¿ô¤ò»È¤¨¤ÐRuby¥¤¥ó¥¿¥×¥ê¥¿¤Ë¿·¤·¤¤µ¡Ç½
-¤òÄɲ乤뤳¤È¤¬¤Ç¤­¤Þ¤¹¡¥Ruby¤Ç¤Ï°Ê²¼¤Îµ¡Ç½¤òÄɲä¹¤ë´Ø¿ô¤¬
-Ä󶡤µ¤ì¤Æ¤¤¤Þ¤¹¡¥
-
- * ¥¯¥é¥¹¡¤¥â¥¸¥å¡¼¥ë
- * ¥á¥½¥Ã¥É¡¤ÆÃ°Û¥á¥½¥Ã¥É¤Ê¤É
- * Äê¿ô
-
-¤Ç¤Ï½ç¤Ë¾Ò²ð¤·¤Þ¤¹¡¥
-
-2.1.1 ¥¯¥é¥¹/¥â¥¸¥å¡¼¥ëÄêµÁ
-
-¥¯¥é¥¹¤ä¥â¥¸¥å¡¼¥ë¤òÄêµÁ¤¹¤ë¤¿¤á¤Ë¤Ï¡¤°Ê²¼¤Î´Ø¿ô¤ò»È¤¤¤Þ¤¹¡¥
-
- VALUE rb_define_class(const char *name, VALUE super)
- VALUE rb_define_module(const char *name)
-
-¤³¤ì¤é¤Î´Ø¿ô¤Ï¿·¤·¤¯ÄêµÁ¤µ¤ì¤¿¥¯¥é¥¹¤ä¥â¥¸¥å¡¼¥ë¤òÊÖ¤·¤Þ¤¹¡¥
-¥á¥½¥Ã¥É¤äÄê¿ô¤ÎÄêµÁ¤Ë¤³¤ì¤é¤ÎÃͤ¬É¬ÍפʤΤǡ¤¤Û¤È¤ó¤É¤Î¾ì¹ç
-¤ÏÌá¤êÃͤòÊÑ¿ô¤Ë³ÊǼ¤·¤Æ¤ª¤¯É¬Íפ¬¤¢¤ë¤Ç¤·¤ç¤¦¡¥
-
-¥¯¥é¥¹¤ä¥â¥¸¥å¡¼¥ë¤ò¾¤Î¥¯¥é¥¹¤ÎÆâÉô¤Ë¥Í¥¹¥È¤·¤ÆÄêµÁ¤¹¤ë»þ¤Ë
-¤Ï°Ê²¼¤Î´Ø¿ô¤ò»È¤¤¤Þ¤¹¡¥
-
- VALUE rb_define_class_under(VALUE outer, const char *name, VALUE super)
- VALUE rb_define_module_under(VALUE outer, const char *name)
-
-2.1.2 ¥á¥½¥Ã¥É/ÆÃ°Û¥á¥½¥Ã¥ÉÄêµÁ
-
-¥á¥½¥Ã¥É¤äÆÃ°Û¥á¥½¥Ã¥É¤òÄêµÁ¤¹¤ë¤Ë¤Ï°Ê²¼¤Î´Ø¿ô¤ò»È¤¤¤Þ¤¹¡¥
-
- void rb_define_method(VALUE klass, const char *name,
- VALUE (*func)(), int argc)
-
- void rb_define_singleton_method(VALUE object, const char *name,
- VALUE (*func)(), int argc)
-
-
-ǰ¤Î¤¿¤áÀâÌÀ¤¹¤ë¤È¡ÖÆÃ°Û¥á¥½¥Ã¥É¡×¤È¤Ï¡¤¤½¤ÎÆÃÄê¤Î¥ª¥Ö¥¸¥§¥¯
-¥È¤ËÂФ·¤Æ¤À¤±Í­¸ú¤Ê¥á¥½¥Ã¥É¤Ç¤¹¡¥Ruby¤Ç¤Ï¤è¤¯Smalltalk¤Ë¤ª
-¤±¤ë¥¯¥é¥¹¥á¥½¥Ã¥É¤È¤·¤Æ¡¤¥¯¥é¥¹¤ËÂФ¹¤ëÆÃ°Û¥á¥½¥Ã¥É¤¬»È¤ï¤ì
-¤Þ¤¹¡¥
-
-¤³¤ì¤é¤Î´Ø¿ô¤Î argc¤È¤¤¤¦°ú¿ô¤ÏC¤Î´Ø¿ô¤ØÅϤµ¤ì¤ë°ú¿ô¤Î¿ô(¤È
-·Á¼°)¤ò·è¤á¤Þ¤¹¡¥argc¤¬0°Ê¾å¤Î»þ¤Ï´Ø¿ô¤Ë°ú¤­ÅϤ¹°ú¿ô¤Î¿ô¤ò°Õ
-Ì£¤·¤Þ¤¹¡¥16¸Ä°Ê¾å¤Î°ú¿ô¤Ï»È¤¨¤Þ¤»¤ó(¤¬¡¤Íפê¤Þ¤»¤ó¤è¤Í¡¤¤½
-¤ó¤Ê¤Ë)¡¥¼ÂºÝ¤Î´Ø¿ô¤Ë¤ÏÀèÆ¬¤Î°ú¿ô¤È¤·¤Æself¤¬Í¿¤¨¤é¤ì¤Þ¤¹¤Î
-¤Ç¡¤»ØÄꤷ¤¿¿ô¤è¤ê1¿¤¤°ú¿ô¤ò»ý¤Ä¤³¤È¤Ë¤Ê¤ê¤Þ¤¹¡¥
-
-argc¤¬Éé¤Î»þ¤Ï°ú¿ô¤Î¿ô¤Ç¤Ï¤Ê¤¯¡¤·Á¼°¤ò»ØÄꤷ¤¿¤³¤È¤Ë¤Ê¤ê¤Þ¤¹¡¥
-argc¤¬-1¤Î»þ¤Ï°ú¿ô¤òÇÛÎó¤ËÆþ¤ì¤ÆÅϤµ¤ì¤Þ¤¹¡¥argc¤¬-2¤Î»þ¤Ï°ú
-¿ô¤ÏRuby¤ÎÇÛÎó¤È¤·¤ÆÅϤµ¤ì¤Þ¤¹¡¥
-
-¥á¥½¥Ã¥É¤òÄêµÁ¤¹¤ë´Ø¿ô¤Ï¤â¤¦Æó¤Ä¤¢¤ê¤Þ¤¹¡¥¤Ò¤È¤Ä¤Ïprivate¥á
-¥½¥Ã¥É¤òÄêµÁ¤¹¤ë´Ø¿ô¤Ç¡¤°ú¿ô¤Ïrb_define_method()¤ÈƱ¤¸¤Ç¤¹¡¥
-
- void rb_define_private_method(VALUE klass, const char *name,
- VALUE (*func)(), int argc)
-
-private¥á¥½¥Ã¥É¤È¤Ï´Ø¿ô·Á¼°¤Ç¤·¤«¸Æ¤Ó½Ð¤¹¤³¤È¤Î½ÐÍè¤Ê¤¤¥á¥½¥Ã
-¥É¤Ç¤¹¡¥
-
-¤â¤¦¤Ò¤È¤Ä¤Ï¥â¥¸¥å¡¼¥ë´Ø¿ô¤òÄêµÁ¤¹¤ë¤â¤Î¤Ç¤¹¡¥¥â¥¸¥å¡¼¥ë´Ø¿ô
-¤È¤Ï¥â¥¸¥å¡¼¥ë¤ÎÆÃ°Û¥á¥½¥Ã¥É¤Ç¤¢¤ê¡¤Æ±»þ¤Ëprivate¥á¥½¥Ã¥É¤Ç
-¤â¤¢¤ë¤â¤Î¤Ç¤¹¡¥Îã¤ò¤¢¤²¤ë¤ÈMath¥â¥¸¥å¡¼¥ë¤Îsqrt()¤Ê¤É¤¬¤¢¤²
-¤é¤ì¤Þ¤¹¡¥¤³¤Î¥á¥½¥Ã¥É¤Ï
-
- Math.sqrt(4)
-
-¤È¤¤¤¦·Á¼°¤Ç¤â
-
- include Math
- sqrt(4)
-
-¤È¤¤¤¦·Á¼°¤Ç¤â»È¤¨¤Þ¤¹¡¥¥â¥¸¥å¡¼¥ë´Ø¿ô¤òÄêµÁ¤¹¤ë´Ø¿ô¤Ï°Ê²¼¤Î
-Ä̤ê¤Ç¤¹¡¥
-
- void rb_define_module_function(VALUE module, const char *name,
- VALUE (*func)(), int argc)
-
-´Ø¿ôŪ¥á¥½¥Ã¥É(Kernel¥â¥¸¥å¡¼¥ë¤Îprivate method)¤òÄêµÁ¤¹¤ë¤¿
-¤á¤Î´Ø¿ô¤Ï°Ê²¼¤ÎÄ̤ê¤Ç¤¹¡¥
-
- void rb_define_global_function(const char *name, VALUE (*func)(), int argc)
-
-
-¥á¥½¥Ã¥É¤ÎÊÌ̾¤òÄêµÁ¤¹¤ë¤¿¤á¤Î´Ø¿ô¤Ï°Ê²¼¤ÎÄ̤ê¤Ç¤¹¡£
-
- void rb_define_alias(VALUE module, const char* new, const char* old);
-
-2.1.3 Äê¿ôÄêµÁ
-
-³ÈÄ¥¥é¥¤¥Ö¥é¥ê¤¬É¬ÍפÊÄê¿ô¤Ï¤¢¤é¤«¤¸¤áÄêµÁ¤·¤Æ¤ª¤¤¤¿Êý¤¬Îɤ¤
-¤Ç¤·¤ç¤¦¡¥Äê¿ô¤òÄêµÁ¤¹¤ë´Ø¿ô¤ÏÆó¤Ä¤¢¤ê¤Þ¤¹¡¥
-
- void rb_define_const(VALUE klass, const char *name, VALUE val)
- void rb_define_global_const(const char *name, VALUE val)
-
-Á°¼Ô¤ÏÆÃÄê¤Î¥¯¥é¥¹/¥â¥¸¥å¡¼¥ë¤Ë°¤¹¤ëÄê¿ô¤òÄêµÁ¤¹¤ë¤â¤Î¡¤¸å
-¼Ô¤Ï¥°¥í¡¼¥Ð¥ë¤ÊÄê¿ô¤òÄêµÁ¤¹¤ë¤â¤Î¤Ç¤¹¡¥
-
-2.2 Ruby¤Îµ¡Ç½¤òC¤«¤é¸Æ¤Ó½Ð¤¹
-
-´û¤Ë¡Ø1.5 Ruby¤Î¥Ç¡¼¥¿¤òÁàºî¤¹¤ë¡Ù¤Ç°ìÉô¾Ò²ð¤·¤¿¤è¤¦¤Ê´Ø¿ô¤ò
-»È¤¨¤Ð¡¤Ruby¤Îµ¡Ç½¤ò¼Â¸½¤·¤Æ¤¤¤ë´Ø¿ô¤òľÀܸƤӽФ¹¤³¤È¤¬½ÐÍè
-¤Þ¤¹¡¥
-
-# ¤³¤Î¤è¤¦¤Ê´Ø¿ô¤Î°ìÍ÷ɽ¤Ï¤¤¤Þ¤Î¤È¤³¤í¤¢¤ê¤Þ¤»¤ó¡¥¥½¡¼¥¹¤ò¸«
-# ¤ë¤·¤«¤Ê¤¤¤Ç¤¹¤Í¡¥
-
-¤½¤ì°Ê³°¤Ë¤âRuby¤Îµ¡Ç½¤ò¸Æ¤Ó½Ð¤¹ÊýË¡¤Ï¤¤¤¯¤Ä¤«¤¢¤ê¤Þ¤¹¡¥
-
-2.2.1 Ruby¤Î¥×¥í¥°¥é¥à¤òeval¤¹¤ë
-
-C¤«¤éRuby¤Îµ¡Ç½¤ò¸Æ¤Ó½Ð¤¹¤â¤Ã¤È¤â´Êñ¤ÊÊýË¡¤È¤·¤Æ¡¤Ê¸»úÎó¤Ç
-Í¿¤¨¤é¤ì¤¿Ruby¤Î¥×¥í¥°¥é¥à¤òɾ²Á¤¹¤ë°Ê²¼¤Î´Ø¿ô¤¬¤¢¤ê¤Þ¤¹¡¥
-
- VALUE rb_eval_string(const char *str)
-
-¤³¤Îɾ²Á¤Ï¸½ºß¤Î´Ä¶­¤Ç¹Ô¤ï¤ì¤Þ¤¹¡¥¤Ä¤Þ¤ê¡¤¸½ºß¤Î¥í¡¼¥«¥ëÊÑ¿ô
-¤Ê¤É¤ò¼õ¤±·Ñ¤®¤Þ¤¹¡¥
-
-2.2.2 ID¤Þ¤¿¤Ï¥·¥ó¥Ü¥ë
-
-C¤«¤éʸ»úÎó¤ò·Ðͳ¤»¤º¤ËRuby¤Î¥á¥½¥Ã¥É¤ò¸Æ¤Ó½Ð¤¹¤³¤È¤â¤Ç¤­¤Þ
-¤¹¡¥¤½¤ÎÁ°¤Ë¡¤Ruby¥¤¥ó¥¿¥×¥ê¥¿Æâ¤Ç¥á¥½¥Ã¥É¤äÊÑ¿ô̾¤ò»ØÄꤹ¤ë
-»þ¤Ë»È¤ï¤ì¤Æ¤¤¤ëID¤Ë¤Ä¤¤¤ÆÀâÌÀ¤·¤Æ¤ª¤­¤Þ¤·¤ç¤¦¡¥
-
-ID¤È¤ÏÊÑ¿ô̾¡¤¥á¥½¥Ã¥É̾¤òɽ¤¹À°¿ô¤Ç¤¹¡¥Ruby¤ÎÃæ¤Ç¤Ï
-
- :¼±ÊÌ»Ò
-
-¤Ç¥¢¥¯¥»¥¹¤Ç¤­¤Þ¤¹¡¥C¤«¤é¤³¤ÎÀ°¿ô¤òÆÀ¤ë¤¿¤á¤Ë¤Ï´Ø¿ô
-
- rb_intern(const char *name)
-
-¤ò»È¤¤¤Þ¤¹¡¥Ruby¤«¤é°ú¿ô¤È¤·¤ÆÍ¿¤¨¤é¤ì¤¿¥·¥ó¥Ü¥ë(¤Þ¤¿¤Ïʸ»ú
-Îó)¤òID¤ËÊÑ´¹¤¹¤ë¤Ë¤Ï°Ê²¼¤Î´Ø¿ô¤ò»È¤¤¤Þ¤¹¡¥
-
- rb_to_id(VALUE symbol)
-
-2.2.3 C¤«¤éRuby¤Î¥á¥½¥Ã¥É¤ò¸Æ¤Ó½Ð¤¹
-
-C¤«¤éʸ»úÎó¤ò·Ðͳ¤»¤º¤ËRuby¤Î¥á¥½¥Ã¥É¤ò¸Æ¤Ó½Ð¤¹¤¿¤á¤Ë¤Ï°Ê²¼
-¤Î´Ø¿ô¤ò»È¤¤¤Þ¤¹¡¥
-
- VALUE rb_funcall(VALUE recv, ID mid, int argc, ...)
-
-¤³¤Î´Ø¿ô¤Ï¥ª¥Ö¥¸¥§¥¯¥Èrecv¤Îmid¤Ç»ØÄꤵ¤ì¤ë¥á¥½¥Ã¥É¤ò¸Æ¤Ó½Ð
-¤·¤Þ¤¹¡¥¤½¤Î¾¤Ë°ú¿ô¤Î»ØÄê¤Î»ÅÊý¤¬°ã¤¦°Ê²¼¤Î´Ø¿ô¤â¤¢¤ê¤Þ¤¹¡¥
-
- VALUE rb_funcall2(VALUE recv, ID mid, int argc, VALUE *argv)
- VALUE rb_apply(VALUE recv, ID mid, VALUE args)
-
-apply¤Ë¤Ï°ú¿ô¤È¤·¤ÆRuby¤ÎÇÛÎó¤òÍ¿¤¨¤Þ¤¹¡¥
-
-2.2.4 ÊÑ¿ô/Äê¿ô¤ò»²¾È/¹¹¿·¤¹¤ë
-
-C¤«¤é´Ø¿ô¤ò»È¤Ã¤Æ»²¾È¡¦¹¹¿·¤Ç¤­¤ë¤Î¤Ï¡¤Äê¿ô¡¤¥¤¥ó¥¹¥¿¥ó¥¹ÊÑ
-¿ô¤Ç¤¹¡¥Âç°èÊÑ¿ô¤Ï°ìÉô¤Î¤â¤Î¤ÏC¤ÎÂç°èÊÑ¿ô¤È¤·¤Æ¥¢¥¯¥»¥¹¤Ç¤­
-¤Þ¤¹¡¥¥í¡¼¥«¥ëÊÑ¿ô¤ò»²¾È¤¹¤ëÊýË¡¤Ï¸ø³«¤·¤Æ¤¤¤Þ¤»¤ó¡¥
-
-¥ª¥Ö¥¸¥§¥¯¥È¤Î¥¤¥ó¥¹¥¿¥ó¥¹ÊÑ¿ô¤ò»²¾È¡¦¹¹¿·¤¹¤ë´Ø¿ô¤Ï°Ê²¼¤ÎÄÌ
-¤ê¤Ç¤¹¡¥
-
- VALUE rb_ivar_get(VALUE obj, ID id)
- VALUE rb_ivar_set(VALUE obj, ID id, VALUE val)
-
-id¤Ïrb_intern()¤ÇÆÀ¤é¤ì¤ë¤â¤Î¤ò»È¤Ã¤Æ¤¯¤À¤µ¤¤¡¥
-
-Äê¿ô¤ò»²¾È¤¹¤ë¤Ë¤Ï°Ê²¼¤Î´Ø¿ô¤ò»È¤Ã¤Æ¤¯¤À¤µ¤¤¡¥
-
- VALUE rb_const_get(VALUE obj, ID id)
-
-Äê¿ô¤ò¿·¤·¤¯ÄêµÁ¤¹¤ë¤¿¤á¤Ë¤Ï¡Ø2.1.3 Äê¿ôÄêµÁ¡Ù¤Ç¾Ò²ð¤µ
-¤ì¤Æ¤¤¤ë´Ø¿ô¤ò»È¤Ã¤Æ¤¯¤À¤µ¤¤¡¥
-
-3¡¥Ruby¤ÈC¤È¤Î¾ðÊó¶¦Í­
-
-C¸À¸ì¤ÈRuby¤Î´Ö¤Ç¾ðÊó¤ò¶¦Í­¤¹¤ëÊýË¡¤Ë¤Ä¤¤¤Æ²òÀ⤷¤Þ¤¹¡¥
-
-3.1 C¤«¤é»²¾È¤Ç¤­¤ëRuby¤ÎÄê¿ô
-
-°Ê²¼¤ÎRuby¤ÎÄê¿ô¤ÏC¤Î¥ì¥Ù¥ë¤«¤é»²¾È¤Ç¤­¤Þ¤¹¡¥
-
- Qtrue
- Qfalse
-
- ¿¿µ¶ÃÍ¡¥Qfalse¤ÏC¸À¸ì¤Ç¤âµ¶¤È¤ß¤Ê¤µ¤ì¤Þ¤¹(¤Ä¤Þ¤ê0)¡¥
-
- Qnil
-
- C¸À¸ì¤«¤é¸«¤¿¡Önil¡×¡¥
-
-3.2 C¤ÈRuby¤Ç¶¦Í­¤µ¤ì¤ëÂç°èÊÑ¿ô
-
-C¤ÈRuby¤ÇÂç°èÊÑ¿ô¤ò»È¤Ã¤Æ¾ðÊó¤ò¶¦Í­¤Ç¤­¤Þ¤¹¡¥¶¦Í­¤Ç¤­¤ëÂç°è
-ÊÑ¿ô¤Ë¤Ï¤¤¤¯¤Ä¤«¤Î¼ïÎब¤¢¤ê¤Þ¤¹¡¥¤½¤Î¤Ê¤«¤Ç¤â¤Ã¤È¤âÎɤ¯»È¤ï
-¤ì¤ë¤È»×¤ï¤ì¤ë¤Î¤Ïrb_define_variable()¤Ç¤¹¡¥
-
- void rb_define_variable(const char *name, VALUE *var)
-
-¤³¤Î´Ø¿ô¤ÏRuby¤ÈC¤È¤Ç¶¦Í­¤¹¤ëÂç°èÊÑ¿ô¤òÄêµÁ¤·¤Þ¤¹¡¥ÊÑ¿ô̾¤¬
-`$'¤Ç»Ï¤Þ¤é¤Ê¤¤»þ¤Ë¤Ï¼«Æ°Åª¤ËÄɲ䵤ì¤Þ¤¹¡¥¤³¤ÎÊÑ¿ô¤ÎÃͤòÊÑ
-¹¹¤¹¤ë¤È¼«Æ°Åª¤ËRuby¤ÎÂбþ¤¹¤ëÊÑ¿ô¤ÎÃͤâÊѤï¤ê¤Þ¤¹¡¥
-
-¤Þ¤¿Ruby¦¤«¤é¤Ï¹¹¿·¤Ç¤­¤Ê¤¤ÊÑ¿ô¤â¤¢¤ê¤Þ¤¹¡¥¤³¤Îread only¤Î
-ÊÑ¿ô¤Ï°Ê²¼¤Î´Ø¿ô¤ÇÄêµÁ¤·¤Þ¤¹¡¥
-
- void rb_define_readonly_variable(const char *name, VALUE *var)
-
-¤³¤ì¤éÊÑ¿ô¤Î¾¤Ëhook¤ò¤Ä¤±¤¿Âç°èÊÑ¿ô¤òÄêµÁ¤Ç¤­¤Þ¤¹¡¥hookÉÕ¤­
-¤ÎÂç°èÊÑ¿ô¤Ï°Ê²¼¤Î´Ø¿ô¤òÍѤ¤¤ÆÄêµÁ¤·¤Þ¤¹¡¥hookÉÕ¤­Âç°èÊÑ¿ô¤Î
-Ãͤλ²¾È¤äÀßÄê¤Ïhook¤Ç¹Ô¤¦É¬Íפ¬¤¢¤ê¤Þ¤¹¡¥
-
- void rb_define_hooked_variable(const char *name, VALUE *var,
- VALUE (*getter)(), void (*setter)())
-
-¤³¤Î´Ø¿ô¤ÏC¤Î´Ø¿ô¤Ë¤è¤Ã¤Æhook¤Î¤Ä¤±¤é¤ì¤¿Âç°èÊÑ¿ô¤òÄêµÁ¤·¤Þ
-¤¹¡¥ÊÑ¿ô¤¬»²¾È¤µ¤ì¤¿»þ¤Ë¤Ï´Ø¿ôgetter¤¬¡¤ÊÑ¿ô¤ËÃͤ¬¥»¥Ã¥È¤µ¤ì
-¤¿»þ¤Ë¤Ï´Ø¿ôsetter¤¬¸Æ¤Ð¤ì¤ë¡¥hook¤ò»ØÄꤷ¤Ê¤¤¾ì¹ç¤Ïgetter¤ä
-setter¤Ë0¤ò»ØÄꤷ¤Þ¤¹¡¥
-
-# getter¤âsetter¤â0¤Ê¤é¤Ðrb_define_variable()¤ÈƱ¤¸¤Ë¤Ê¤ë¡¥
-
-¤½¤ì¤«¤é¡¤C¤Î´Ø¿ô¤Ë¤è¤Ã¤Æ¼Â¸½¤µ¤ì¤ëRuby¤ÎÂç°èÊÑ¿ô¤òÄêµÁ¤¹¤ë
-´Ø¿ô¤¬¤¢¤ê¤Þ¤¹¡¥
-
- void rb_define_virtual_variable(const char *name,
- VALUE (*getter)(), void (*setter)())
-
-¤³¤Î´Ø¿ô¤Ë¤è¤Ã¤ÆÄêµÁ¤µ¤ì¤¿Ruby¤ÎÂç°èÊÑ¿ô¤¬»²¾È¤µ¤ì¤¿»þ¤Ë¤Ï
-getter¤¬¡¤ÊÑ¿ô¤ËÃͤ¬¥»¥Ã¥È¤µ¤ì¤¿»þ¤Ë¤Ïsetter¤¬¸Æ¤Ð¤ì¤Þ¤¹¡¥
-
-getter¤Èsetter¤Î»ÅÍͤϰʲ¼¤ÎÄ̤ê¤Ç¤¹¡¥
-
- (*getter)(ID id, void *data, struct global_entry* entry);
- (*setter)(VALUE val, ID id, void *data, struct global_entry* entry);
-
-3.3 C¤Î¥Ç¡¼¥¿¤òRuby¥ª¥Ö¥¸¥§¥¯¥È¤Ë¤¹¤ë
-
-C¤ÎÀ¤³¦¤ÇÄêµÁ¤µ¤ì¤¿¥Ç¡¼¥¿(¹½Â¤ÂÎ)¤òRuby¤Î¥ª¥Ö¥¸¥§¥¯¥È¤È¤·¤Æ
-¼è¤ê°·¤¤¤¿¤¤¾ì¹ç¤¬¤¢¤ê¤¨¤Þ¤¹¡¥¤³¤Î¤è¤¦¤Ê¾ì¹ç¤Ë¤Ï¡¤Data¤È¤¤¤¦
-Ruby¥ª¥Ö¥¸¥§¥¯¥È¤ËC¤Î¹½Â¤ÂÎ(¤Ø¤Î¥Ý¥¤¥ó¥¿)¤ò¤¯¤ë¤à¤³¤È¤ÇRuby
-¥ª¥Ö¥¸¥§¥¯¥È¤È¤·¤Æ¼è¤ê°·¤¨¤ë¤è¤¦¤Ë¤Ê¤ê¤Þ¤¹¡¥
-
-Data¥ª¥Ö¥¸¥§¥¯¥È¤òÀ¸À®¤·¤Æ¹½Â¤ÂΤòRuby¥ª¥Ö¥¸¥§¥¯¥È¤Ë¥«¥×¥»¥ë
-²½¤¹¤ë¤¿¤á¤Ë¤Ï¡¤°Ê²¼¤Î¥Þ¥¯¥í¤ò»È¤¤¤Þ¤¹¡¥
-
- Data_Wrap_Struct(klass, mark, free, ptr)
-
-¤³¤Î¥Þ¥¯¥í¤ÎÌá¤êÃͤÏÀ¸À®¤µ¤ì¤¿Data¥ª¥Ö¥¸¥§¥¯¥È¤Ç¤¹¡¥
-
-klass¤Ï¤³¤ÎData¥ª¥Ö¥¸¥§¥¯¥È¤Î¥¯¥é¥¹¤Ç¤¹¡¥ptr¤Ï¥«¥×¥»¥ë²½¤¹¤ë
-C¤Î¹½Â¤ÂΤؤΥݥ¤¥ó¥¿¤Ç¤¹¡¥mark¤Ï¤³¤Î¹½Â¤ÂΤ¬Ruby¤Î¥ª¥Ö¥¸¥§
-¥¯¥È¤Ø¤Î»²¾È¤¬¤¢¤ë»þ¤Ë»È¤¦´Ø¿ô¤Ç¤¹¡¥¤½¤Î¤è¤¦¤Ê»²¾È¤ò´Þ¤Þ¤Ê¤¤
-»þ¤Ë¤Ï0¤ò»ØÄꤷ¤Þ¤¹¡¥
-
-# ¤½¤Î¤è¤¦¤Ê»²¾È¤Ï´«¤á¤é¤ì¤Þ¤»¤ó¡¥
-
-free¤Ï¤³¤Î¹½Â¤ÂΤ¬¤â¤¦ÉÔÍפˤʤä¿»þ¤Ë¸Æ¤Ð¤ì¤ë´Ø¿ô¤Ç¤¹¡¥¤³¤Î
-´Ø¿ô¤¬¥¬¡¼¥Ù¡¼¥¸¥³¥ì¥¯¥¿¤«¤é¸Æ¤Ð¤ì¤Þ¤¹¡¥
-
-C¤Î¹½Â¤ÂΤγäÅö¤ÈData¥ª¥Ö¥¸¥§¥¯¥È¤ÎÀ¸À®¤òƱ»þ¤Ë¹Ô¤¦¥Þ¥¯¥í¤È
-¤·¤Æ°Ê²¼¤Î¤â¤Î¤¬Ä󶡤µ¤ì¤Æ¤¤¤Þ¤¹¡¥
-
- Data_Make_Struct(klass, type, mark, free, sval)
-
-¤³¤Î¥Þ¥¯¥í¤ÎÌá¤êÃͤÏÀ¸À®¤µ¤ì¤¿Data¥ª¥Ö¥¸¥§¥¯¥È¤Ç¤¹¡¥
-
-klass, mark, free¤ÏData_Wrap_Struct¤ÈƱ¤¸Æ¯¤­¤ò¤·¤Þ¤¹¡¥type
-¤Ï³ä¤êÅö¤Æ¤ëC¹½Â¤ÂΤη¿¤Ç¤¹¡¥³ä¤êÅö¤Æ¤é¤ì¤¿¹½Â¤ÂΤÏÊÑ¿ôsval
-¤ËÂåÆþ¤µ¤ì¤Þ¤¹¡¥¤³¤ÎÊÑ¿ô¤Î·¿¤Ï (type*) ¤Ç¤¢¤ëɬÍפ¬¤¢¤ê¤Þ¤¹¡¥
-
-Data¥ª¥Ö¥¸¥§¥¯¥È¤«¤é¥Ý¥¤¥ó¥¿¤ò¼è¤ê½Ð¤¹¤Î¤Ï°Ê²¼¤Î¥Þ¥¯¥í¤òÍѤ¤
-¤Þ¤¹¡¥
-
- Data_Get_Struct(obj, type, sval)
-
-C¤Î¹½Â¤ÂΤؤΥݥ¤¥ó¥¿¤ÏÊÑ¿ôsval¤ËÂåÆþ¤µ¤ì¤Þ¤¹¡¥
-
-¤³¤ì¤é¤ÎData¤Î»È¤¤Êý¤Ï¤Á¤ç¤Ã¤Èʬ¤«¤ê¤Ë¤¯¤¤¤Î¤Ç¡¤¸å¤ÇÀâÌÀ¤¹¤ë
-ÎãÂê¤ò»²¾È¤·¤Æ¤¯¤À¤µ¤¤¡¥
-
-4¡¥ÎãÂê - dbm¥Ñ¥Ã¥±¡¼¥¸¤òºî¤ë
-
-¤³¤³¤Þ¤Ç¤ÎÀâÌÀ¤Ç¤È¤ê¤¢¤¨¤º³ÈÄ¥¥é¥¤¥Ö¥é¥ê¤Ïºî¤ì¤ë¤Ï¤º¤Ç¤¹¡¥
-Ruby¤Îext¥Ç¥£¥ì¥¯¥È¥ê¤Ë¤¹¤Ç¤Ë´Þ¤Þ¤ì¤Æ¤¤¤ëdbm¥é¥¤¥Ö¥é¥ê¤òÎã¤Ë
-¤·¤ÆÃʳ¬Åª¤ËÀâÌÀ¤·¤Þ¤¹¡¥
-
-(1) ¥Ç¥£¥ì¥¯¥È¥ê¤òºî¤ë
-
- % mkdir ext/dbm
-
-Ruby 1.1¤«¤é¤ÏǤ°Õ¤Î¥Ç¥£¥ì¥¯¥È¥ê¤Ç¥À¥¤¥Ê¥ß¥Ã¥¯¥é¥¤¥Ö¥é¥ê¤òºî
-¤ë¤³¤È¤¬¤Ç¤­¤ë¤è¤¦¤Ë¤Ê¤ê¤Þ¤·¤¿¡¥Ruby¤ËÀÅŪ¤Ë¥ê¥ó¥¯¤¹¤ë¾ì¹ç¤Ë
-¤ÏRuby¤òŸ³«¤·¤¿¥Ç¥£¥ì¥¯¥È¥ê¤Î²¼¡¤ext¥Ç¥£¥ì¥¯¥È¥ê¤ÎÃæ¤Ë³ÈÄ¥
-¥é¥¤¥Ö¥é¥êÍѤΥǥ£¥ì¥¯¥È¥ê¤òºî¤ëɬÍפ¬¤¢¤ê¤Þ¤¹¡¥Ì¾Á°¤ÏŬÅö¤Ë
-Áª¤ó¤Ç¹½¤¤¤Þ¤»¤ó¡¥
-
-(2) MANIFEST¥Õ¥¡¥¤¥ë¤òºî¤ë
-
- % cd ext/dbm
- % touch MANIFEST
-
-³ÈÄ¥¥é¥¤¥Ö¥é¥ê¤Î¥Ç¥£¥ì¥¯¥È¥ê¤Î²¼¤Ë¤ÏMANIFEST¤È¤¤¤¦¥Õ¥¡¥¤¥ë¤¬
-ɬÍפʤΤǡ¤¤È¤ê¤¢¤¨¤º¶õ¤Î¥Õ¥¡¥¤¥ë¤òºî¤Ã¤Æ¤ª¤­¤Þ¤¹¡¥¸å¤Ç¤³¤Î
-¥Õ¥¡¥¤¥ë¤Ë¤ÏɬÍפʥե¡¥¤¥ë°ìÍ÷¤¬Æþ¤ë¤³¤È¤Ë¤Ê¤ê¤Þ¤¹¡¥
-
-MANIFEST¤È¤¤¤¦¥Õ¥¡¥¤¥ë¤Ï¡¤ÀÅŪ¥ê¥ó¥¯¤Îmake¤Î»þ¤Ë¥Ç¥£¥ì¥¯¥È¥ê
-¤¬³ÈÄ¥¥é¥¤¥Ö¥é¥ê¤ò´Þ¤ó¤Ç¤¤¤ë¤«¤É¤¦¤«È½Äꤹ¤ë¤¿¤á¤Ë»È¤ï¤ì¤ì¤Æ
-¤¤¤Þ¤¹¡¥¥À¥¤¥Ê¥ß¥Ã¥¯¥é¥¤¥Ö¥é¥ê¤òºî¤ë¾ì¹ç¤Ë¤Ïɬ¤º¤·¤âɬÍפǤÏ
-¤¢¤ê¤Þ¤»¤ó¡¥
-
-(3) À߷פ¹¤ë
-
-¤Þ¤¢¡¤ÅöÁ³¤Ê¤ó¤Ç¤¹¤±¤É¡¤¤É¤¦¤¤¤¦µ¡Ç½¤ò¼Â¸½¤¹¤ë¤«¤É¤¦¤«¤Þ¤ºÀß
-·×¤¹¤ëɬÍפ¬¤¢¤ê¤Þ¤¹¡¥¤É¤ó¤Ê¥¯¥é¥¹¤ò¤Ä¤¯¤ë¤«¡¤¤½¤Î¥¯¥é¥¹¤Ë¤Ï
-¤É¤ó¤Ê¥á¥½¥Ã¥É¤¬¤¢¤ë¤«¡¤¥¯¥é¥¹¤¬Ä󶡤¹¤ëÄê¿ô¤Ê¤É¤Ë¤Ä¤¤¤ÆÀß·×
-¤·¤Þ¤¹¡¥
-
-(4) C¥³¡¼¥É¤ò½ñ¤¯
-
-³ÈÄ¥¥é¥¤¥Ö¥é¥êËÜÂΤȤʤëC¸À¸ì¤Î¥½¡¼¥¹¤ò½ñ¤­¤Þ¤¹¡¥C¸À¸ì¤Î¥½¡¼
-¥¹¤¬¤Ò¤È¤Ä¤Î»þ¤Ë¤Ï¡Ö¥é¥¤¥Ö¥é¥ê̾.c¡×¤òÁª¤Ö¤ÈÎɤ¤¤Ç¤·¤ç¤¦¡¥C
-¸À¸ì¤Î¥½¡¼¥¹¤¬Ê£¿ô¤Î¾ì¹ç¤Ë¤ÏµÕ¤Ë¡Ö¥é¥¤¥Ö¥é¥ê̾.c¡×¤È¤¤¤¦¥Õ¥¡
-¥¤¥ë̾¤ÏÈò¤±¤ëɬÍפ¬¤¢¤ê¤Þ¤¹¡¥¥ª¥Ö¥¸¥§¥¯¥È¥Õ¥¡¥¤¥ë¤È¥â¥¸¥å¡¼
-¥ëÀ¸À®»þ¤ËÃæ´ÖŪ¤ËÀ¸À®¤µ¤ì¤ë¡Ö¥é¥¤¥Ö¥é¥ê̾.o¡×¤È¤¤¤¦¥Õ¥¡¥¤¥ë
-¤È¤¬¾×ÆÍ¤¹¤ë¤«¤é¤Ç¤¹¡¥
-
-Ruby¤Ï³ÈÄ¥¥é¥¤¥Ö¥é¥ê¤ò¥í¡¼¥É¤¹¤ë»þ¤Ë¡ÖInit_¥é¥¤¥Ö¥é¥ê̾¡×¤È
-¤¤¤¦´Ø¿ô¤ò¼«Æ°Åª¤Ë¼Â¹Ô¤·¤Þ¤¹¡¥dbm¥é¥¤¥Ö¥é¥ê¤Î¾ì¹ç¡ÖInit_dbm¡×
-¤Ç¤¹¡¥¤³¤Î´Ø¿ô¤ÎÃæ¤Ç¥¯¥é¥¹¡¤¥â¥¸¥å¡¼¥ë¡¤¥á¥½¥Ã¥É¡¤Äê¿ô¤Ê¤É¤Î
-ÄêµÁ¤ò¹Ô¤¤¤Þ¤¹¡¥dbm.c¤«¤é°ìÉô°úÍѤ·¤Þ¤¹¡¥
-
---
-Init_dbm()
-{
- /* DBM¥¯¥é¥¹¤òÄêµÁ¤¹¤ë */
- cDBM = rb_define_class("DBM", rb_cObject);
- /* DBM¤ÏEnumerate¥â¥¸¥å¡¼¥ë¤ò¥¤¥ó¥¯¥ë¡¼¥É¤¹¤ë */
- rb_include_module(cDBM, rb_mEnumerable);
-
- /* DBM¥¯¥é¥¹¤Î¥¯¥é¥¹¥á¥½¥Ã¥Éopen(): °ú¿ô¤ÏC¤ÎÇÛÎó¤Ç¼õ¤±¤ë */
- rb_define_singleton_method(cDBM, "open", fdbm_s_open, -1);
-
- /* DBM¥¯¥é¥¹¤Î¥á¥½¥Ã¥Éclose(): °ú¿ô¤Ï¤Ê¤· */
- rb_define_method(cDBM, "close", fdbm_close, 0);
- /* DBM¥¯¥é¥¹¤Î¥á¥½¥Ã¥É[]: °ú¿ô¤Ï1¸Ä */
- rb_define_method(cDBM, "[]", fdbm_fetch, 1);
- :
-
- /* DBM¥Ç¡¼¥¿¤ò³ÊǼ¤¹¤ë¥¤¥ó¥¹¥¿¥ó¥¹ÊÑ¿ô̾¤Î¤¿¤á¤ÎID */
- id_dbm = rb_intern("dbm");
-}
---
-
-DBM¥é¥¤¥Ö¥é¥ê¤Ïdbm¤Î¥Ç¡¼¥¿¤ÈÂбþ¤¹¤ë¥ª¥Ö¥¸¥§¥¯¥È¤Ë¤Ê¤ë¤Ï¤º¤Ç
-¤¹¤«¤é¡¤C¤ÎÀ¤³¦¤Îdbm¤òRuby¤ÎÀ¤³¦¤Ë¼è¤ê¹þ¤àɬÍפ¬¤¢¤ê¤Þ¤¹¡¥
-
-
-dbm.c¤Ç¤ÏData_Make_Struct¤ò°Ê²¼¤Î¤è¤¦¤Ë»È¤Ã¤Æ¤¤¤Þ¤¹¡¥
-
---
-struct dbmdata {
- int di_size;
- DBM *di_dbm;
-};
-
-
-obj = Data_Make_Struct(klass, struct dbmdata, 0, free_dbm, dbmp);
---
-
-¤³¤³¤Ç¤Ïdbmstruct¹½Â¤ÂΤؤΥݥ¤¥ó¥¿¤òData¤Ë¥«¥×¥»¥ë²½¤·¤Æ¤¤
-¤Þ¤¹¡¥DBM*¤òľÀÜ¥«¥×¥»¥ë²½¤·¤Ê¤¤¤Î¤Ïclose()¤·¤¿»þ¤Î½èÍý¤ò¹Í
-¤¨¤Æ¤Î¤³¤È¤Ç¤¹¡¥
-
-Data¥ª¥Ö¥¸¥§¥¯¥È¤«¤édbmstruct¹½Â¤ÂΤΥݥ¤¥ó¥¿¤ò¼è¤ê½Ð¤¹¤¿¤á
-¤Ë°Ê²¼¤Î¥Þ¥¯¥í¤ò»È¤Ã¤Æ¤¤¤Þ¤¹¡¥
-
---
-#define GetDBM(obj, dbmp) {\
- Data_Get_Struct(obj, struct dbmdata, dbmp);\
- if (dbmp->di_dbm == 0) closed_dbm();\
-}
---
-
-¤Á¤ç¤Ã¤ÈÊ£»¨¤Ê¥Þ¥¯¥í¤Ç¤¹¤¬¡¤Íפ¹¤ë¤Ëdbmdata¹½Â¤ÂΤΥݥ¤¥ó¥¿
-¤Î¼è¤ê½Ð¤·¤È¡¤close¤µ¤ì¤Æ¤¤¤ë¤«¤É¤¦¤«¤Î¥Á¥§¥Ã¥¯¤ò¤Þ¤È¤á¤Æ¤¤
-¤ë¤À¤±¤Ç¤¹¡¥
-
-DBM¥¯¥é¥¹¤Ë¤Ï¤¿¤¯¤µ¤ó¥á¥½¥Ã¥É¤¬¤¢¤ê¤Þ¤¹¤¬¡¤Ê¬Îह¤ë¤È3¼ïÎà¤Î
-°ú¿ô¤Î¼õ¤±Êý¤¬¤¢¤ê¤Þ¤¹¡¥¤Ò¤È¤Ä¤Ï°ú¿ô¤Î¿ô¤¬¸ÇÄê¤Î¤â¤Î¤Ç¡¤Îã¤È
-¤·¤Æ¤Ïdelete¥á¥½¥Ã¥É¤¬¤¢¤ê¤Þ¤¹¡¥delete¥á¥½¥Ã¥É¤ò¼ÂÁõ¤·¤Æ¤¤¤ë
-fdbm_delete()¤Ï¤³¤Î¤è¤¦¤Ë¤Ê¤Ã¤Æ¤¤¤Þ¤¹¡¥
-
---
-static VALUE
-fdbm_delete(obj, keystr)
- VALUE obj, keystr;
-{
- :
-}
---
-
-°ú¿ô¤Î¿ô¤¬¸ÇÄê¤Î¥¿¥¤¥×¤ÏÂè1°ú¿ô¤¬self¡¤Âè2°ú¿ô°Ê¹ß¤¬¥á¥½¥Ã¥É
-¤Î°ú¿ô¤È¤Ê¤ê¤Þ¤¹¡¥
-
-°ú¿ô¤Î¿ô¤¬ÉÔÄê¤Î¤â¤Î¤ÏC¤ÎÇÛÎó¤Ç¼õ¤±¤ë¤â¤Î¤ÈRuby¤ÎÇÛÎó¤Ç¼õ¤±
-¤ë¤â¤Î¤È¤¬¤¢¤ê¤Þ¤¹¡¥dbm¥é¥¤¥Ö¥é¥ê¤ÎÃæ¤Ç¡¤C¤ÎÇÛÎó¤Ç¼õ¤±¤ë¤â¤Î
-¤ÏDBM¤Î¥¯¥é¥¹¥á¥½¥Ã¥É¤Ç¤¢¤ëopen()¤Ç¤¹¡¥¤³¤ì¤ò¼ÂÁõ¤·¤Æ¤¤¤ë´Ø
-¿ôfdbm_s_open()¤Ï¤³¤¦¤Ê¤Ã¤Æ¤¤¤Þ¤¹¡¥
-
---
-static VALUE
-fdbm_s_open(argc, argv, klass)
- int argc;
- VALUE *argv;
- VALUE klass;
-{
- :
- if (rb_scan_args(argc, argv, "11", &file, &vmode) == 1) {
- mode = 0666; /* default value */
- }
- :
-}
---
-
-¤³¤Î¥¿¥¤¥×¤Î´Ø¿ô¤ÏÂè1°ú¿ô¤¬Í¿¤¨¤é¤ì¤¿°ú¿ô¤Î¿ô¡¤Âè2°ú¿ô¤¬Í¿¤¨
-¤é¤ì¤¿°ú¿ô¤ÎÆþ¤Ã¤Æ¤¤¤ëÇÛÎó¤Ë¤Ê¤ê¤Þ¤¹¡¥self¤ÏÂè3°ú¿ô¤È¤·¤ÆÍ¿
-¤¨¤é¤ì¤Þ¤¹¡¥
-
-¤³¤ÎÇÛÎó¤ÇÍ¿¤¨¤é¤ì¤¿°ú¿ô¤ò²òÀϤ¹¤ë¤¿¤á¤Î´Ø¿ô¤¬open()¤Ç¤â»È¤ï
-¤ì¤Æ¤¤¤ërb_scan_args()¤Ç¤¹¡¥Âè3°ú¿ô¤Ë»ØÄꤷ¤¿¥Õ¥©¡¼¥Þ¥Ã¥È¤Ë
-½¾¤¤¡¤Âè4ÊÑ¿ô°Ê¹ß¤Ë»ØÄꤷ¤¿ÊÑ¿ô¤ËÃͤòÂåÆþ¤·¤Æ¤¯¤ì¤Þ¤¹¡¥¤³¤Î
-¥Õ¥©¡¼¥Þ¥Ã¥È¤Ï¡¤Âè1ʸ»úÌܤ¬¾Êά¤Ç¤­¤Ê¤¤°ú¿ô¤Î¿ô¡¤Âè2ʸ»úÌܤ¬
-¾Êά¤Ç¤­¤ë°ú¿ô¤Î¿ô¡¤Âè3ʸ»úÌܤ¬Âбþ¤¹¤ëÁê¼ê¤¬Ìµ¤¤¤¢¤Þ¤ê¤Î°ú
-¿ô¤¬¤¢¤ë¤«¤É¤¦¤«¤ò¼¨¤¹"*"¤Ç¤¹¡¥2ʸ»úÌܤÈ3ʸ»úÌܤϾÊά¤Ç¤­¤Þ
-¤¹¡¥dbm.c¤ÎÎã¤Ç¤Ï¡¤¥Õ¥©¡¼¥Þ¥Ã¥È¤Ï"11"¤Ç¤¹¤«¤é¡¤°ú¿ô¤ÏºÇÄã1¤Ä
-¤Ç¡¤2¤Ä¤Þ¤Çµö¤µ¤ì¤ë¤È¤¤¤¦°ÕÌ£¤Ë¤Ê¤ê¤Þ¤¹¡¥¾Êά¤µ¤ì¤Æ¤¤¤ë»þ¤Î
-ÊÑ¿ô¤ÎÃͤÏnil(C¸À¸ì¤Î¥ì¥Ù¥ë¤Ç¤ÏQnil)¤Ë¤Ê¤ê¤Þ¤¹¡¥
-
-Ruby¤ÎÇÛÎó¤Ç°ú¿ô¤ò¼õ¤±¼è¤ë¤â¤Î¤Ïindexes¤¬¤¢¤ê¤Þ¤¹¡¥¼ÂÁõ¤Ï¤³
-¤¦¤Ç¤¹¡¥
-
---
-static VALUE
-fdbm_indexes(obj, args)
- VALUE obj, args;
-{
- :
-}
---
-
-Âè1°ú¿ô¤Ïself¡¤Âè2°ú¿ô¤ÏRuby¤ÎÇÛÎó¤Ç¤¹¡¥
-
-** Ãí°Õ»ö¹à
-
-Ruby¤È¶¦Í­¤Ï¤·¤Ê¤¤¤¬Ruby¤Î¥ª¥Ö¥¸¥§¥¯¥È¤ò³ÊǼ¤¹¤ë²ÄǽÀ­¤Î¤¢¤ë
-C¤ÎÂç°èÊÑ¿ô¤Ï°Ê²¼¤Î´Ø¿ô¤ò»È¤Ã¤ÆRuby¥¤¥ó¥¿¥×¥ê¥¿¤ËÊÑ¿ô¤Î¸ºß
-¤ò¶µ¤¨¤Æ¤¢¤²¤Æ¤¯¤À¤µ¤¤¡¥¤Ç¤Ê¤¤¤ÈGC¤Ç¥È¥é¥Ö¥ë¤òµ¯¤³¤·¤Þ¤¹¡¥
-
- void rb_global_variable(VALUE *var)
-
-(5) extconf.rb¤òÍѰդ¹¤ë
-
-Makefile¤òºî¤ë¾ì¹ç¤Î¿÷·¿¤Ë¤Ê¤ëextconf.rb¤È¤¤¤¦¥Õ¥¡¥¤¥ë¤òºî¤ê
-¤Þ¤¹¡¥extconf.rb¤Ï¥é¥¤¥Ö¥é¥ê¤Î¥³¥ó¥Ñ¥¤¥ë¤ËɬÍפʾò·ï¤Î¥Á¥§¥Ã
-¥¯¤Ê¤É¤ò¹Ô¤¦¤³¤È¤¬ÌÜŪ¤Ç¤¹¡¥¤Þ¤º¡¤
-
- require 'mkmf'
-
-¤òextconf.rb¤ÎÀèÆ¬¤ËÃÖ¤­¤Þ¤¹¡¥extconf.rb¤ÎÃæ¤Ç¤Ï°Ê²¼¤ÎRuby´Ø
-¿ô¤ò»È¤¦¤³¤È¤¬½ÐÍè¤Þ¤¹¡¥
-
- have_library(lib, func): ¥é¥¤¥Ö¥é¥ê¤Î¸ºß¥Á¥§¥Ã¥¯
- have_func(func, header): ´Ø¿ô¤Î¸ºß¥Á¥§¥Ã¥¯
- have_header(header): ¥Ø¥Ã¥À¥Õ¥¡¥¤¥ë¤Î¸ºß¥Á¥§¥Ã¥¯
- create_makefile(target): Makefile¤ÎÀ¸À®
-
-°Ê²¼¤ÎÊÑ¿ô¤ò»È¤¦¤³¤È¤¬¤Ç¤­¤Þ¤¹¡¥
-
- $CFLAGS: ¥³¥ó¥Ñ¥¤¥ë»þ¤ËÄɲÃŪ¤Ë»ØÄꤹ¤ë¥Õ¥é¥°(-I¤Ê¤É)
- $LDFLAGS: ¥ê¥ó¥¯»þ¤ËÄɲÃŪ¤Ë»ØÄꤹ¤ë¥Õ¥é¥°(-L¤Ê¤É)
-
-¥é¥¤¥Ö¥é¥ê¤ò¥³¥ó¥Ñ¥¤¥ë¤¹¤ë¾ò·ï¤¬Â·¤ï¤º¡¤¤½¤Î¥é¥¤¥Ö¥é¥ê¤ò¥³¥ó
-¥Ñ¥¤¥ë¤·¤Ê¤¤»þ¤Ë¤Ïcreate_makefile¤ò¸Æ¤Ð¤Ê¤±¤ì¤ÐMakefile¤ÏÀ¸
-À®¤µ¤ì¤º¡¤¥³¥ó¥Ñ¥¤¥ë¤â¹Ô¤ï¤ì¤Þ¤»¤ó¡¥
-
-(6) depend¤òÍѰդ¹¤ë
-
-¤â¤·¡¤¥Ç¥£¥ì¥¯¥È¥ê¤Ëdepend¤È¤¤¤¦¥Õ¥¡¥¤¥ë¤¬Â¸ºß¤¹¤ì¤Ð¡¤
-Makefile¤¬°Í¸´Ø·¸¤ò¥Á¥§¥Ã¥¯¤·¤Æ¤¯¤ì¤Þ¤¹¡¥
-
- % gcc -MM *.c > depend
-
-¤Ê¤É¤Çºî¤ë¤³¤È¤¬½ÐÍè¤Þ¤¹¡¥¤¢¤Ã¤ÆÂ»¤Ï̵¤¤¤Ç¤·¤ç¤¦¡¥
-
-(7) MANIFEST¥Õ¥¡¥¤¥ë¤Ë¥Õ¥¡¥¤¥ë̾¤òÆþ¤ì¤ë
-
- % find * -type f -print > MANIFEST
- % vi MANIFEST
-
-*.o, *~¤Ê¤ÉÉÔɬÍפʥե¡¥¤¥ë°Ê³°¤ÏMANIFEST¤ËÄɲ䷤Ƥª¤­¤Þ¤¹¡¥
-make»þ¤Ë¤ÏMANIFEST¤ÎÆâÍÆ¤Ï»²¾È¤·¤Þ¤»¤ó¤Î¤Ç¡¤¶õ¤Î¤Þ¤Þ¤Ç¤âÌäÂê
-¤Ïµ¯¤­¤Þ¤»¤ó¤¬¡¤¥Ñ¥Ã¥±¡¼¥¸¥ó¥°¤Î»þ¤Ë»²¾È¤¹¤ë¤³¤È¤¬¤¢¤ë¤Î¤È¡¤
-ɬÍפʥե¡¥¤¥ë¤ò¶èÊ̤Ǥ­¤ë¤Î¤Ç¡¤ÍѰդ·¤Æ¤ª¤¤¤¿Êý¤¬Îɤ¤¤Ç¤·¤ç
-¤¦¡¥
-
-(8) Makefile¤òÀ¸À®¤¹¤ë
-
-Makefile¤ò¼ÂºÝ¤ËÀ¸À®¤¹¤ë¤¿¤á¤Ë¤Ï
-
- ruby extconf.rb
-
-¤È¤·¤Þ¤¹¡¥extconf.rb¤Ë require 'mkmf' ¤Î¹Ô¤¬¤Ê¤¤¾ì¹ç¤Ë¤Ï¥¨¥é¡¼
-¤Ë¤Ê¤ê¤Þ¤¹¤Î¤Ç¡¤°ú¿ô¤òÄɲä·¤Æ
-
- ruby -r mkmf extconf.rb
-
-¤È¤·¤Æ¤¯¤À¤µ¤¤¡¥
-
-¥Ç¥£¥ì¥¯¥È¥ê¤òext°Ê²¼¤ËÍѰդ·¤¿¾ì¹ç¤Ë¤ÏRubyÁ´ÂΤÎmake¤Î»þ¤Ë
-¼«Æ°Åª¤ËMakefile¤¬À¸À®¤µ¤ì¤Þ¤¹¤Î¤Ç¡¤¤³¤Î¥¹¥Æ¥Ã¥×¤ÏÉÔÍפǤ¹¡¥
-
-(9) make¤¹¤ë
-
-ưŪ¥ê¥ó¥¯¥é¥¤¥Ö¥é¥ê¤òÀ¸À®¤¹¤ë¾ì¹ç¤Ë¤Ï¤½¤Î¾ì¤Çmake¤·¤Æ¤¯¤À¤µ
-¤¤¡¥É¬ÍפǤ¢¤ì¤Ð make install ¤Ç¥¤¥ó¥¹¥È¡¼¥ë¤µ¤ì¤Þ¤¹¡¥
-
-ext°Ê²¼¤Ë¥Ç¥£¥ì¥¯¥È¥ê¤òÍѰդ·¤¿¾ì¹ç¤Ï¡¤Ruby¤Î¥Ç¥£¥ì¥¯¥È¥ê¤Ç
-make¤ò¼Â¹Ô¤¹¤ë¤ÈMakefile¤òÀ¸À®¤«¤émake¡¤É¬Íפˤè¤Ã¤Æ¤Ï¤½¤Î¥â
-¥¸¥å¡¼¥ë¤ÎRuby¤Ø¤Î¥ê¥ó¥¯¤Þ¤Ç¼«Æ°Åª¤Ë¼Â¹Ô¤·¤Æ¤¯¤ì¤Þ¤¹¡¥
-extconf.rb¤ò½ñ¤­´¹¤¨¤ë¤Ê¤É¤·¤ÆMakefile¤ÎºÆÀ¸À®¤¬É¬Íפʻþ¤Ï¤Þ
-¤¿Ruby¥Ç¥£¥ì¥¯¥È¥ê¤Çmake¤·¤Æ¤¯¤À¤µ¤¤¡¥
-
-³ÈÄ¥¥é¥¤¥Ö¥é¥ê¤Ïmake install¤ÇRuby¥é¥¤¥Ö¥é¥ê¤Î¥Ç¥£¥ì¥¯¥È¥ê¤Î
-²¼¤Ë¥³¥Ô¡¼¤µ¤ì¤Þ¤¹¡¥¤â¤·³ÈÄ¥¥é¥¤¥Ö¥é¥ê¤È¶¨Ä´¤·¤Æ»È¤¦Ruby¤Çµ­
-½Ò¤µ¤ì¤¿¥×¥í¥°¥é¥à¤¬¤¢¤ê¡¤Ruby¥é¥¤¥Ö¥é¥ê¤ËÃÖ¤­¤¿¤¤¾ì¹ç¤Ë¤Ï¡¤
-³ÈÄ¥¥é¥¤¥Ö¥é¥êÍѤΥǥ£¥ì¥¯¥È¥ê¤Î²¼¤Ë lib ¤È¤¤¤¦¥Ç¥£¥ì¥¯¥È¥ê
-¤òºî¤ê¡¤¤½¤³¤Ë ³ÈÄ¥»Ò .rb ¤Î¥Õ¥¡¥¤¥ë¤òÃÖ¤¤¤Æ¤ª¤±¤ÐƱ»þ¤Ë¥¤¥ó
-¥¹¥È¡¼¥ë¤µ¤ì¤Þ¤¹¡¥
-
-(10) ¥Ç¥Ð¥Ã¥°
-
-¤Þ¤¢¡¤¥Ç¥Ð¥Ã¥°¤·¤Ê¤¤¤Èư¤«¤Ê¤¤¤Ç¤·¤ç¤¦¤Í¡¥ext/Setup¤Ë¥Ç¥£¥ì
-¥¯¥È¥ê̾¤ò½ñ¤¯¤ÈÀÅŪ¤Ë¥ê¥ó¥¯¤¹¤ë¤Î¤Ç¥Ç¥Ð¥Ã¥¬¤¬»È¤¨¤ë¤è¤¦¤Ë¤Ê
-¤ê¤Þ¤¹¡¥¤½¤Îʬ¥³¥ó¥Ñ¥¤¥ë¤¬ÃÙ¤¯¤Ê¤ê¤Þ¤¹¤±¤É¡¥
-
-(11) ¤Ç¤­¤¢¤¬¤ê
-
-¸å¤Ï¤³¤Ã¤½¤ê»È¤¦¤Ê¤ê¡¤¹­¤¯¸ø³«¤¹¤ë¤Ê¤ê¡¤Çä¤ë¤Ê¤ê¡¤¤´¼«Í³¤Ë¤ª
-»È¤¤¤¯¤À¤µ¤¤¡¥Ruby¤Îºî¼Ô¤Ï³ÈÄ¥¥é¥¤¥Ö¥é¥ê¤Ë´Ø¤·¤Æ°ìÀڤθ¢Íø¤ò
-¼çÄ¥¤·¤Þ¤»¤ó¡¥
-
-Appendix A. Ruby¤Î¥½¡¼¥¹¥³¡¼¥É¤ÎʬÎà
-
-Ruby¤Î¥½¡¼¥¹¤Ï¤¤¤¯¤Ä¤«¤ËʬÎह¤ë¤³¤È¤¬½ÐÍè¤Þ¤¹¡¥¤³¤Î¤¦¤Á¥¯¥é
-¥¹¥é¥¤¥Ö¥é¥ê¤ÎÉôʬ¤Ï´ðËÜŪ¤Ë³ÈÄ¥¥é¥¤¥Ö¥é¥ê¤ÈƱ¤¸ºî¤êÊý¤Ë¤Ê¤Ã
-¤Æ¤¤¤Þ¤¹¡¥¤³¤ì¤é¤Î¥½¡¼¥¹¤Ïº£¤Þ¤Ç¤ÎÀâÌÀ¤Ç¤Û¤È¤ó¤ÉÍý²ò¤Ç¤­¤ë¤È
-»×¤¤¤Þ¤¹¡¥
-
-Ruby¸À¸ì¤Î¥³¥¢
-
- class.c
- error.c
- eval.c
- gc.c
- object.c
- parse.y
- variable.c
-
-¥æ¡¼¥Æ¥£¥ê¥Æ¥£´Ø¿ô
-
- dln.c
- regex.c
- st.c
- util.c
-
-Ruby¥³¥Þ¥ó¥É¤Î¼ÂÁõ
-
- dmyext.c
- inits.c
- main.c
- ruby.c
- version.c
-
-¥¯¥é¥¹¥é¥¤¥Ö¥é¥ê
-
- array.c
- bignum.c
- compar.c
- dir.c
- enum.c
- file.c
- hash.c
- io.c
- marshal.c
- math.c
- numeric.c
- pack.c
- prec.c
- process.c
- random.c
- range.c
- re.c
- signal.c
- sprintf.c
- string.c
- struct.c
- time.c
-
-Appendix B. ³ÈÄ¥ÍÑ´Ø¿ô¥ê¥Õ¥¡¥ì¥ó¥¹
-
-C¸À¸ì¤«¤éRuby¤Îµ¡Ç½¤òÍøÍѤ¹¤ëAPI¤Ï°Ê²¼¤ÎÄ̤ê¤Ç¤¢¤ë¡¥
-
-** ·¿
-
-VALUE
-
- Ruby¥ª¥Ö¥¸¥§¥¯¥È¤òɽ¸½¤¹¤ë·¿¡¥É¬Íפ˱þ¤¸¤Æ¥­¥ã¥¹¥È¤·¤ÆÍѤ¤¤ë¡¥
- ÁȤ߹þ¤ß·¿¤òɽ¸½¤¹¤ëC¤Î·¿¤Ïruby.h¤Ëµ­½Ò¤·¤Æ¤¢¤ëR¤Ç»Ï¤Þ¤ë¹½Â¤
- ÂΤǤ¢¤ë¡¥VALUE·¿¤ò¤³¤ì¤é¤Ë¥­¥ã¥¹¥È¤¹¤ë¤¿¤á¤ËR¤Ç»Ï¤Þ¤ë¹½Â¤ÂÎ
- ̾¤òÁ´¤ÆÂçʸ»ú¤Ë¤·¤¿Ì¾Á°¤Î¥Þ¥¯¥í¤¬ÍѰդµ¤ì¤Æ¤¤¤ë¡¥
-
-** ÊÑ¿ô¡¦Äê¿ô
-
-Qnil
-
- Äê¿ô: nil¥ª¥Ö¥¸¥§¥¯¥È
-
-Qtrue
-
- Äê¿ô: true¥ª¥Ö¥¸¥§¥¯¥È(¿¿¤Î¥Ç¥Õ¥©¥ë¥ÈÃÍ)
-
-Qfalse
-
- Äê¿ô: false¥ª¥Ö¥¸¥§¥¯¥È
-
-** C¥Ç¡¼¥¿¤Î¥«¥×¥»¥ë²½
-
-Data_Wrap_Struct(VALUE klass, void (*mark)(), void (*free)(), void *sval)
-
- C¤ÎǤ°Õ¤Î¥Ý¥¤¥ó¥¿¤ò¥«¥×¥»¥ë²½¤·¤¿Ruby¥ª¥Ö¥¸¥§¥¯¥È¤òÊÖ¤¹¡¥¤³
- ¤Î¥Ý¥¤¥ó¥¿¤¬Ruby¤«¤é¥¢¥¯¥»¥¹¤µ¤ì¤Ê¤¯¤Ê¤Ã¤¿»þ¡¤free¤Ç»ØÄꤷ¤¿
- ´Ø¿ô¤¬¸Æ¤Ð¤ì¤ë¡¥¤Þ¤¿¡¤¤³¤Î¥Ý¥¤¥ó¥¿¤Î»Ø¤¹¥Ç¡¼¥¿¤¬Â¾¤ÎRuby¥ª¥Ö
- ¥¸¥§¥¯¥È¤ò»Ø¤·¤Æ¤¤¤ë¾ì¹ç¡¤mark¤Ë»ØÄꤹ¤ë´Ø¿ô¤Ç¥Þ¡¼¥¯¤¹¤ëɬÍ×
- ¤¬¤¢¤ë¡¥
-
-Data_Make_Struct(klass, type, mark, free, sval)
-
- type·¿¤Î¥á¥â¥ê¤òmalloc¤·¡¤ÊÑ¿ôsval¤ËÂåÆþ¤·¤¿¸å¡¤¤½¤ì¤ò¥«¥×¥»
- ¥ë²½¤·¤¿¥Ç¡¼¥¿¤òÊÖ¤¹¥Þ¥¯¥í¡¥
-
-Data_Get_Struct(data, type, sval)
-
- data¤«¤étype·¿¤Î¥Ý¥¤¥ó¥¿¤ò¼è¤ê½Ð¤·ÊÑ¿ôsval¤ËÂåÆþ¤¹¤ë¥Þ¥¯¥í¡¥
-
-** ·¿¥Á¥§¥Ã¥¯
-
-TYPE(value)
-FIXNUM_P(value)
-NIL_P(value)
-void Check_Type(VALUE value, int type)
-void Check_SafeStr(VALUE value)
-
-** ·¿ÊÑ´¹
-
-FIX2INT(value)
-INT2FIX(i)
-NUM2INT(value)
-INT2NUM(i)
-NUM2DBL(value)
-rb_float_new(f)
-STR2CSTR(value)
-rb_str_new2(s)
-
-** ¥¯¥é¥¹/¥â¥¸¥å¡¼¥ëÄêµÁ
-
-VALUE rb_define_class(const char *name, VALUE super)
-
- super¤Î¥µ¥Ö¥¯¥é¥¹¤È¤·¤Æ¿·¤·¤¤Ruby¥¯¥é¥¹¤òÄêµÁ¤¹¤ë¡¥
-
-VALUE rb_define_class_under(VALUE module, const char *name, VALUE super)
-
- super¤Î¥µ¥Ö¥¯¥é¥¹¤È¤·¤Æ¿·¤·¤¤Ruby¥¯¥é¥¹¤òÄêµÁ¤·¡¤module¤Î
- Äê¿ô¤È¤·¤ÆÄêµÁ¤¹¤ë¡¥
-
-VALUE rb_define_module(const char *name)
-
- ¿·¤·¤¤Ruby¥â¥¸¥å¡¼¥ë¤òÄêµÁ¤¹¤ë¡¥
-
-VALUE rb_define_module_under(VALUE module, const char *name, VALUE super)
-
- ¿·¤·¤¤Ruby¥â¥¸¥å¡¼¥ë¤òÄêµÁ¤·¡¤module¤ÎÄê¿ô¤È¤·¤ÆÄêµÁ¤¹¤ë¡¥
-
-void rb_include_module(VALUE klass, VALUE module)
-
- ¥â¥¸¥å¡¼¥ë¤ò¥¤¥ó¥¯¥ë¡¼¥É¤¹¤ë¡¥class¤¬¤¹¤Ç¤Ëmodule¤ò¥¤¥ó¥¯
- ¥ë¡¼¥É¤·¤Æ¤¤¤ë»þ¤Ë¤Ï²¿¤â¤·¤Ê¤¤(¿½Å¥¤¥ó¥¯¥ë¡¼¥É¤Î¶Ø»ß)¡¥
-
-void rb_extend_object(VALUE object, VALUE module)
-
- ¥ª¥Ö¥¸¥§¥¯¥È¤ò¥â¥¸¥å¡¼¥ë(¤ÇÄêµÁ¤µ¤ì¤Æ¤¤¤ë¥á¥½¥Ã¥É)¤Ç³ÈÄ¥¤¹¤ë¡¥
-
-** Âç°èÊÑ¿ôÄêµÁ
-
-void rb_define_variable(const char *name, VALUE *var)
-
- Ruby¤ÈC¤È¤Ç¶¦Í­¤¹¤ë¥°¥í¡¼¥Ð¥ëÊÑ¿ô¤òÄêµÁ¤¹¤ë¡¥ÊÑ¿ô̾¤¬`$'¤Ç
- »Ï¤Þ¤é¤Ê¤¤»þ¤Ë¤Ï¼«Æ°Åª¤ËÄɲ䵤ì¤ë¡¥name¤È¤·¤ÆRuby¤Î¼±ÊÌ»Ò
- ¤È¤·¤Æµö¤µ¤ì¤Ê¤¤Ê¸»ú(Î㤨¤Ð` ')¤ò´Þ¤à¾ì¹ç¤Ë¤ÏRuby¥×¥í¥°¥é
- ¥à¤«¤é¤Ï¸«¤¨¤Ê¤¯¤Ê¤ë¡¥
-
-void rb_define_readonly_variable(const char *name, VALUE *var)
-
- Ruby¤ÈC¤È¤Ç¶¦Í­¤¹¤ëread only¤Î¥°¥í¡¼¥Ð¥ëÊÑ¿ô¤òÄêµÁ¤¹¤ë¡¥
- read only¤Ç¤¢¤ë¤³¤È°Ê³°¤Ïrb_define_variable()¤ÈƱ¤¸¡¥
-
-void rb_define_virtual_variable(const char *name,
- VALUE (*getter)(), void (*setter)())
-
- ´Ø¿ô¤Ë¤è¤Ã¤Æ¼Â¸½¤µ¤ì¤ëRubyÊÑ¿ô¤òÄêµÁ¤¹¤ë¡¥ÊÑ¿ô¤¬»²¾È¤µ¤ì¤¿
- »þ¤Ë¤Ïgetter¤¬¡¤ÊÑ¿ô¤ËÃͤ¬¥»¥Ã¥È¤µ¤ì¤¿»þ¤Ë¤Ïsetter¤¬¸Æ¤Ð¤ì
- ¤ë¡¥
-
-void rb_define_hooked_variable(const char *name, VALUE *var,
- VALUE (*getter)(), void (*setter)())
-
- ´Ø¿ô¤Ë¤è¤Ã¤Æhook¤Î¤Ä¤±¤é¤ì¤¿¥°¥í¡¼¥Ð¥ëÊÑ¿ô¤òÄêµÁ¤¹¤ë¡¥ÊÑ¿ô
- ¤¬»²¾È¤µ¤ì¤¿»þ¤Ë¤Ïgetter¤¬¡¤´Ø¿ô¤ËÃͤ¬¥»¥Ã¥È¤µ¤ì¤¿»þ¤Ë¤Ï
- setter¤¬¸Æ¤Ð¤ì¤ë¡¥getter¤äsetter¤Ë0¤ò»ØÄꤷ¤¿»þ¤Ë¤Ïhook¤ò
- »ØÄꤷ¤Ê¤¤¤Î¤ÈƱ¤¸»ö¤Ë¤Ê¤ë¡¥
-
-void rb_global_variable(VALUE *var)
-
- GC¤Î¤¿¤á¡¤Ruby¥×¥í¥°¥é¥à¤«¤é¤Ï¥¢¥¯¥»¥¹¤µ¤ì¤Ê¤¤¤¬, Ruby¥ª¥Ö
- ¥¸¥§¥¯¥È¤ò´Þ¤àÂç°èÊÑ¿ô¤ò¥Þ¡¼¥¯¤¹¤ë¡¥
-
-** Äê¿ô
-
-void rb_define_const(VALUE klass, const char *name, VALUE val)
-
- Äê¿ô¤òÄêµÁ¤¹¤ë¡¥
-
-void rb_define_global_const(const char *name, VALUE val)
-
- Âç°èÄê¿ô¤òÄêµÁ¤¹¤ë¡¥
-
- rb_define_const(rb_cObject, name, val)
-
- ¤ÈƱ¤¸°ÕÌ£¡¥
-
-** ¥á¥½¥Ã¥ÉÄêµÁ
-
-rb_define_method(VALUE klass, const char *name, VALUE (*func)(), int argc)
-
- ¥á¥½¥Ã¥É¤òÄêµÁ¤¹¤ë¡¥argc¤Ïself¤ò½ü¤¯°ú¿ô¤Î¿ô¡¥argc¤¬-1¤Î»þ,
- ´Ø¿ô¤Ë¤Ï°ú¿ô¤Î¿ô(self¤ò´Þ¤Þ¤Ê¤¤)¤òÂè1°ú¿ô, °ú¿ô¤ÎÇÛÎó¤òÂè2
- °ú¿ô¤È¤¹¤ë·Á¼°¤ÇÍ¿¤¨¤é¤ì¤ë(Âè3°ú¿ô¤Ïself)¡¥argc¤¬-2¤Î»þ,
- Âè1°ú¿ô¤¬self, Âè2°ú¿ô¤¬args(args¤Ï°ú¿ô¤ò´Þ¤àRuby¤ÎÇÛÎó)¤È
- ¤¤¤¦·Á¼°¤ÇÍ¿¤¨¤é¤ì¤ë¡¥
-
-rb_define_private_method(VALUE klass, const char *name, VALUE (*func)(), int argc)
-
- private¥á¥½¥Ã¥É¤òÄêµÁ¤¹¤ë¡¥°ú¿ô¤Ïrb_define_method()¤ÈƱ¤¸¡¥
-
-rb_define_singleton_method(VALUE klass, const char *name, VALUE (*func)(), int argc)
-
- ÆÃ°Û¥á¥½¥Ã¥É¤òÄêµÁ¤¹¤ë¡¥°ú¿ô¤Ïrb_define_method()¤ÈƱ¤¸¡¥
-
-rb_scan_args(int argc, VALUE *argv, const char *fmt, ...)
-
- argc, argv·Á¼°¤ÇÍ¿¤¨¤é¤ì¤¿°ú¿ô¤òʬ²ò¤¹¤ë¡¥fmt¤Ïɬ¿Ü°ú¿ô¤Î¿ô,
- Éղðú¿ô¤Î¿ô, »Ä¤ê¤Î°ú¿ô¤¬¤¢¤ë¤«¤ò»ØÄꤹ¤ëʸ»úÎó¤Ç, "¿ô»ú
- ¿ô»ú*"¤È¤¤¤¦·Á¼°¤Ç¤¢¤ë¡¥ 2 ÈÖÌܤοô»ú¤È"*"¤Ï¤½¤ì¤¾¤ì¾Êά²Ä
- ǽ¤Ç¤¢¤ë¡¥É¬¿Ü°ú¿ô¤¬°ì¤Ä¤â¤Ê¤¤¾ì¹ç¤Ï0¤ò»ØÄꤹ¤ë¡¥Âè3°ú¿ô°Ê
- ¹ß¤ÏÊÑ¿ô¤Ø¤Î¥Ý¥¤¥ó¥¿¤Ç, ³ºÅö¤¹¤ëÍ×ÁǤ¬¤½¤ÎÊÑ¿ô¤Ë³ÊǼ¤µ¤ì¤ë¡¥
- Éղðú¿ô¤ËÂбþ¤¹¤ë°ú¿ô¤¬Í¿¤¨¤é¤ì¤Æ¤¤¤Ê¤¤¾ì¹ç¤ÏÊÑ¿ô¤ËQnil¤¬
- ÂåÆþ¤µ¤ì¤ë¡¥
-
-** Ruby¥á¥½¥Ã¥É¸Æ¤Ó½Ð¤·
-
-VALUE rb_funcall(VALUE recv, ID mid, int narg, ...)
-
- ¥á¥½¥Ã¥É¸Æ¤Ó½Ð¤·¡¥Ê¸»úÎ󤫤émid¤òÆÀ¤ë¤¿¤á¤Ë¤Ïrb_intern()¤ò
- »È¤¦¡¥
-
-VALUE rb_funcall2(VALUE recv, ID mid, int argc, VALUE *argv)
-
- ¥á¥½¥Ã¥É¸Æ¤Ó½Ð¤·¡¥°ú¿ô¤òargc, argv·Á¼°¤ÇÅϤ¹¡¥
-
-VALUE rb_eval_string(const char *str)
-
- ʸ»úÎó¤òRuby¥¹¥¯¥ê¥×¥È¤È¤·¤Æ¥³¥ó¥Ñ¥¤¥ë¡¦¼Â¹Ô¤¹¤ë¡¥
-
-ID rb_intern(const char *name)
-
- ʸ»úÎó¤ËÂбþ¤¹¤ëID¤òÊÖ¤¹¡¥
-
-char *rb_id2name(ID id)
-
- ID¤ËÂбþ¤¹¤ëʸ»úÎó¤òÊÖ¤¹(¥Ç¥Ð¥Ã¥°ÍÑ)¡¥
-
-char *rb_class2name(VALUE klass)
-
- ¥¯¥é¥¹¤Î̾Á°¤òÊÖ¤¹(¥Ç¥Ð¥Ã¥°ÍÑ)¡¥¥¯¥é¥¹¤¬Ì¾Á°¤ò»ý¤¿¤Ê¤¤»þ¤Ë¤Ï,
- ÁÄÀè¤òÁ̤äÆÌ¾Á°¤ò»ý¤Ä¥¯¥é¥¹¤Î̾Á°¤òÊÖ¤¹¡¥
-
-int rb_respond_to(VALUE obj, ID id)
-
- obj¤¬id¤Ç¼¨¤µ¤ì¤ë¥á¥½¥Ã¥É¤ò»ý¤Ä¤«¤É¤¦¤«¤òÊÖ¤¹¡£
-
-** ¥¤¥ó¥¹¥¿¥ó¥¹ÊÑ¿ô
-
-VALUE rb_iv_get(VALUE obj, const char *name)
-
- obj¤Î¥¤¥ó¥¹¥¿¥ó¥¹ÊÑ¿ô¤ÎÃͤòÆÀ¤ë¡¥`@'¤Ç»Ï¤Þ¤é¤Ê¤¤¥¤¥ó¥¹¥¿¥ó
- ¥¹ÊÑ¿ô¤Ï Ruby¥×¥í¥°¥é¥à¤«¤é¥¢¥¯¥»¥¹¤Ç¤­¤Ê¤¤¡Ö±£¤ì¤¿¡×¥¤¥ó
- ¥¹¥¿¥ó¥¹ÊÑ¿ô¤Ë¤Ê¤ë¡¥Äê¿ô¤ÏÂçʸ»ú¤Î̾Á°¤ò»ý¤Ä¥¯¥é¥¹(¤Þ¤¿¤Ï
- ¥â¥¸¥å¡¼¥ë)¤Î¥¤¥ó¥¹¥¿¥ó¥¹ÊÑ¿ô¤È¤·¤Æ¼ÂÁõ¤µ¤ì¤Æ¤¤¤ë¡¥
-
-VALUE rb_iv_set(VALUE obj, const char *name, VALUE val)
-
- obj¤Î¥¤¥ó¥¹¥¿¥ó¥¹ÊÑ¿ô¤òval¤Ë¥»¥Ã¥È¤¹¤ë¡¥
-
-** À©¸æ¹½Â¤
-
-VALUE rb_iterate(VALUE (*func1)(), VALUE arg1, VALUE (*func2)(), VALUE arg2)
-
- func2¤ò¥Ö¥í¥Ã¥¯¤È¤·¤ÆÀßÄꤷ, func1¤ò¥¤¥Æ¥ì¡¼¥¿¤È¤·¤Æ¸Æ¤Ö¡¥
- func1¤Ë¤Ï arg1¤¬°ú¿ô¤È¤·¤ÆÅϤµ¤ì, func2¤Ë¤ÏÂè1°ú¿ô¤Ë¥¤¥Æ¥ì¡¼
- ¥¿¤«¤éÍ¿¤¨¤é¤ì¤¿ÃÍ, Âè2°ú¿ô¤Ëarg2¤¬ÅϤµ¤ì¤ë¡¥
-
-VALUE rb_yield(VALUE val)
-
- val¤òÃͤȤ·¤Æ¥¤¥Æ¥ì¡¼¥¿¥Ö¥í¥Ã¥¯¤ò¸Æ¤Ó½Ð¤¹¡¥
-
-VALUE rb_rescue(VALUE (*func1)(), VALUE arg1, VALUE (*func2)(), VALUE arg2)
-
- ´Ø¿ôfunc1¤òarg1¤ò°ú¿ô¤Ë¸Æ¤Ó½Ð¤¹¡¥func1¤Î¼Â¹ÔÃæ¤ËÎã³°¤¬È¯À¸
- ¤·¤¿»þ¤Ë¤Ï func2¤òarg2¤ò°ú¿ô¤È¤·¤Æ¸Æ¤Ö¡¥Ìá¤êÃͤÏÎã³°¤¬È¯À¸
- ¤·¤Ê¤«¤Ã¤¿»þ¤Ïfunc1¤ÎÌá¤êÃÍ, Îã³°¤¬È¯À¸¤·¤¿»þ¤Ë¤Ïfunc2¤ÎÌá
- ¤êÃͤǤ¢¤ë¡¥
-
-VALUE rb_ensure(VALUE (*func1)(), VALUE arg1, void (*func2)(), VALUE arg2)
-
- ´Ø¿ôfunc1¤òarg1¤ò°ú¿ô¤È¤·¤Æ¼Â¹Ô¤·, ¼Â¹Ô½ªÎ»¸å(¤¿¤È¤¨Îã³°¤¬
- ȯÀ¸¤·¤Æ¤â) func2¤òarg2¤ò°ú¿ô¤È¤·¤Æ¼Â¹Ô¤¹¤ë¡¥Ìá¤êÃͤÏfunc1
- ¤ÎÌá¤êÃͤǤ¢¤ë(Îã³°¤¬È¯À¸¤·¤¿»þ¤ÏÌá¤é¤Ê¤¤)¡¥
-
-** Îã³°¡¦¥¨¥é¡¼
-
-void rb_warning(const char *fmt, ...)
-
- rb_verbose»þ¤Ëɸ½à¥¨¥é¡¼½ÐÎϤ˷ٹð¾ðÊó¤òɽ¼¨¤¹¤ë¡¥°ú¿ô¤Ï
- printf()¤ÈƱ¤¸¡¥
-
-void rb_raise(rb_eRuntimeError, const char *fmt, ...)
-
- RuntimeErrorÎã³°¤òȯÀ¸¤µ¤»¤ë¡¥°ú¿ô¤Ïprintf()¤ÈƱ¤¸¡¥
-
-void rb_raise(VALUE exception, const char *fmt, ...)
-
- exception¤Ç»ØÄꤷ¤¿Îã³°¤òȯÀ¸¤µ¤»¤ë¡¥fmt°Ê²¼¤Î°ú¿ô¤Ï
- printf()¤ÈƱ¤¸¡¥
-
-void rb_fatal(const char *fmt, ...)
-
- Ã×̿ŪÎã³°¤òȯÀ¸¤µ¤»¤ë¡¥Ä̾ï¤ÎÎã³°½èÍý¤Ï¹Ô¤Ê¤ï¤ì¤º, ¥¤¥ó¥¿¡¼
- ¥×¥ê¥¿¤¬½ªÎ»¤¹¤ë(¤¿¤À¤·ensure¤Ç»ØÄꤵ¤ì¤¿¥³¡¼¥É¤Ï½ªÎ»Á°¤Ë
- ¼Â¹Ô¤µ¤ì¤ë)¡¥
-
-void rb_bug(const char *fmt, ...)
-
- ¥¤¥ó¥¿¡¼¥×¥ê¥¿¤Ê¤É¥×¥í¥°¥é¥à¤Î¥Ð¥°¤Ç¤·¤«È¯À¸¤¹¤ë¤Ï¤º¤Î¤Ê¤¤
- ¾õ¶·¤Î»þ¸Æ¤Ö¡¥¥¤¥ó¥¿¡¼¥×¥ê¥¿¤Ï¥³¥¢¥À¥ó¥×¤·Ä¾¤Á¤Ë½ªÎ»¤¹¤ë¡¥
- Îã³°½èÍý¤Ï°ìÀڹԤʤï¤ì¤Ê¤¤¡¥
-
-** Ruby¤Î½é´ü²½¡¦¼Â¹Ô
-
-Ruby¤ò¥¢¥×¥ê¥±¡¼¥·¥ç¥ó¤ËËä¤á¹þ¤à¾ì¹ç¤Ë¤Ï°Ê²¼¤Î¥¤¥ó¥¿¥Õ¥§¡¼¥¹
-¤ò»È¤¦¡¥Ä̾ï¤Î³ÈÄ¥¥é¥¤¥Ö¥é¥ê¤Ë¤ÏɬÍפʤ¤¡¥
-
-void ruby_init()
-
- Ruby¥¤¥ó¥¿¥×¥ê¥¿¤Î½é´ü²½¤ò¹Ô¤Ê¤¦¡¥
-
-void ruby_options(int argc, char **argv)
-
- Ruby¥¤¥ó¥¿¥×¥ê¥¿¤Î¥³¥Þ¥ó¥É¥é¥¤¥ó°ú¿ô¤Î½èÍý¤ò¹Ô¤Ê¤¦¡¥
-
-void ruby_run()
-
- Ruby¥¤¥ó¥¿¥×¥ê¥¿¤ò¼Â¹Ô¤¹¤ë¡¥
-
-void ruby_script(char *name)
-
- Ruby¤Î¥¹¥¯¥ê¥×¥È̾($0)¤òÀßÄꤹ¤ë¡¥
-
-
-Appendix B. extconf.rb¤Ç»È¤¨¤ë´Ø¿ô¤¿¤Á
-
-extconf.rb¤ÎÃæ¤Ç¤ÏÍøÍѲÄǽ¤Ê¥³¥ó¥Ñ¥¤¥ë¾ò·ï¥Á¥§¥Ã¥¯¤Î´Ø¿ô¤Ï°Ê
-²¼¤ÎÄ̤ê¤Ç¤¢¤ë¡¥
-
-have_library(lib, func)
-
- ´Ø¿ôfunc¤òÄêµÁ¤·¤Æ¤¤¤ë¥é¥¤¥Ö¥é¥êlib¤Î¸ºß¤ò¥Á¥§¥Ã¥¯¤¹¤ë¡¥
- ¥é¥¤¥Ö¥é¥ê¤¬Â¸ºß¤¹¤ë»þ¡¤true¤òÊÖ¤¹¡¥
-
-find_library(lib, func, path...)
-
- ´Ø¿ôfunc¤òÄêµÁ¤·¤Æ¤¤¤ë¥é¥¤¥Ö¥é¥êlib¤Î¸ºß¤ò -Lpath ¤òÄɲÃ
- ¤·¤Ê¤¬¤é¥Á¥§¥Ã¥¯¤¹¤ë¡¥¥é¥¤¥Ö¥é¥ê¤¬¸«ÉÕ¤«¤Ã¤¿»þ¡¤true¤òÊÖ¤¹¡¥
-
-have_func(func, header)
-
- ¥Ø¥Ã¥À¥Õ¥¡¥¤¥ëheader¤ò¥¤¥ó¥¯¥ë¡¼¥É¤·¤Æ´Ø¿ôfunc¤Î¸ºß¤ò¥Á¥§¥Ã
- ¥¯¤¹¤ë¡¥func¤¬É¸½à¤Ç¤Ï¥ê¥ó¥¯¤µ¤ì¤Ê¤¤¥é¥¤¥Ö¥é¥êÆâ¤Î¤â¤Î¤Ç¤¢
- ¤ë»þ¤Ë¤ÏÀè¤Ëhave_library¤Ç¤½¤Î¥é¥¤¥Ö¥é¥ê¤ò¥Á¥§¥Ã¥¯¤·¤Æ¤ª¤¯
- »ö¡¥´Ø¿ô¤¬Â¸ºß¤¹¤ë»þtrue¤òÊÖ¤¹¡¥
-
-have_header(header)
-
- ¥Ø¥Ã¥À¥Õ¥¡¥¤¥ë¤Î¸ºß¤ò¥Á¥§¥Ã¥¯¤¹¤ë¡¥¥Ø¥Ã¥À¥Õ¥¡¥¤¥ë¤¬Â¸ºß¤¹
- ¤ë»þtrue¤òÊÖ¤¹¡¥
-
-find_header(header)
-
- ¥Ø¥Ã¥À¥Õ¥¡¥¤¥ë¤Î¸ºß¤ò -Ipath ¤òÄɲ䷤ʤ¬¤é¥Á¥§¥Ã¥¯¤¹¤ë¡¥
- ¥Ø¥Ã¥À¥Õ¥¡¥¤¥ë¤¬¸«ÉÕ¤«¤Ã¤¿»þtrue¤òÊÖ¤¹¡¥
-
-create_makefile(target)
-
- ³ÈÄ¥¥é¥¤¥Ö¥é¥êÍѤÎMakefile¤òÀ¸À®¤¹¤ë¡¥¤³¤Î´Ø¿ô¤ò¸Æ¤Ð¤Ê¤±¤ì
- ¤Ð¤½¤Î¥é¥¤¥Ö¥é¥ê¤Ï¥³¥ó¥Ñ¥¤¥ë¤µ¤ì¤Ê¤¤¡¥target¤Ï¥â¥¸¥å¡¼¥ë̾
- ¤òɽ¤¹¡¥
-
-with_config(withval[, default=nil])
-
- --with-<withval>¤Ç»ØÄꤵ¤ì¤¿¥ª¥×¥·¥ç¥óÃͤòÆÀ¤ë¡¥
-
-dir_config(target)
-
- --with-<target>-dir, --with-<target>-include, --with-<target>-lib
- ¤Î¤¤¤º¤ì¤«¤Ç»ØÄꤵ¤ì¤ë¥Ç¥£¥ì¥¯¥È¥ê¤ò $CFLAGS ¤ä $LDFLAGS
- ¤ËÄɲ乤롥
-
-/*
- * Local variables:
- * fill-column: 60
- * end:
- */
diff --git a/README.ja b/README.ja
new file mode 100644
index 0000000000..03c007af7c
--- /dev/null
+++ b/README.ja
@@ -0,0 +1,192 @@
+= Rubyã¨ã¯
+
+Rubyã¯ã‚·ãƒ³ãƒ—ルã‹ã¤å¼·åŠ›ãªã‚ªãƒ–ジェクト指å‘スクリプト言語ã§ã™ï¼Ž
+Rubyã¯æœ€åˆã‹ã‚‰ç´”粋ãªã‚ªãƒ–ジェクト指å‘言語ã¨ã—ã¦è¨­è¨ˆã•れã¦ã„ã¾
+ã™ã‹ã‚‰ï¼Œã‚ªãƒ–ジェクト指å‘プログラミングを手軽ã«è¡Œã†äº‹ãŒå‡ºæ¥ã¾
+ã™ï¼Žã‚‚ã¡ã‚ã‚“é€šå¸¸ã®æ‰‹ç¶šãåž‹ã®ãƒ—ログラミングもå¯èƒ½ã§ã™ï¼Ž
+
+Rubyã¯ãƒ†ã‚­ã‚¹ãƒˆå‡¦ç†é–¢ä¿‚ã®èƒ½åŠ›ãªã©ã«å„ªã‚Œï¼ŒPerlã¨åŒã˜ãらã„強力
+ã§ã™ï¼Žã•らã«ã‚·ãƒ³ãƒ—ãƒ«ãªæ–‡æ³•ã¨ï¼Œä¾‹å¤–処ç†ã‚„イテレータãªã©ã®æ©Ÿæ§‹
+ã«ã‚ˆã£ã¦ï¼Œã‚ˆã‚Šåˆ†ã‹ã‚Šã‚„ã™ã„プログラミングãŒå‡ºæ¥ã¾ã™ï¼Ž
+
+
+== Rubyã®ç‰¹é•·
+
+* ã‚·ãƒ³ãƒ—ãƒ«ãªæ–‡æ³•
+* 普通ã®ã‚ªãƒ–ã‚¸ã‚§ã‚¯ãƒˆæŒ‡å‘æ©Ÿèƒ½(クラス,メソッドコールãªã©)
+* 特殊ãªã‚ªãƒ–ã‚¸ã‚§ã‚¯ãƒˆæŒ‡å‘æ©Ÿèƒ½(Mixin, 特異メソッドãªã©)
+* 演算å­ã‚ªãƒ¼ãƒãƒ¼ãƒ­ãƒ¼ãƒ‰
+* ä¾‹å¤–å‡¦ç†æ©Ÿèƒ½
+* イテレータã¨ã‚¯ãƒ­ãƒ¼ã‚¸ãƒ£
+* ガーベージコレクタ
+* ダイナミックローディング (アーキテクãƒãƒ£ã«ã‚ˆã‚‹)
+* ç§»æ¤æ€§ãŒé«˜ã„.多ãã®Unix-like/POSIX互æ›ãƒ—ラットフォーム上ã§
+ å‹•ãã ã‘ã§ãªã,Windows, Mac OS X,BeOSãªã©ã®ä¸Šã§ã‚‚å‹•ã
+ cf. http://bugs.ruby-lang.org/projects/ruby-trunk/wiki/SupportedPlatformsJa
+
+== 入手法
+
+=== FTPã§
+
+以下ã®å ´æ‰€ã«ãŠã„ã¦ã‚りã¾ã™ï¼Ž
+
+ftp://ftp.ruby-lang.org/pub/ruby/
+
+=== Subversionã§
+
+開発先端ã®ã‚½ãƒ¼ã‚¹ã‚³ãƒ¼ãƒ‰ã¯æ¬¡ã®ã‚³ãƒžãƒ³ãƒ‰ã§å–å¾—ã§ãã¾ã™ï¼Ž
+
+ $ svn co http://svn.ruby-lang.org/repos/ruby/trunk/ ruby
+
+ä»–ã«é–‹ç™ºä¸­ã®ãƒ–ランãƒã®ä¸€è¦§ã¯æ¬¡ã®ã‚³ãƒžãƒ³ãƒ‰ã§è¦‹ã‚‰ã‚Œã¾ã™ï¼Ž
+
+ $ svn ls http://svn.ruby-lang.org/repos/ruby/branches/
+
+=== Gitã§
+
+Subversionã®ãƒŸãƒ©ãƒ¼ã‚’GitHubã«å…¬é–‹ã—ã¦ã„ã¾ã™ï¼Ž
+以下ã®ã‚³ãƒžãƒ³ãƒ‰ã§ãƒªãƒã‚¸ãƒˆãƒªã‚’å–å¾—ã§ãã¾ã™ï¼Ž
+
+ $ git clone git://github.com/ruby/ruby.git
+
+== ホームページ
+
+Rubyã®ãƒ›ãƒ¼ãƒ ãƒšãƒ¼ã‚¸ã®URLã¯
+
+http://www.ruby-lang.org/
+
+ã§ã™ï¼Ž
+
+
+== メーリングリスト
+
+Rubyã®ãƒ¡ãƒ¼ãƒªãƒ³ã‚°ãƒªã‚¹ãƒˆãŒã‚りã¾ã™ã€‚å‚åŠ å¸Œæœ›ã®æ–¹ã¯
+
+mailto:ruby-list-ctl@ruby-lang.org
+
+ã¾ã§æœ¬æ–‡ã«
+
+ subscribe YourFirstName YourFamilyName
+
+ã¨æ›¸ã„ã¦é€ã£ã¦ä¸‹ã•ã„。
+
+Ruby開発者å‘ã‘メーリングリストもã‚りã¾ã™ã€‚ã“ã¡ã‚‰ã§ã¯rubyã®ãƒ
+ã‚°ã€å°†æ¥ã®ä»•様拡張ãªã©å®Ÿè£…上ã®å•題ã«ã¤ã„ã¦è­°è«–ã•れã¦ã„ã¾ã™ã€‚
+å‚åŠ å¸Œæœ›ã®æ–¹ã¯
+
+mailto:ruby-dev-ctl@ruby-lang.org
+
+ã¾ã§ruby-listã¨åŒæ§˜ã®æ–¹æ³•ã§ãƒ¡ãƒ¼ãƒ«ã—ã¦ãã ã•ã„。
+
+Ruby拡張モジュールã«ã¤ã„ã¦è©±ã—åˆã†ruby-extメーリングリストã¨
+数学関係ã®è©±é¡Œã«ã¤ã„ã¦è©±ã—åˆã†ruby-mathメーリングリストã¨
+英語ã§è©±ã—åˆã†ruby-talkメーリングリストもã‚りã¾ã™ã€‚å‚加方法
+ã¯ã©ã‚Œã‚‚åŒã˜ã§ã™ã€‚
+
+
+== コンパイル・インストール
+
+ä»¥ä¸‹ã®æ‰‹é †ã§è¡Œã£ã¦ãã ã•ã„.
+
+1. ã‚‚ã— +configure+ ファイルãŒè¦‹ã¤ã‹ã‚‰ãªã„ã€ã‚‚ã—ãã¯
+ +configure.in+ よりå¤ã„よã†ãªã‚‰ã€ +autoconf+ を実行ã—ã¦
+ æ–°ã—ã +configure+ を生æˆã™ã‚‹
+
+2. +configure+ を実行ã—㦠+Makefile+ ãªã©ã‚’生æˆã™ã‚‹
+
+ 環境ã«ã‚ˆã£ã¦ã¯ãƒ‡ãƒ•ォルトã®Cコンパイラ用オプションãŒä»˜ã
+ ã¾ã™ï¼Ž +configure+ オプション㧠<tt>optflags=..</tt> <tt>warnflags=..</tt> ç­‰
+ ã§ä¸Šæ›¸ãã§ãã¾ã™ï¼Ž
+
+3. (å¿…è¦ãªã‚‰ã°)+defines.h+ を編集ã™ã‚‹
+
+ 多分,必è¦ç„¡ã„ã¨æ€ã„ã¾ã™ï¼Ž
+
+4. (å¿…è¦ãªã‚‰ã°)+ext/Setup+ ã«é™çš„ã«ãƒªãƒ³ã‚¯ã™ã‚‹æ‹¡å¼µãƒ¢ã‚¸ãƒ¥ãƒ¼ãƒ«ã‚’
+ 指定ã™ã‚‹
+
+ +ext/Setup+ ã«è¨˜è¿°ã—ãŸãƒ¢ã‚¸ãƒ¥ãƒ¼ãƒ«ã¯é™çš„ã«ãƒªãƒ³ã‚¯ã•れã¾ã™ï¼Ž
+
+ ダイナミックローディングをサãƒãƒ¼ãƒˆã—ã¦ã„ãªã„アーキテク
+ ãƒãƒ£ã§ã¯ +Setup+ ã®1行目ã®ã€Œ<tt>option nodynamic</tt>ã€ã¨ã„ã†è¡Œã®ã‚³
+ メントを外ã™å¿…è¦ãŒã‚りã¾ã™ï¼Žã¾ãŸï¼Œã“ã®ã‚¢ãƒ¼ã‚­ãƒ†ã‚¯ãƒãƒ£ã§
+ 拡張モジュールを利用ã™ã‚‹ãŸã‚ã«ã¯ï¼Œã‚らã‹ã˜ã‚é™çš„ã«ãƒªãƒ³
+ クã—ã¦ãŠãå¿…è¦ãŒã‚りã¾ã™ï¼Ž
+
+5. +make+ を実行ã—ã¦ã‚³ãƒ³ãƒ‘イルã™ã‚‹
+
+6. <tt>make check</tt>ã§ãƒ†ã‚¹ãƒˆã‚’行ã†ï¼Ž
+
+ 「<tt>check succeeded</tt>ã€ã¨è¡¨ç¤ºã•ã‚Œã‚Œã°æˆåŠŸã§ã™ï¼ŽãŸã ã—テスト
+ ã«æˆåŠŸã—ã¦ã‚‚完璧ã ã¨ä¿è¨¼ã•れã¦ã„る訳ã§ã¯ã‚りã¾ã›ã‚“.
+
+7. <tt>make install</tt>
+
+ 以下ã®ãƒ‡ã‚£ãƒ¬ã‚¯ãƒˆãƒªã‚’作ã£ã¦ï¼Œãã“ã«ãƒ•ァイルをインストー
+ ルã—ã¾ã™ï¼Ž
+
+ * <tt>${DESTDIR}${prefix}/bin</tt>
+ * <tt>${DESTDIR}${prefix}/include/ruby-${MAJOR}.${MINOR}.${TEENY}</tt>
+ * <tt>${DESTDIR}${prefix}/include/ruby-${MAJOR}.${MINOR}.${TEENY}/${PLATFORM}</tt>
+ * <tt>${DESTDIR}${prefix}/lib</tt>
+ * <tt>${DESTDIR}${prefix}/lib/ruby</tt>
+ * <tt>${DESTDIR}${prefix}/lib/ruby/${MAJOR}.${MINOR}.${TEENY}</tt>
+ * <tt>${DESTDIR}${prefix}/lib/ruby/${MAJOR}.${MINOR}.${TEENY}/${PLATFORM}</tt>
+ * <tt>${DESTDIR}${prefix}/lib/ruby/site_ruby</tt>
+ * <tt>${DESTDIR}${prefix}/lib/ruby/site_ruby/${MAJOR}.${MINOR}.${TEENY}</tt>
+ * <tt>${DESTDIR}${prefix}/lib/ruby/site_ruby/${MAJOR}.${MINOR}.${TEENY}/${PLATFORM}</tt>
+ * <tt>${DESTDIR}${prefix}/lib/ruby/vendor_ruby</tt>
+ * <tt>${DESTDIR}${prefix}/lib/ruby/vendor_ruby/${MAJOR}.${MINOR}.${TEENY}</tt>
+ * <tt>${DESTDIR}${prefix}/lib/ruby/vendor_ruby/${MAJOR}.${MINOR}.${TEENY}/${PLATFORM}</tt>
+ * <tt>${DESTDIR}${prefix}/lib/ruby/gems/${MAJOR}.${MINOR}.${TEENY}</tt>
+ * <tt>${DESTDIR}${prefix}/share/man/man1</tt>
+ * <tt>${DESTDIR}${prefix}/share/ri/${MAJOR}.${MINOR}.${TEENY}/system</tt>
+
+ Rubyã®APIãƒãƒ¼ã‚¸ãƒ§ãƒ³ãŒ'_x.y.z_'ã§ã‚れã°ï¼Œ<tt>${MAJOR}</tt>ã¯
+ '_x_'ã§ï¼Œ<tt>${MINOR}</tt>ã¯'_y_',<tt>${TEENY}</tt>ã¯'_z_'ã§ã™ï¼Ž
+
+ <b>注æ„</b>: APIãƒãƒ¼ã‚¸ãƒ§ãƒ³ã® +teeny+ ã¯ï¼ŒRubyプログラムã®ãƒãƒ¼ã‚¸ãƒ§
+ ンã¨ã¯ç•°ãªã‚‹ã“ã¨ãŒã‚りã¾ã™ï¼Ž
+
+ +root+ ã§ä½œæ¥­ã™ã‚‹å¿…è¦ãŒã‚ã‚‹ã‹ã‚‚ã—れã¾ã›ã‚“.
+
+ã‚‚ã—,コンパイル時ã«ã‚¨ãƒ©ãƒ¼ãŒç™ºç”Ÿã—ãŸå ´åˆã«ã¯ã‚¨ãƒ©ãƒ¼ã®ãƒ­ã‚°ã¨ãƒž
+シン,OSã®ç¨®é¡žã‚’å«ã‚€ã§ãã‚‹ã ã‘詳ã—ã„レãƒãƒ¼ãƒˆã‚’作者ã«é€ã£ã¦ã
+ã ã•ã‚‹ã¨ä»–ã®æ–¹ã®ãŸã‚ã«ã‚‚ãªã‚Šã¾ã™ï¼Ž
+
+
+== ç§»æ¤
+
+UNIXã§ã‚れ㰠+configure+ ãŒã»ã¨ã‚“ã©ã®å·®ç•°ã‚’å¸åŽã—ã¦ãれるã¯ãšã§
+ã™ãŒï¼Œæ€ã‚ã¬è¦‹è½ã¨ã—ãŒã‚ã£ãŸå ´åˆ(ã‚ã‚‹ã«é•ã„ãªã„),作者ã«ãã®
+ã“ã¨ã‚’レãƒãƒ¼ãƒˆã™ã‚Œã°ï¼Œè§£æ±ºã§ãã‚‹ã‹ã‚‚知れã¾ã›ã‚“.
+
+アーキテクãƒãƒ£ã«ã‚‚ã£ã¨ã‚‚ä¾å­˜ã™ã‚‹ã®ã¯GC部ã§ã™ï¼ŽRubyã®GCã¯å¯¾è±¡
+ã®ã‚¢ãƒ¼ã‚­ãƒ†ã‚¯ãƒãƒ£ãŒ<tt>setjmp()</tt>ã¾ãŸã¯<tt>getcontext()</tt>ã«ã‚ˆã£ã¦å…¨ã¦ã®ãƒ¬
+ジスタを +jmp_buf+ ã‚„ +ucontext_t+ ã«æ ¼ç´ã™ã‚‹ã“ã¨ã¨ï¼Œ +jmp_buf+ ã‚„
++ucontext_t+ ã¨ã‚¹ã‚¿ãƒƒã‚¯ãŒ32bitアラインメントã•れã¦ã„ã‚‹ã“ã¨ã‚’仮定
+ã—ã¦ã„ã¾ã™ï¼Žç‰¹ã«å‰è€…ãŒæˆç«‹ã—ãªã„å ´åˆã®å¯¾å¿œã¯éžå¸¸ã«å›°é›£ã§ã—ょã†ï¼Ž
+後者ã®è§£æ±ºã¯æ¯”較的簡å˜ã§ï¼Œ +gc.c+ ã§ã‚¹ã‚¿ãƒƒã‚¯ã‚’マークã—ã¦ã„ã‚‹
+部分ã«ã‚¢ãƒ©ã‚¤ãƒ³ãƒ¡ãƒ³ãƒˆã®ãƒã‚¤ãƒˆæ•°ã ã‘ãšã‚‰ã—ã¦ãƒžãƒ¼ã‚¯ã™ã‚‹ã‚³ãƒ¼ãƒ‰ã‚’
+追加ã™ã‚‹ã ã‘ã§æ¸ˆã¿ã¾ã™ï¼Ž<tt>defined(\_\_mc68000\_\_)</tt>ã§æ‹¬ã‚‰ã‚Œã¦ã„
+る部分をå‚考ã«ã—ã¦ãã ã•ã„.
+
+レジスタウィンドウをæŒã¤CPUã§ã¯ï¼Œãƒ¬ã‚¸ã‚¹ã‚¿ã‚¦ã‚£ãƒ³ãƒ‰ã‚¦ã‚’スタッ
+クã«ãƒ•ラッシュã™ã‚‹ã‚¢ã‚»ãƒ³ãƒ–ラコードを追加ã™ã‚‹å¿…è¦ãŒã‚ã‚‹ã‹ã‚‚知
+れã¾ã›ã‚“.
+
+
+== é…布æ¡ä»¶
+
++COPYING.ja+ ファイルをå‚ç…§ã—ã¦ãã ã•ã„。
+
+
+== 著者
+
+コメント,ãƒã‚°ãƒ¬ãƒãƒ¼ãƒˆãã®ä»–㯠mailto:matz@ruby-lang.jp ã¾ã§ï¼Ž
+-------------------------------------------------------
+created at: Thu Aug 3 11:57:36 JST 1995
+--
+Local variables:
+mode: rdoc
+end:
diff --git a/README.jp b/README.jp
deleted file mode 100644
index 566fbcdac4..0000000000
--- a/README.jp
+++ /dev/null
@@ -1,203 +0,0 @@
-* Ruby¤È¤Ï
-
-Ruby¤Ï¥·¥ó¥×¥ë¤«¤Ä¶¯ÎϤʥª¥Ö¥¸¥§¥¯¥È»Ø¸þ¥¹¥¯¥ê¥×¥È¸À¸ì¤Ç¤¹¡¥
-Ruby¤ÏºÇ½é¤«¤é½ã¿è¤Ê¥ª¥Ö¥¸¥§¥¯¥È»Ø¸þ¸À¸ì¤È¤·¤ÆÀ߷פµ¤ì¤Æ¤¤¤Þ
-¤¹¤«¤é¡¤¥ª¥Ö¥¸¥§¥¯¥È»Ø¸þ¥×¥í¥°¥é¥ß¥ó¥°¤ò¼ê·Ú¤Ë¹Ô¤¦»ö¤¬½ÐÍè¤Þ
-¤¹¡¥¤â¤Á¤í¤óÄ̾ï¤Î¼ê³¤­·¿¤Î¥×¥í¥°¥é¥ß¥ó¥°¤â²Äǽ¤Ç¤¹¡¥
-
-Ruby¤Ï¥Æ¥­¥¹¥È½èÍý´Ø·¸¤ÎǽÎϤʤɤËÍ¥¤ì¡¤Perl¤ÈƱ¤¸¤¯¤é¤¤¶¯ÎÏ
-¤Ç¤¹¡¥¤µ¤é¤Ë¥·¥ó¥×¥ë¤Êʸˡ¤È¡¤Îã³°½èÍý¤ä¥¤¥Æ¥ì¡¼¥¿¤Ê¤É¤Îµ¡¹½
-¤Ë¤è¤Ã¤Æ¡¤¤è¤êʬ¤«¤ê¤ä¤¹¤¤¥×¥í¥°¥é¥ß¥ó¥°¤¬½ÐÍè¤Þ¤¹¡¥
-
-
-* Ruby¤ÎÆÃĹ
-
- + ¥·¥ó¥×¥ë¤Êʸˡ
- + ÉáÄ̤Υª¥Ö¥¸¥§¥¯¥È»Ø¸þµ¡Ç½(¥¯¥é¥¹¡¤¥á¥½¥Ã¥É¥³¡¼¥ë¤Ê¤É)
- + ÆÃ¼ì¤Ê¥ª¥Ö¥¸¥§¥¯¥È»Ø¸þµ¡Ç½(Mixin, ÆÃ°Û¥á¥½¥Ã¥É¤Ê¤É)
- + ±é»»»Ò¥ª¡¼¥Ð¡¼¥í¡¼¥É
- + Îã³°½èÍýµ¡Ç½
- + ¥¤¥Æ¥ì¡¼¥¿¤È¥¯¥í¡¼¥¸¥ã
- + ¥¬¡¼¥Ù¡¼¥¸¥³¥ì¥¯¥¿
- + ¥À¥¤¥Ê¥ß¥Ã¥¯¥í¡¼¥Ç¥£¥ó¥° (¥¢¡¼¥­¥Æ¥¯¥Á¥ã¤Ë¤è¤ë)
- + °Ü¿¢À­¤¬¹â¤¤¡¥Â¿¤¯¤ÎUNIX¾å¤Çư¤¯¤À¤±¤Ç¤Ê¤¯¡¤DOS¤äWindows¡¤
- Mac¡¤BeOS¤Ê¤É¤Î¾å¤Ç¤âư¤¯
-
-
-* Æþ¼êË¡
-
-** ftp¤Ç
-
-°Ê²¼¤Î¾ì½ê¤Ë¤ª¤¤¤Æ¤¢¤ê¤Þ¤¹¡¥
-
- ftp://ftp.netlab.co.jp/pub/lang/ruby/
-
-** CVS¤Ç
-
- $ cvs -d :pserver:anonymous@cvs.netlab.co.jp:/home/cvs login
- (Logging in to anonymous@cvs.netlab.co.jp)
- CVS password: guest
- $ cvs -d :pserver:anonymous@cvs.netlab.co.jp:/home/cvs checkout ruby
-
-
-* ¥Û¡¼¥à¥Ú¡¼¥¸
-
-Ruby¤Î¥Û¡¼¥à¥Ú¡¼¥¸¤ÎURL¤Ï
-
- http://www.ruby-lang.org/
-
-¤Ç¤¹¡¥
-
-
-* ¥á¡¼¥ê¥ó¥°¥ê¥¹¥È
-
-Ruby¤Î¥á¡¼¥ê¥ó¥°¥ê¥¹¥È¤¬¤¢¤ê¤Þ¤¹¡£»²²Ã´õ˾¤ÎÊý¤Ï
-
- ruby-list-ctl@netlab.co.jp
-
-¤Þ¤ÇËÜʸ¤Ë
-
- subscribe YourFirstName YourFamilyName
-
-¤È½ñ¤¤¤ÆÁ÷¤Ã¤Æ²¼¤µ¤¤¡£
-
-Ruby³«È¯¼Ô¸þ¤±¥á¡¼¥ê¥ó¥°¥ê¥¹¥È¤â¤¢¤ê¤Þ¤¹¡£¤³¤Á¤é¤Ç¤Ïruby¤Î¥Ð
-¥°¡¢¾­Íè¤Î»ÅÍͳÈÄ¥¤Ê¤É¼ÂÁõ¾å¤ÎÌäÂê¤Ë¤Ä¤¤¤ÆµÄÏÀ¤µ¤ì¤Æ¤¤¤Þ¤¹¡£
-»²²Ã´õ˾¤ÎÊý¤Ï
-
- ruby-dev-ctl@netlab.co.jp
-
-¤Þ¤Çruby-list¤ÈƱÍͤÎÊýË¡¤Ç¥á¡¼¥ë¤·¤Æ¤¯¤À¤µ¤¤¡£
-
-Ruby³ÈÄ¥¥â¥¸¥å¡¼¥ë¤Ë¤Ä¤¤¤ÆÏ䷹礦ruby-ext¥á¡¼¥ê¥ó¥°¥ê¥¹¥È¤È
-±Ñ¸ì¤ÇÏ䷹礦ruby-talk¥á¡¼¥ê¥ó¥°¥ê¥¹¥È¤â¤¢¤ê¤Þ¤¹¡£»²²ÃÊýË¡
-¤Ï¤É¤ì¤âƱ¤¸¤Ç¤¹¡£
-
-
-* ¥³¥ó¥Ñ¥¤¥ë¡¦¥¤¥ó¥¹¥È¡¼¥ë
-
-°Ê²¼¤Î¼ê½ç¤Ç¹Ô¤Ã¤Æ¤¯¤À¤µ¤¤¡¥
-
- 1. ¤â¤·configure¥Õ¥¡¥¤¥ë¤¬¸«¤Ä¤«¤é¤Ê¤¤¡¢¤â¤·¤¯¤Ï
- configure.in¤è¤ê¸Å¤¤¤è¤¦¤Ê¤é¡¢autoconf¤ò¼Â¹Ô¤·¤Æ
- ¿·¤·¤¯configure¤òÀ¸À®¤¹¤ë
-
- 2. configure¤ò¼Â¹Ô¤·¤ÆMakefile¤Ê¤É¤òÀ¸À®¤¹¤ë
-
- 3. (ɬÍפʤé¤Ð)defines.h¤òÊÔ½¸¤¹¤ë
-
- ¿ʬ¡¤É¬Í×̵¤¤¤È»×¤¤¤Þ¤¹¡¥
-
- 4. (ɬÍפʤé¤Ð)ext/Setup¤ËÀÅŪ¤Ë¥ê¥ó¥¯¤¹¤ë³ÈÄ¥¥â¥¸¥å¡¼¥ë¤ò
- »ØÄꤹ¤ë
-
- ext/Setup¤Ëµ­½Ò¤·¤¿¥â¥¸¥å¡¼¥ë¤ÏÀÅŪ¤Ë¥ê¥ó¥¯¤µ¤ì¤Þ¤¹¡¥
-
- ¥À¥¤¥Ê¥ß¥Ã¥¯¥í¡¼¥Ç¥£¥ó¥°¤ò¥µ¥Ý¡¼¥È¤·¤Æ¤¤¤Ê¤¤¥¢¡¼¥­¥Æ¥¯
- ¥Á¥ã¤Ç¤ÏSetup¤Î1¹ÔÌܤΡÖoption nodynamic¡×¤È¤¤¤¦¹Ô¤Î¥³
- ¥á¥ó¥È¤ò³°¤¹É¬Íפ¬¤¢¤ê¤Þ¤¹¡¥¤Þ¤¿¡¤¤³¤Î¥¢¡¼¥­¥Æ¥¯¥Á¥ã¤Ç
- ³ÈÄ¥¥â¥¸¥å¡¼¥ë¤òÍøÍѤ¹¤ë¤¿¤á¤Ë¤Ï¡¤¤¢¤é¤«¤¸¤áÀÅŪ¤Ë¥ê¥ó
- ¥¯¤·¤Æ¤ª¤¯É¬Íפ¬¤¢¤ê¤Þ¤¹¡¥
-
- 5. make¤ò¼Â¹Ô¤·¤Æ¥³¥ó¥Ñ¥¤¥ë¤¹¤ë
-
- 6. make test¤Ç¥Æ¥¹¥È¤ò¹Ô¤¦¡¥
-
- ¡Ötest succeeded¡×¤Èɽ¼¨¤µ¤ì¤ì¤ÐÀ®¸ù¤Ç¤¹¡¥¤¿¤À¤·¥Æ¥¹¥È
- ¤ËÀ®¸ù¤·¤Æ¤â´°àú¤À¤ÈÊݾڤµ¤ì¤Æ¤¤¤ëÌõ¤Ç¤Ï¤¢¤ê¤Þ¤»¤ó¡¥
-
- 7. make install
-
- root¤Çºî¶È¤¹¤ëɬÍפ¬¤¢¤ë¤«¤â¤·¤ì¤Þ¤»¤ó¡¥
-
-¤â¤·¡¤¥³¥ó¥Ñ¥¤¥ë»þ¤Ë¥¨¥é¡¼¤¬È¯À¸¤·¤¿¾ì¹ç¤Ë¤Ï¥¨¥é¡¼¤Î¥í¥°¤È¥Þ
-¥·¥ó¡¤OS¤Î¼ïÎà¤ò´Þ¤à¤Ç¤­¤ë¤À¤±¾Ü¤·¤¤¥ì¥Ý¡¼¥È¤òºî¼Ô¤ËÁ÷¤Ã¤Æ¤¯
-¤À¤µ¤ë¤È¾¤ÎÊý¤Î¤¿¤á¤Ë¤â¤Ê¤ê¤Þ¤¹¡¥
-
-
-* °Ü¿¢
-
-UNIX¤Ç¤¢¤ì¤Ðconfigure¤¬¤Û¤È¤ó¤É¤Îº¹°Û¤òµÛ¼ý¤·¤Æ¤¯¤ì¤ë¤Ï¤º¤Ç
-¤¹¤¬¡¤»×¤ï¤Ì¸«Íî¤È¤·¤¬¤¢¤Ã¤¿¾ì¹ç(¤¢¤ë¤Ë°ã¤¤¤Ê¤¤)¡¤ºî¼Ô¤Ë¤½¤Î
-¤³¤È¤ò¥ì¥Ý¡¼¥È¤¹¤ì¤Ð¡¤²ò·è¤Ç¤­¤ë¤«¤âÃΤì¤Þ¤»¤ó¡¥
-
-¥¢¡¼¥­¥Æ¥¯¥Á¥ã¤Ë¤â¤Ã¤È¤â°Í¸¤¹¤ë¤Î¤ÏGCÉô¤Ç¤¹¡¥Ruby¤ÎGC¤ÏÂоÝ
-¤Î¥¢¡¼¥­¥Æ¥¯¥Á¥ã¤¬setjmp()¤Ë¤è¤Ã¤ÆÁ´¤Æ¤Î¥ì¥¸¥¹¥¿¤ò jmp_buf¤Ë
-³ÊǼ¤¹¤ë¤³¤È¤È¡¤jmp_buf¤È¥¹¥¿¥Ã¥¯¤¬32bit¥¢¥é¥¤¥ó¥á¥ó¥È¤µ¤ì¤Æ
-¤¤¤ë¤³¤È¤ò²¾Äꤷ¤Æ¤¤¤Þ¤¹¡¥ÆÃ¤ËÁ°¼Ô¤¬À®Î©¤·¤Ê¤¤¾ì¹ç¤ÎÂбþ¤ÏÈó
-¾ï¤Ëº¤Æñ¤Ç¤·¤ç¤¦¡¥¸å¼Ô¤Î²ò·è¤ÏÈæ³ÓŪ´Êñ¤Ç¡¤gc.c¤Ç¥¹¥¿¥Ã¥¯¤ò
-¥Þ¡¼¥¯¤·¤Æ¤¤¤ëÉôʬ¤Ë¥¢¥é¥¤¥ó¥á¥ó¥È¤Î¥Ð¥¤¥È¿ô¤À¤±¤º¤é¤·¤Æ¥Þ¡¼
-¥¯¤¹¤ë¥³¡¼¥É¤òÄɲ乤ë¤À¤±¤ÇºÑ¤ß¤Þ¤¹¡¥¡Ödefined(THINK_C)¡×¤Ç
-³ç¤é¤ì¤Æ¤¤¤ëÉôʬ¤ò»²¹Í¤Ë¤·¤Æ¤¯¤À¤µ¤¤
-
-# ¼ÂºÝ¤Ë¤ÏRuby¤ÏThink C¤Ç¤Ï¥³¥ó¥Ñ¥¤¥ë¤Ç¤­¤Þ¤»¤ó¡¥
-
-¥ì¥¸¥¹¥¿¥¦¥£¥ó¥É¥¦¤ò»ý¤ÄCPU¤Ç¤Ï¡¤¥ì¥¸¥¹¥¿¥¦¥£¥ó¥É¥¦¤ò¥¹¥¿¥Ã
-¥¯¤Ë¥Õ¥é¥Ã¥·¥å¤¹¤ë¥¢¥»¥ó¥Ö¥é¥³¡¼¥É¤òÄɲ乤ëɬÍפ¬¤¢¤ë¤«¤âÃÎ
-¤ì¤Þ¤»¤ó¡¥
-
-
-* ÇÛÉÛ¾ò·ï
-
-ËÜ¥×¥í¥°¥é¥à¤Ï¥Õ¥ê¡¼¥½¥Õ¥È¥¦¥§¥¢¤Ç¤¹¡¥GPL(the GNU General
-Public License)¤Þ¤¿¤Ï°Ê²¼¤Ë¼¨¤¹¾ò·ï¤ÇËÜ¥×¥í¥°¥é¥à¤òºÆÇÛÉÛ¤Ç
-¤­¤Þ¤¹¡¥GPL¤Ë¤Ä¤¤¤Æ¤ÏCOPYING¥Õ¥¡¥¤¥ë¤ò»²¾È¤·¤Æ²¼¤µ¤¤¡¥
-
- 1. Ê£À½¤ÏÀ©¸Â¤Ê¤¯¼«Í³¤Ç¤¹¡¥
-
- 2. °Ê²¼¤Î¾ò·ï¤Î¤¤¤º¤ì¤«¤òËþ¤¿¤¹»þ¤ËËÜ¥×¥í¥°¥é¥à¤Î¥½¡¼¥¹¤ò
- ¼«Í³¤ËÊѹ¹¤Ç¤­¤Þ¤¹¡¥
-
- (a) ¥Í¥Ã¥È¥Ë¥å¡¼¥º¤Ë¥Ý¥¹¥È¤·¤¿¤ê¡¤ºî¼Ô¤ËÊѹ¹¤òÁ÷ÉÕ¤¹¤ë
- ¤Ê¤É¤ÎÊýË¡¤Ç¡¤Êѹ¹¤ò¸ø³«¤¹¤ë¡¥
-
- (b) Êѹ¹¤·¤¿ËÜ¥×¥í¥°¥é¥à¤ò¼«Ê¬¤Î½ê°¤¹¤ëÁÈ¿¥ÆâÉô¤À¤±¤Ç
- »È¤¦¡¥
-
- (c) Êѹ¹ÅÀ¤òÌÀ¼¨¤·¤¿¤¦¤¨¡¤¥½¥Õ¥È¥¦¥§¥¢¤Î̾Á°¤òÊѹ¹¤¹¤ë¡¥
- ¤½¤Î¥½¥Õ¥È¥¦¥§¥¢¤òÇÛÉÛ¤¹¤ë»þ¤Ë¤ÏÊѹ¹Á°¤ÎËÜ¥×¥í¥°¥é
- ¥à¤âƱ»þ¤ËÇÛÉÛ¤¹¤ë¡¥¤Þ¤¿¤ÏÊѹ¹Á°¤ÎËÜ¥×¥í¥°¥é¥à¤Î¥½¡¼
- ¥¹¤ÎÆþ¼êË¡¤òÌÀ¼¨¤¹¤ë¡¥
-
- (d) ¤½¤Î¾¤ÎÊѹ¹¾ò·ï¤òºî¼Ô¤È¹ç°Õ¤¹¤ë¡¥
-
- 3. °Ê²¼¤Î¾ò·ï¤Î¤¤¤º¤ì¤«¤òËþ¤¿¤¹»þ¤ËËÜ¥×¥í¥°¥é¥à¤ò¥³¥ó¥Ñ¥¤
- ¥ë¤·¤¿¥ª¥Ö¥¸¥§¥¯¥È¥³¡¼¥É¤ä¼Â¹Ô·Á¼°¤Ç¤âÇÛÉۤǤ­¤Þ¤¹¡¥
-
- (a) ¥Ð¥¤¥Ê¥ê¤ò¼õ¤±¼è¤Ã¤¿¿Í¤¬¥½¡¼¥¹¤òÆþ¼ê¤Ç¤­¤ë¤è¤¦¤Ë¡¤
- ¥½¡¼¥¹¤ÎÆþ¼êË¡¤òÌÀ¼¨¤¹¤ë¡¥
-
- (b) µ¡³£²ÄÆÉ¤Ê¥½¡¼¥¹¥³¡¼¥É¤òźÉÕ¤¹¤ë¡¥
-
- (c) Êѹ¹¤ò¹Ô¤Ã¤¿¥Ð¥¤¥Ê¥ê¤Ï̾Á°¤òÊѹ¹¤·¤¿¤¦¤¨¡¤¥ª¥ê¥¸¥Ê
- ¥ë¤Î¥½¡¼¥¹¥³¡¼¥É¤ÎÆþ¼êË¡¤òÌÀ¼¨¤¹¤ë¡¥
-
- (d) ¤½¤Î¾¤ÎÇÛÉÛ¾ò·ï¤òºî¼Ô¤È¹ç°Õ¤¹¤ë¡¥
-
- 4. ¾¤Î¥×¥í¥°¥é¥à¤Ø¤Î°úÍѤϤ¤¤«¤Ê¤ëÌÜŪ¤Ç¤¢¤ì¼«Í³¤Ç¤¹¡¥¤¿
- ¤À¤·¡¤ËÜ¥×¥í¥°¥é¥à¤Ë´Þ¤Þ¤ì¤ë¾¤Îºî¼Ô¤Ë¤è¤ë¥³¡¼¥É¤Ï¡¤¤½
- ¤ì¤¾¤ì¤Îºî¼Ô¤Î°Õ¸þ¤Ë¤è¤ëÀ©¸Â¤¬²Ã¤¨¤é¤ì¤ë¾ì¹ç¤¬¤¢¤ê¤Þ¤¹¡¥
-
- ¶ñÂÎŪ¤Ë¤Ïgc.c(°ìÉô)¡¤util.c(°ìÉô)¡¤st.[ch]¡¤regex.[ch]
- ¤ª¤è¤Ó ./missing¥Ç¥£¥ì¥¯¥È¥ê²¼¤Î¥Õ¥¡¥¤¥ë·²¤¬³ºÅö¤·¤Þ¤¹¡¥
- ¤½¤ì¤¾¤ì¤ÎÇÛÉÛ¾ò·ï¤Ê¤É¤ËÉÕ¤¤¤Æ¤Ï³Æ¥Õ¥¡¥¤¥ë¤ò»²¾È¤·¤Æ¤¯
- ¤À¤µ¤¤¡¥
-
- 5. ËÜ¥×¥í¥°¥é¥à¤Ø¤ÎÆþÎϤȤʤ륹¥¯¥ê¥×¥È¤ª¤è¤Ó¡¤ËÜ¥×¥í¥°¥é
- ¥à¤«¤é¤Î½ÐÎϤθ¢Íø¤ÏËÜ¥×¥í¥°¥é¥à¤Îºî¼Ô¤Ç¤Ï¤Ê¤¯¡¤¤½¤ì¤¾
- ¤ì¤ÎÆþ½ÐÎϤòÀ¸À®¤·¤¿¿Í¤Ë°¤·¤Þ¤¹¡¥¤Þ¤¿¡¤ËÜ¥×¥í¥°¥é¥à¤Ë
- ÁȤ߹þ¤Þ¤ì¤ë¤¿¤á¤Î³ÈÄ¥¥é¥¤¥Ö¥é¥ê¤Ë¤Ä¤¤¤Æ¤âƱÍͤǤ¹¡¥
-
- 6. ËÜ¥×¥í¥°¥é¥à¤Ï̵ÊݾڤǤ¹¡¥ºî¼Ô¤ÏËÜ¥×¥í¥°¥é¥à¤ò¥µ¥Ý¡¼¥È
- ¤¹¤ë°Õ»Ö¤Ï¤¢¤ê¤Þ¤¹¤¬¡¤¥×¥í¥°¥é¥à¼«¿È¤Î¥Ð¥°¤¢¤ë¤¤¤ÏËÜ¥×
- ¥í¥°¥é¥à¤Î¼Â¹Ô¤Ê¤É¤«¤éȯÀ¸¤¹¤ë¤¤¤«¤Ê¤ë»³²¤ËÂФ·¤Æ¤âÀÕ
- Ǥ¤ò»ý¤Á¤Þ¤»¤ó¡¥
-
-* Ãø¼Ô
-
-¥³¥á¥ó¥È¡¤¥Ð¥°¥ì¥Ý¡¼¥È¤½¤Î¾¤Ï matz@zetabits.com ¤Þ¤Ç¡¥
--------------------------------------------------------
-created at: Thu Aug 3 11:57:36 JST 1995
-Local variables:
-mode: indented-text
-end:
diff --git a/ToDo b/ToDo
deleted file mode 100644
index 5f67a42b25..0000000000
--- a/ToDo
+++ /dev/null
@@ -1,129 +0,0 @@
-Language Spec.
-
-- def foo; .. rescue .. end
-- compile time string concatenation, "hello" "world" => "helloworld"
-- rescue modifier; a rescue b => begin a rescue; b end
-- %w(a\ b\ c abc) => ["a b c", "abc"]
-- objectify symbols
-- class variable (prefix @@)
-- rescue RuntimeError => err
-* operator !! for rescue. ???
-* objectify characters
-* ../... outside condition invokes operator method too.
-* ... inside condition turns off just before right condition.???
-* package or access control for global variables??
-* named arguments like foo(nation:="german") or foo(nation: "german").
-* method to retrieve argument information (needs new C API)
-* multiple return values, yield values. maybe incompatible ???
-* cascading method invocation ???
-* def Class#method .. end ??
-* class Foo::Bar<Baz .. end, module Boo::Bar .. end
-* def Foo::Bar::baz() .. end ??
-* I18N (or M17N) script/string/regexp
-* Fixnum 0 as false ????
-* discourage use of symbol variable (e.g. $/, etc.) in manual
-* discourage use of Perlish features by giving warnings.
-* non confusing in-block local variable (is it possible?)
- + remove scope by block
- + variables appears within block may have independent values.
-* Regexp: make /o thread safe.
-* decide if begin with rescue or ensure make do..while loop.
-* a +1 to be a+1, not a(+1).
-
-Hacking Interpreter
-
-- use eban's fnmatch
-- RUBYOPT environment variable
-- alias $defout $>
-- retrieve STACK_LEVEL_MAX from users' limit.
-- remove end_proc registered out of require only
-- all object made freezable
-* non-blocking open (e.g. for named pipe) for thread
-* avoid blocking with gethostbyname/gethostbyaddr (use fork ???)
-* objectify interpreters ???
-* remove rb_eval() recursions
-* syntax tree -> bytecode ???
-* scrambled script, or script filter
-* setuid ruby
-* performance tune for in-block (dynamic) local variables.
-* generational GC
-* give warnings to assign magic variables.
-* export rb_io_{addstr,printf,puts,print}
-* autoload should work with threads [ruby-talk:4589]
-* remove stdio dependency from IOs.
-* warn for inconsistent local variable usage (lv m and method m at the same time).
-
-Standard Libraries
-
-- hash[key] = nil does not remove entry; hashes may have nil as the value.
-- hash.fetch(key) raises exception if key is not found.
-- Array#{first,last,at}
-- Dir.glob(pat){|f|...}
-- sprintf/printf's $ to specify argument order
-- Dir.glob("**/*.c") ala zsh
-- Remove Enumerable#{size,length}
-- Array#slice, Array#slice!
-- String#slice, String#slice!
-- Marshal should handle generic instance variables.
-- debugger for thread programming
-- SyntaxError, NameError, LoadError and NotImplementedError are subclasses of
- ScriptError<Exception, not StandardError.
-- Thread::start gives arguments, not a thread object to the block
-- regexp: (?>..), \G
-- Struct::new([name,]member,...)
-- IO#reopen accepts path as well
-- Kernel#scan
-- call initialize for builtin classes too
-- performance tune for String's non-bang methods.
-- 'w' template for pack/unpack
-- alternative for interator? => block_given?
-- regex - /p (made obsolete), /m (new)
-- consistent /, %, divmod
-- unbound method object
-- integrate final.rb into the core.
-* Enumerable#sort_by for Schwartzian transformation
-* String#scanf(?)
-* Object#fmt(?)
-* Integer#{bin,oct,hex,heX}
-* Time::strptime
-* Integer[num], Float[num]; Fixnum[num]?
-* method to retrieve non-number trailer for to_i/to_f.
-* Stream or Port, abstract superclass of IO ?
-* String#{pred,prev}, String#downto
-* optional stepsize argument for succ()
-* Ruby module -- Ruby::Version, Ruby::Interpreter
-* introduce Boolean class; super of TrueClass, FalseClass
-* Process::waitall [ruby-talk:4557]
-* synchronized method - synchronized{...}, synchronized :foo, :bar
-* move Time::times to Process.
-- Module#define_method which takes a name and a body (block, proc or method).
-* IO#for_fd in general
-* Array#&, Array#| to allow duplication. ???
-- fork_and_kill_other_threads.
-* way to specify immortal (fork endurance) thread;
-* or raise ForkException to every thread but fork caller.
-* Array#fetch
-
-Extension Libraries
-
-- FastCGI ruby
-* ptk.rb pTk wrapper that is compatible to tk.rb
-* Berkeley DB extension
-* BitVector
-
-Ruby Libraries
-
-- net/http.rb
-* add uri.rb
-* urllib.rb, nttplib.rb, etc.
-* format like perl's
-
-Tools
-
-- extension library maker using SWIG
-* freeze or undump to bundle everything
-
-Misc
-
-- publish Ruby books
-- publish Ruby books in English
diff --git a/addr2line.c b/addr2line.c
new file mode 100644
index 0000000000..9528a8fa43
--- /dev/null
+++ b/addr2line.c
@@ -0,0 +1,623 @@
+/**********************************************************************
+
+ addr2line.c -
+
+ $Author$
+
+ Copyright (C) 2010 Shinichiro Hamaji
+
+**********************************************************************/
+
+#include "ruby/config.h"
+#include "addr2line.h"
+
+#include <stdio.h>
+#include <errno.h>
+
+#ifdef USE_ELF
+
+#ifdef __OpenBSD__
+#include <elf_abi.h>
+#else
+#include <elf.h>
+#endif
+#include <fcntl.h>
+#include <limits.h>
+#include <stdio.h>
+#include <stdint.h>
+#include <stdlib.h>
+#include <string.h>
+#include <sys/mman.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <unistd.h>
+
+#if defined(HAVE_ALLOCA_H)
+#include <alloca.h>
+#endif
+
+#ifdef HAVE_DL_ITERATE_PHDR
+# ifndef _GNU_SOURCE
+# define _GNU_SOURCE
+# endif
+# include <link.h>
+#endif
+
+#define DW_LNS_copy 0x01
+#define DW_LNS_advance_pc 0x02
+#define DW_LNS_advance_line 0x03
+#define DW_LNS_set_file 0x04
+#define DW_LNS_set_column 0x05
+#define DW_LNS_negate_stmt 0x06
+#define DW_LNS_set_basic_block 0x07
+#define DW_LNS_const_add_pc 0x08
+#define DW_LNS_fixed_advance_pc 0x09
+#define DW_LNS_set_prologue_end 0x0a /* DWARF3 */
+#define DW_LNS_set_epilogue_begin 0x0b /* DWARF3 */
+#define DW_LNS_set_isa 0x0c /* DWARF3 */
+
+/* Line number extended opcode name. */
+#define DW_LNE_end_sequence 0x01
+#define DW_LNE_set_address 0x02
+#define DW_LNE_define_file 0x03
+#define DW_LNE_set_discriminator 0x04 /* DWARF4 */
+
+#ifndef ElfW
+# if SIZEOF_VOIDP == 8
+# define ElfW(x) Elf64##_##x
+# else
+# define ElfW(x) Elf32##_##x
+# endif
+#endif
+#ifndef PATH_MAX
+#define PATH_MAX 4096
+#endif
+
+typedef struct {
+ const char *dirname;
+ const char *filename;
+ int line;
+
+ int fd;
+ void *mapped;
+ size_t mapped_size;
+ unsigned long base_addr;
+} line_info_t;
+
+/* Avoid consuming stack as this module may be used from signal handler */
+static char binary_filename[PATH_MAX];
+
+static unsigned long
+uleb128(char **p)
+{
+ unsigned long r = 0;
+ int s = 0;
+ for (;;) {
+ unsigned char b = *(unsigned char *)(*p)++;
+ if (b < 0x80) {
+ r += (unsigned long)b << s;
+ break;
+ }
+ r += (b & 0x7f) << s;
+ s += 7;
+ }
+ return r;
+}
+
+static long
+sleb128(char **p)
+{
+ long r = 0;
+ int s = 0;
+ for (;;) {
+ unsigned char b = *(unsigned char *)(*p)++;
+ if (b < 0x80) {
+ if (b & 0x40) {
+ r -= (0x80 - b) << s;
+ }
+ else {
+ r += (b & 0x3f) << s;
+ }
+ break;
+ }
+ r += (b & 0x7f) << s;
+ s += 7;
+ }
+ return r;
+}
+
+static const char *
+get_nth_dirname(unsigned long dir, char *p)
+{
+ if (!dir--) {
+ return "";
+ }
+ while (dir--) {
+ while (*p) p++;
+ p++;
+ if (!*p) {
+ fprintf(stderr, "Unexpected directory number %lu in %s\n",
+ dir, binary_filename);
+ return "";
+ }
+ }
+ return p;
+}
+
+static void
+fill_filename(int file, char *include_directories, char *filenames,
+ line_info_t *line)
+{
+ int i;
+ char *p = filenames;
+ char *filename;
+ unsigned long dir;
+ for (i = 1; i <= file; i++) {
+ filename = p;
+ if (!*p) {
+ /* Need to output binary file name? */
+ fprintf(stderr, "Unexpected file number %d in %s\n",
+ file, binary_filename);
+ return;
+ }
+ while (*p) p++;
+ p++;
+ dir = uleb128(&p);
+ /* last modified. */
+ uleb128(&p);
+ /* size of the file. */
+ uleb128(&p);
+
+ if (i == file) {
+ line->filename = filename;
+ line->dirname = get_nth_dirname(dir, include_directories);
+ }
+ }
+}
+
+static int
+get_path_from_symbol(const char *symbol, const char **p, size_t *len)
+{
+ if (symbol[0] == '0') {
+ /* libexecinfo */
+ *p = strchr(symbol, '/');
+ if (*p == NULL) return 0;
+ *len = strlen(*p);
+ }
+ else {
+ /* glibc */
+ const char *q;
+ *p = symbol;
+ q = strchr(symbol, '(');
+ if (q == NULL) return 0;
+ *len = q - symbol;
+ }
+ return 1;
+}
+
+static void
+fill_line(int num_traces, void **traces,
+ unsigned long addr, int file, int line,
+ char *include_directories, char *filenames, line_info_t *lines)
+{
+ int i;
+ for (i = 0; i < num_traces; i++) {
+ unsigned long a = (unsigned long)traces[i] - lines[i].base_addr;
+ /* We assume one line code doesn't result >100 bytes of native code.
+ We may want more reliable way eventually... */
+ if (addr < a && a < addr + 100) {
+ fill_filename(file, include_directories, filenames, &lines[i]);
+ lines[i].line = line;
+ }
+ }
+}
+
+static void
+parse_debug_line_cu(int num_traces, void **traces,
+ char **debug_line, line_info_t *lines)
+{
+ char *p, *cu_end, *cu_start, *include_directories, *filenames;
+ unsigned long unit_length;
+ int default_is_stmt, line_base;
+ unsigned int header_length, minimum_instruction_length, line_range,
+ opcode_base;
+ /* unsigned char *standard_opcode_lengths; */
+
+ /* The registers. */
+ unsigned long addr = 0;
+ unsigned int file = 1;
+ unsigned int line = 1;
+ /* unsigned int column = 0; */
+ int is_stmt;
+ /* int basic_block = 0; */
+ /* int end_sequence = 0; */
+ /* int prologue_end = 0; */
+ /* int epilogue_begin = 0; */
+ /* unsigned int isa = 0; */
+
+ p = *debug_line;
+
+ unit_length = *(unsigned int *)p;
+ p += sizeof(unsigned int);
+ if (unit_length == 0xffffffff) {
+ unit_length = *(unsigned long *)p;
+ p += sizeof(unsigned long);
+ }
+
+ cu_end = p + unit_length;
+
+ /*dwarf_version = *(unsigned short *)p;*/
+ p += 2;
+
+ header_length = *(unsigned int *)p;
+ p += sizeof(unsigned int);
+
+ cu_start = p + header_length;
+
+ minimum_instruction_length = *(unsigned char *)p;
+ p++;
+
+ is_stmt = default_is_stmt = *(unsigned char *)p;
+ p++;
+
+ line_base = *(char *)p;
+ p++;
+
+ line_range = *(unsigned char *)p;
+ p++;
+
+ opcode_base = *(unsigned char *)p;
+ p++;
+
+ /* standard_opcode_lengths = (unsigned char *)p - 1; */
+ p += opcode_base - 1;
+
+ include_directories = p;
+
+ /* skip include directories */
+ while (*p) {
+ while (*p) p++;
+ p++;
+ }
+ p++;
+
+ filenames = p;
+
+ p = cu_start;
+
+#define FILL_LINE() \
+ do { \
+ fill_line(num_traces, traces, addr, file, line, \
+ include_directories, filenames, lines); \
+ /*basic_block = prologue_end = epilogue_begin = 0;*/ \
+ } while (0)
+
+ while (p < cu_end) {
+ unsigned long a;
+ unsigned char op = *p++;
+ switch (op) {
+ case DW_LNS_copy:
+ FILL_LINE();
+ break;
+ case DW_LNS_advance_pc:
+ a = uleb128(&p);
+ addr += a;
+ break;
+ case DW_LNS_advance_line: {
+ long a = sleb128(&p);
+ line += a;
+ break;
+ }
+ case DW_LNS_set_file:
+ file = (unsigned int)uleb128(&p);
+ break;
+ case DW_LNS_set_column:
+ /*column = (unsigned int)*/(void)uleb128(&p);
+ break;
+ case DW_LNS_negate_stmt:
+ is_stmt = !is_stmt;
+ break;
+ case DW_LNS_set_basic_block:
+ /*basic_block = 1; */
+ break;
+ case DW_LNS_const_add_pc:
+ a = ((255 - opcode_base) / line_range) *
+ minimum_instruction_length;
+ addr += a;
+ break;
+ case DW_LNS_fixed_advance_pc:
+ a = *(unsigned char *)p++;
+ addr += a;
+ break;
+ case DW_LNS_set_prologue_end:
+ /* prologue_end = 1; */
+ break;
+ case DW_LNS_set_epilogue_begin:
+ /* epilogue_begin = 1; */
+ break;
+ case DW_LNS_set_isa:
+ /* isa = (unsigned int)*/(void)uleb128(&p);
+ break;
+ case 0:
+ a = *(unsigned char *)p++;
+ op = *p++;
+ switch (op) {
+ case DW_LNE_end_sequence:
+ /* end_sequence = 1; */
+ FILL_LINE();
+ addr = 0;
+ file = 1;
+ line = 1;
+ /* column = 0; */
+ is_stmt = default_is_stmt;
+ /* end_sequence = 0; */
+ /* isa = 0; */
+ break;
+ case DW_LNE_set_address:
+ addr = *(unsigned long *)p;
+ p += sizeof(unsigned long);
+ break;
+ case DW_LNE_define_file:
+ fprintf(stderr, "Unsupported operation in %s\n",
+ binary_filename);
+ break;
+ case DW_LNE_set_discriminator:
+ /* TODO:currently ignore */
+ uleb128(&p);
+ break;
+ default:
+ fprintf(stderr, "Unknown extended opcode: %d in %s\n",
+ op, binary_filename);
+ }
+ break;
+ default: {
+ unsigned long addr_incr;
+ unsigned long line_incr;
+ a = op - opcode_base;
+ addr_incr = (a / line_range) * minimum_instruction_length;
+ line_incr = line_base + (a % line_range);
+ addr += (unsigned int)addr_incr;
+ line += (unsigned int)line_incr;
+ FILL_LINE();
+ }
+ }
+ }
+ *debug_line = p;
+}
+
+static void
+parse_debug_line(int num_traces, void **traces,
+ char *debug_line, unsigned long size, line_info_t *lines)
+{
+ char *debug_line_end = debug_line + size;
+ while (debug_line < debug_line_end) {
+ parse_debug_line_cu(num_traces, traces, &debug_line, lines);
+ }
+ if (debug_line != debug_line_end) {
+ fprintf(stderr, "Unexpected size of .debug_line in %s\n",
+ binary_filename);
+ }
+}
+
+/* read file and fill lines */
+static void
+fill_lines(int num_traces, void **traces, char **syms, int check_debuglink,
+ line_info_t *current_line, line_info_t *lines);
+
+static void
+follow_debuglink(char *debuglink, int num_traces, void **traces, char **syms,
+ line_info_t *current_line, line_info_t *lines)
+{
+ /* Ideally we should check 4 paths to follow gnu_debuglink,
+ but we handle only one case for now as this format is used
+ by some linux distributions. See GDB's info for detail. */
+ static const char global_debug_dir[] = "/usr/lib/debug";
+ char *p, *subdir;
+
+ p = strrchr(binary_filename, '/');
+ if (!p) {
+ return;
+ }
+ p[1] = '\0';
+
+ subdir = (char *)alloca(strlen(binary_filename) + 1);
+ strcpy(subdir, binary_filename);
+ strcpy(binary_filename, global_debug_dir);
+ strncat(binary_filename, subdir,
+ PATH_MAX - strlen(binary_filename) - 1);
+ strncat(binary_filename, debuglink,
+ PATH_MAX - strlen(binary_filename) - 1);
+
+ munmap(current_line->mapped, current_line->mapped_size);
+ close(current_line->fd);
+ fill_lines(num_traces, traces, syms, 0, current_line, lines);
+}
+
+/* read file and fill lines */
+static void
+fill_lines(int num_traces, void **traces, char **syms, int check_debuglink,
+ line_info_t *current_line, line_info_t *lines)
+{
+ int i;
+ char *shstr;
+ char *section_name;
+ ElfW(Ehdr) *ehdr;
+ ElfW(Shdr) *shdr, *shstr_shdr;
+ ElfW(Shdr) *debug_line_shdr = NULL, *gnu_debuglink_shdr = NULL;
+ int fd;
+ off_t filesize;
+ char *file;
+
+ fd = open(binary_filename, O_RDONLY);
+ if (fd < 0) {
+ return;
+ }
+ filesize = lseek(fd, 0, SEEK_END);
+ if (filesize < 0) {
+ int e = errno;
+ close(fd);
+ fprintf(stderr, "lseek: %s\n", strerror(e));
+ return;
+ }
+#if SIZEOF_OFF_T > SIZEOF_SIZE_T
+ if (filesize > (off_t)SIZE_MAX) {
+ close(fd);
+ fprintf(stderr, "Too large file %s\n", binary_filename);
+ return;
+ }
+#endif
+ lseek(fd, 0, SEEK_SET);
+ /* async-signal unsafe */
+ file = (char *)mmap(NULL, (size_t)filesize, PROT_READ, MAP_SHARED, fd, 0);
+ if (file == MAP_FAILED) {
+ int e = errno;
+ close(fd);
+ fprintf(stderr, "mmap: %s\n", strerror(e));
+ return;
+ }
+
+ current_line->fd = fd;
+ current_line->mapped = file;
+ current_line->mapped_size = (size_t)filesize;
+
+ for (i = 0; i < num_traces; i++) {
+ const char *path;
+ size_t len;
+ if (get_path_from_symbol(syms[i], &path, &len) &&
+ !strncmp(path, binary_filename, len)) {
+ lines[i].line = -1;
+ }
+ }
+
+ ehdr = (ElfW(Ehdr) *)file;
+ shdr = (ElfW(Shdr) *)(file + ehdr->e_shoff);
+
+ shstr_shdr = shdr + ehdr->e_shstrndx;
+ shstr = file + shstr_shdr->sh_offset;
+
+ for (i = 0; i < ehdr->e_shnum; i++) {
+ section_name = shstr + shdr[i].sh_name;
+ if (!strcmp(section_name, ".debug_line")) {
+ debug_line_shdr = shdr + i;
+ break;
+ } else if (!strcmp(section_name, ".gnu_debuglink")) {
+ gnu_debuglink_shdr = shdr + i;
+ }
+ }
+
+ if (!debug_line_shdr) {
+ /* This file doesn't have .debug_line section,
+ let's check .gnu_debuglink section instead. */
+ if (gnu_debuglink_shdr && check_debuglink) {
+ follow_debuglink(file + gnu_debuglink_shdr->sh_offset,
+ num_traces, traces, syms,
+ current_line, lines);
+ }
+ return;
+ }
+
+ parse_debug_line(num_traces, traces,
+ file + debug_line_shdr->sh_offset,
+ debug_line_shdr->sh_size,
+ lines);
+}
+
+#ifdef HAVE_DL_ITERATE_PHDR
+
+typedef struct {
+ int num_traces;
+ char **syms;
+ line_info_t *lines;
+} fill_base_addr_state_t;
+
+static int
+fill_base_addr(struct dl_phdr_info *info, size_t size, void *data)
+{
+ int i;
+ fill_base_addr_state_t *st = (fill_base_addr_state_t *)data;
+ for (i = 0; i < st->num_traces; i++) {
+ const char *path;
+ size_t len;
+ size_t name_len = strlen(info->dlpi_name);
+
+ if (get_path_from_symbol(st->syms[i], &path, &len) &&
+ (len == name_len || (len > name_len && path[len-name_len-1] == '/')) &&
+ !strncmp(path+len-name_len, info->dlpi_name, name_len)) {
+ st->lines[i].base_addr = info->dlpi_addr;
+ }
+ }
+ return 0;
+}
+
+#endif /* HAVE_DL_ITERATE_PHDR */
+
+void
+rb_dump_backtrace_with_lines(int num_traces, void **trace, char **syms)
+{
+ int i;
+ /* async-signal unsafe */
+ line_info_t *lines = (line_info_t *)calloc(num_traces,
+ sizeof(line_info_t));
+
+ /* Note that line info of shared objects might not be shown
+ if we don't have dl_iterate_phdr */
+#ifdef HAVE_DL_ITERATE_PHDR
+ fill_base_addr_state_t fill_base_addr_state;
+
+ fill_base_addr_state.num_traces = num_traces;
+ fill_base_addr_state.syms = syms;
+ fill_base_addr_state.lines = lines;
+ /* maybe async-signal unsafe */
+ dl_iterate_phdr(fill_base_addr, &fill_base_addr_state);
+#endif /* HAVE_DL_ITERATE_PHDR */
+
+ for (i = 0; i < num_traces; i++) {
+ const char *path;
+ size_t len;
+ if (lines[i].line) {
+ continue;
+ }
+
+ if (!get_path_from_symbol(syms[i], &path, &len)) {
+ continue;
+ }
+
+ strncpy(binary_filename, path, len);
+ binary_filename[len] = '\0';
+
+ fill_lines(num_traces, trace, syms, 1, &lines[i], lines);
+ }
+
+ /* fprintf may not be async-signal safe */
+ for (i = 0; i < num_traces; i++) {
+ line_info_t *line = &lines[i];
+
+ if (line->line > 0) {
+ fprintf(stderr, "%s ", syms[i]);
+ if (line->filename) {
+ if (line->dirname && line->dirname[0]) {
+ fprintf(stderr, "%s/", line->dirname);
+ }
+ fprintf(stderr, "%s", line->filename);
+ } else {
+ fprintf(stderr, "???");
+ }
+ fprintf(stderr, ":%d\n", line->line);
+ } else {
+ fprintf(stderr, "%s\n", syms[i]);
+ }
+ }
+
+ for (i = 0; i < num_traces; i++) {
+ line_info_t *line = &lines[i];
+ if (line->fd) {
+ munmap(line->mapped, line->mapped_size);
+ close(line->fd);
+ }
+ }
+ free(lines);
+}
+
+#else /* defined(USE_ELF) */
+#error not supported
+#endif
diff --git a/addr2line.h b/addr2line.h
new file mode 100644
index 0000000000..3782d89e07
--- /dev/null
+++ b/addr2line.h
@@ -0,0 +1,21 @@
+/**********************************************************************
+
+ addr2line.h -
+
+ $Author$
+
+ Copyright (C) 2010 Shinichiro Hamaji
+
+**********************************************************************/
+
+#ifndef RUBY_ADDR2LINE_H
+#define RUBY_ADDR2LINE_H
+
+#ifdef USE_ELF
+
+void
+rb_dump_backtrace_with_lines(int num_traces, void **traces, char **syms);
+
+#endif /* USE_ELF */
+
+#endif /* RUBY_ADDR2LINE_H */
diff --git a/array.c b/array.c
index 3349a81f8f..e38c93b55f 100644
--- a/array.c
+++ b/array.c
@@ -3,1686 +3,5139 @@
array.c -
$Author$
- $Date$
created at: Fri Aug 6 09:46:12 JST 1993
- Copyright (C) 1993-2000 Yukihiro Matsumoto
+ Copyright (C) 1993-2007 Yukihiro Matsumoto
Copyright (C) 2000 Network Applied Communication Laboratory, Inc.
Copyright (C) 2000 Information-technology Promotion Agency, Japan
**********************************************************************/
-#include "ruby.h"
-#include "util.h"
-#include "st.h"
+#include "ruby/ruby.h"
+#include "ruby/util.h"
+#include "ruby/st.h"
+#include "ruby/encoding.h"
+#include "internal.h"
+
+#ifndef ARRAY_DEBUG
+# define NDEBUG
+#endif
+#include <assert.h>
+
+#define numberof(array) (int)(sizeof(array) / sizeof((array)[0]))
VALUE rb_cArray;
+static ID id_cmp;
+
#define ARY_DEFAULT_SIZE 16
+#define ARY_MAX_SIZE (LONG_MAX / (int)sizeof(VALUE))
void
-rb_mem_clear(mem, size)
- register VALUE *mem;
- register long size;
+rb_mem_clear(register VALUE *mem, register long size)
{
while (size--) {
*mem++ = Qnil;
}
}
-static void
-memfill(mem, size, val)
- register VALUE *mem;
- register long size;
- register VALUE val;
+static inline void
+memfill(register VALUE *mem, register long size, register VALUE val)
{
while (size--) {
*mem++ = val;
}
}
-#define ARY_TMPLOCK FL_USER1
+# define ARY_SHARED_P(ary) \
+ (assert(!FL_TEST((ary), ELTS_SHARED) || !FL_TEST((ary), RARRAY_EMBED_FLAG)), \
+ FL_TEST((ary),ELTS_SHARED)!=0)
+# define ARY_EMBED_P(ary) \
+ (assert(!FL_TEST((ary), ELTS_SHARED) || !FL_TEST((ary), RARRAY_EMBED_FLAG)), \
+ FL_TEST((ary), RARRAY_EMBED_FLAG)!=0)
+
+#define ARY_HEAP_PTR(a) (assert(!ARY_EMBED_P(a)), RARRAY(a)->as.heap.ptr)
+#define ARY_HEAP_LEN(a) (assert(!ARY_EMBED_P(a)), RARRAY(a)->as.heap.len)
+#define ARY_EMBED_PTR(a) (assert(ARY_EMBED_P(a)), RARRAY(a)->as.ary)
+#define ARY_EMBED_LEN(a) \
+ (assert(ARY_EMBED_P(a)), \
+ (long)((RBASIC(a)->flags >> RARRAY_EMBED_LEN_SHIFT) & \
+ (RARRAY_EMBED_LEN_MASK >> RARRAY_EMBED_LEN_SHIFT)))
+
+#define ARY_OWNS_HEAP_P(a) (!FL_TEST((a), ELTS_SHARED|RARRAY_EMBED_FLAG))
+#define FL_SET_EMBED(a) do { \
+ assert(!ARY_SHARED_P(a)); \
+ assert(!OBJ_FROZEN(a)); \
+ FL_SET((a), RARRAY_EMBED_FLAG); \
+} while (0)
+#define FL_UNSET_EMBED(ary) FL_UNSET((ary), RARRAY_EMBED_FLAG|RARRAY_EMBED_LEN_MASK)
+#define FL_SET_SHARED(ary) do { \
+ assert(!ARY_EMBED_P(ary)); \
+ FL_SET((ary), ELTS_SHARED); \
+} while (0)
+#define FL_UNSET_SHARED(ary) FL_UNSET((ary), ELTS_SHARED)
+
+#define ARY_SET_PTR(ary, p) do { \
+ assert(!ARY_EMBED_P(ary)); \
+ assert(!OBJ_FROZEN(ary)); \
+ RARRAY(ary)->as.heap.ptr = (p); \
+} while (0)
+#define ARY_SET_EMBED_LEN(ary, n) do { \
+ long tmp_n = (n); \
+ assert(ARY_EMBED_P(ary)); \
+ assert(!OBJ_FROZEN(ary)); \
+ RBASIC(ary)->flags &= ~RARRAY_EMBED_LEN_MASK; \
+ RBASIC(ary)->flags |= (tmp_n) << RARRAY_EMBED_LEN_SHIFT; \
+} while (0)
+#define ARY_SET_HEAP_LEN(ary, n) do { \
+ assert(!ARY_EMBED_P(ary)); \
+ RARRAY(ary)->as.heap.len = (n); \
+} while (0)
+#define ARY_SET_LEN(ary, n) do { \
+ if (ARY_EMBED_P(ary)) { \
+ ARY_SET_EMBED_LEN((ary), (n)); \
+ } \
+ else { \
+ ARY_SET_HEAP_LEN((ary), (n)); \
+ } \
+ assert(RARRAY_LEN(ary) == (n)); \
+} while (0)
+#define ARY_INCREASE_PTR(ary, n) do { \
+ assert(!ARY_EMBED_P(ary)); \
+ assert(!OBJ_FROZEN(ary)); \
+ RARRAY(ary)->as.heap.ptr += (n); \
+} while (0)
+#define ARY_INCREASE_LEN(ary, n) do { \
+ assert(!OBJ_FROZEN(ary)); \
+ if (ARY_EMBED_P(ary)) { \
+ ARY_SET_EMBED_LEN((ary), RARRAY_LEN(ary)+(n)); \
+ } \
+ else { \
+ RARRAY(ary)->as.heap.len += (n); \
+ } \
+} while (0)
+
+#define ARY_CAPA(ary) (ARY_EMBED_P(ary) ? RARRAY_EMBED_LEN_MAX : \
+ ARY_SHARED_ROOT_P(ary) ? RARRAY_LEN(ary) : RARRAY(ary)->as.heap.aux.capa)
+#define ARY_SET_CAPA(ary, n) do { \
+ assert(!ARY_EMBED_P(ary)); \
+ assert(!ARY_SHARED_P(ary)); \
+ assert(!OBJ_FROZEN(ary)); \
+ RARRAY(ary)->as.heap.aux.capa = (n); \
+} while (0)
+
+#define ARY_SHARED(ary) (assert(ARY_SHARED_P(ary)), RARRAY(ary)->as.heap.aux.shared)
+#define ARY_SET_SHARED(ary, value) do { \
+ assert(!ARY_EMBED_P(ary)); \
+ assert(ARY_SHARED_P(ary)); \
+ assert(ARY_SHARED_ROOT_P(value)); \
+ RARRAY(ary)->as.heap.aux.shared = (value); \
+} while (0)
+#define RARRAY_SHARED_ROOT_FLAG FL_USER5
+#define ARY_SHARED_ROOT_P(ary) (FL_TEST((ary), RARRAY_SHARED_ROOT_FLAG))
+#define ARY_SHARED_NUM(ary) \
+ (assert(ARY_SHARED_ROOT_P(ary)), RARRAY(ary)->as.heap.aux.capa)
+#define ARY_SET_SHARED_NUM(ary, value) do { \
+ assert(ARY_SHARED_ROOT_P(ary)); \
+ RARRAY(ary)->as.heap.aux.capa = (value); \
+} while (0)
+#define FL_SET_SHARED_ROOT(ary) do { \
+ assert(!ARY_EMBED_P(ary)); \
+ FL_SET((ary), RARRAY_SHARED_ROOT_FLAG); \
+} while (0)
static void
-rb_ary_modify(ary)
- VALUE ary;
+ary_resize_capa(VALUE ary, long capacity)
+{
+ assert(RARRAY_LEN(ary) <= capacity);
+ assert(!OBJ_FROZEN(ary));
+ assert(!ARY_SHARED_P(ary));
+ if (capacity > RARRAY_EMBED_LEN_MAX) {
+ if (ARY_EMBED_P(ary)) {
+ long len = ARY_EMBED_LEN(ary);
+ VALUE *ptr = ALLOC_N(VALUE, (capacity));
+ MEMCPY(ptr, ARY_EMBED_PTR(ary), VALUE, len);
+ FL_UNSET_EMBED(ary);
+ ARY_SET_PTR(ary, ptr);
+ ARY_SET_HEAP_LEN(ary, len);
+ }
+ else {
+ REALLOC_N(RARRAY(ary)->as.heap.ptr, VALUE, (capacity));
+ }
+ ARY_SET_CAPA(ary, (capacity));
+ }
+ else {
+ if (!ARY_EMBED_P(ary)) {
+ long len = RARRAY_LEN(ary);
+ VALUE *ptr = RARRAY_PTR(ary);
+ if (len > capacity) len = capacity;
+ MEMCPY(RARRAY(ary)->as.ary, ptr, VALUE, len);
+ FL_SET_EMBED(ary);
+ ARY_SET_LEN(ary, len);
+ xfree(ptr);
+ }
+ }
+}
+
+static void
+ary_double_capa(VALUE ary, long min)
+{
+ long new_capa = ARY_CAPA(ary) / 2;
+
+ if (new_capa < ARY_DEFAULT_SIZE) {
+ new_capa = ARY_DEFAULT_SIZE;
+ }
+ if (new_capa >= ARY_MAX_SIZE - min) {
+ new_capa = (ARY_MAX_SIZE - min) / 2;
+ }
+ new_capa += min;
+ ary_resize_capa(ary, new_capa);
+}
+
+static void
+rb_ary_decrement_share(VALUE shared)
+{
+ if (shared) {
+ long num = ARY_SHARED_NUM(shared) - 1;
+ if (num == 0) {
+ rb_ary_free(shared);
+ rb_gc_force_recycle(shared);
+ }
+ else if (num > 0) {
+ ARY_SET_SHARED_NUM(shared, num);
+ }
+ }
+}
+
+static void
+rb_ary_unshare(VALUE ary)
+{
+ VALUE shared = RARRAY(ary)->as.heap.aux.shared;
+ rb_ary_decrement_share(shared);
+ FL_UNSET_SHARED(ary);
+}
+
+static inline void
+rb_ary_unshare_safe(VALUE ary)
+{
+ if (ARY_SHARED_P(ary) && !ARY_EMBED_P(ary)) {
+ rb_ary_unshare(ary);
+ }
+}
+
+static VALUE
+rb_ary_increment_share(VALUE shared)
{
- if (OBJ_FROZEN(ary)) rb_error_frozen("array");
- if (FL_TEST(ary, ARY_TMPLOCK))
- rb_raise(rb_eTypeError, "can't modify array during sort");
- if (!OBJ_TAINTED(ary) && rb_safe_level() >= 4)
+ long num = ARY_SHARED_NUM(shared);
+ if (num >= 0) {
+ ARY_SET_SHARED_NUM(shared, num + 1);
+ }
+ return shared;
+}
+
+static void
+rb_ary_set_shared(VALUE ary, VALUE shared)
+{
+ rb_ary_increment_share(shared);
+ FL_SET_SHARED(ary);
+ ARY_SET_SHARED(ary, shared);
+}
+
+static inline void
+rb_ary_modify_check(VALUE ary)
+{
+ rb_check_frozen(ary);
+ if (!OBJ_UNTRUSTED(ary) && rb_safe_level() >= 4)
rb_raise(rb_eSecurityError, "Insecure: can't modify array");
}
+void
+rb_ary_modify(VALUE ary)
+{
+ rb_ary_modify_check(ary);
+ if (ARY_SHARED_P(ary)) {
+ long len = RARRAY_LEN(ary);
+ if (len <= RARRAY_EMBED_LEN_MAX) {
+ VALUE *ptr = ARY_HEAP_PTR(ary);
+ VALUE shared = ARY_SHARED(ary);
+ FL_UNSET_SHARED(ary);
+ FL_SET_EMBED(ary);
+ MEMCPY(ARY_EMBED_PTR(ary), ptr, VALUE, len);
+ rb_ary_decrement_share(shared);
+ ARY_SET_EMBED_LEN(ary, len);
+ }
+ else {
+ VALUE *ptr = ALLOC_N(VALUE, len);
+ MEMCPY(ptr, RARRAY_PTR(ary), VALUE, len);
+ rb_ary_unshare(ary);
+ ARY_SET_CAPA(ary, len);
+ ARY_SET_PTR(ary, ptr);
+ }
+ }
+}
+
+/*
+ * call-seq:
+ * ary.freeze -> ary
+ *
+ * Calls Object#freeze on +ary+ to prevent any further
+ * modification. A RuntimeError will be raised if a modification
+ * attempt is made.
+ *
+ */
+
VALUE
-rb_ary_freeze(ary)
- VALUE ary;
+rb_ary_freeze(VALUE ary)
{
return rb_obj_freeze(ary);
}
+/*
+ * call-seq:
+ * ary.frozen? -> true or false
+ *
+ * Return +true+ if this array is frozen (or temporarily frozen
+ * while being sorted). See also Object#frozen?
+ */
+
static VALUE
-rb_ary_frozen_p(ary)
- VALUE ary;
+rb_ary_frozen_p(VALUE ary)
{
- if (FL_TEST(ary, FL_FREEZE|ARY_TMPLOCK))
- return Qtrue;
+ if (OBJ_FROZEN(ary)) return Qtrue;
return Qfalse;
}
-VALUE
-rb_ary_new2(len)
- long len;
+static VALUE
+ary_alloc(VALUE klass)
{
- NEWOBJ(ary, struct RArray);
- OBJSETUP(ary, rb_cArray, T_ARRAY);
+ NEWOBJ_OF(ary, struct RArray, klass, T_ARRAY);
+ FL_SET_EMBED((VALUE)ary);
+ ARY_SET_EMBED_LEN((VALUE)ary, 0);
- if (len < 0) {
+ return (VALUE)ary;
+}
+
+static VALUE
+ary_new(VALUE klass, long capa)
+{
+ VALUE ary;
+
+ if (capa < 0) {
rb_raise(rb_eArgError, "negative array size (or size too big)");
}
- if (len > 0 && len*sizeof(VALUE) <= 0) {
+ if (capa > ARY_MAX_SIZE) {
rb_raise(rb_eArgError, "array size too big");
}
- ary->len = 0;
- ary->capa = len;
- ary->ptr = 0;
- if (len == 0) len++;
- ary->ptr = ALLOC_N(VALUE, len);
+ ary = ary_alloc(klass);
+ if (capa > RARRAY_EMBED_LEN_MAX) {
+ FL_UNSET_EMBED(ary);
+ ARY_SET_PTR(ary, ALLOC_N(VALUE, capa));
+ ARY_SET_CAPA(ary, capa);
+ ARY_SET_HEAP_LEN(ary, 0);
+ }
- return (VALUE)ary;
+ return ary;
+}
+
+VALUE
+rb_ary_new2(long capa)
+{
+ return ary_new(rb_cArray, capa);
}
+
VALUE
-rb_ary_new()
+rb_ary_new(void)
{
- return rb_ary_new2(ARY_DEFAULT_SIZE);
+ return rb_ary_new2(RARRAY_EMBED_LEN_MAX);
}
-#ifdef HAVE_STDARG_PROTOTYPES
#include <stdarg.h>
-#define va_init_list(a,b) va_start(a,b)
-#else
-#include <varargs.h>
-#define va_init_list(a,b) va_start(a)
-#endif
VALUE
-#ifdef HAVE_STDARG_PROTOTYPES
rb_ary_new3(long n, ...)
-#else
-rb_ary_new3(n, va_alist)
- long n;
- va_dcl
-#endif
{
va_list ar;
VALUE ary;
long i;
- if (n < 0) {
- rb_raise(rb_eIndexError, "negative number of items(%d)", n);
- }
- ary = rb_ary_new2(n<ARY_DEFAULT_SIZE?ARY_DEFAULT_SIZE:n);
+ ary = rb_ary_new2(n);
- va_init_list(ar, n);
+ va_start(ar, n);
for (i=0; i<n; i++) {
- RARRAY(ary)->ptr[i] = va_arg(ar, VALUE);
+ RARRAY_PTR(ary)[i] = va_arg(ar, VALUE);
}
va_end(ar);
- RARRAY(ary)->len = n;
+ ARY_SET_LEN(ary, n);
return ary;
}
VALUE
-rb_ary_new4(n, elts)
- long n;
- VALUE *elts;
+rb_ary_new4(long n, const VALUE *elts)
{
VALUE ary;
ary = rb_ary_new2(n);
- if (elts) {
- MEMCPY(RARRAY(ary)->ptr, elts, VALUE, n);
+ if (n > 0 && elts) {
+ MEMCPY(RARRAY_PTR(ary), elts, VALUE, n);
+ ARY_SET_LEN(ary, n);
}
- RARRAY(ary)->len = n;
return ary;
}
VALUE
-rb_assoc_new(car, cdr)
- VALUE car, cdr;
+rb_ary_tmp_new(long capa)
{
- VALUE ary;
+ return ary_new(0, capa);
+}
- ary = rb_ary_new2(2);
- RARRAY(ary)->ptr[0] = car;
- RARRAY(ary)->ptr[1] = cdr;
- RARRAY(ary)->len = 2;
+void
+rb_ary_free(VALUE ary)
+{
+ if (ARY_OWNS_HEAP_P(ary)) {
+ xfree(ARY_HEAP_PTR(ary));
+ }
+}
- return ary;
+RUBY_FUNC_EXPORTED size_t
+rb_ary_memsize(VALUE ary)
+{
+ if (ARY_OWNS_HEAP_P(ary)) {
+ return RARRAY(ary)->as.heap.aux.capa * sizeof(VALUE);
+ }
+ else {
+ return 0;
+ }
+}
+
+static inline void
+ary_discard(VALUE ary)
+{
+ rb_ary_free(ary);
+ RBASIC(ary)->flags |= RARRAY_EMBED_FLAG;
+ RBASIC(ary)->flags &= ~RARRAY_EMBED_LEN_MASK;
}
static VALUE
-rb_ary_s_new(argc, argv, klass)
- int argc;
- VALUE *argv;
- VALUE klass;
+ary_make_shared(VALUE ary)
{
- VALUE ary = rb_ary_new();
- OBJSETUP(ary, klass, T_ARRAY);
- rb_obj_call_init(ary, argc, argv);
+ assert(!ARY_EMBED_P(ary));
+ if (ARY_SHARED_P(ary)) {
+ return ARY_SHARED(ary);
+ }
+ else if (ARY_SHARED_ROOT_P(ary)) {
+ return ary;
+ }
+ else if (OBJ_FROZEN(ary)) {
+ ary_resize_capa(ary, ARY_HEAP_LEN(ary));
+ FL_SET_SHARED_ROOT(ary);
+ ARY_SET_SHARED_NUM(ary, 1);
+ return ary;
+ }
+ else {
+ NEWOBJ_OF(shared, struct RArray, 0, T_ARRAY);
+ FL_UNSET_EMBED(shared);
+
+ ARY_SET_LEN((VALUE)shared, RARRAY_LEN(ary));
+ ARY_SET_PTR((VALUE)shared, RARRAY_PTR(ary));
+ FL_SET_SHARED_ROOT(shared);
+ ARY_SET_SHARED_NUM((VALUE)shared, 1);
+ FL_SET_SHARED(ary);
+ ARY_SET_SHARED(ary, (VALUE)shared);
+ OBJ_FREEZE(shared);
+ return (VALUE)shared;
+ }
+}
- return ary;
+
+static VALUE
+ary_make_substitution(VALUE ary)
+{
+ if (RARRAY_LEN(ary) <= RARRAY_EMBED_LEN_MAX) {
+ VALUE subst = rb_ary_new2(RARRAY_LEN(ary));
+ MEMCPY(ARY_EMBED_PTR(subst), RARRAY_PTR(ary), VALUE, RARRAY_LEN(ary));
+ ARY_SET_EMBED_LEN(subst, RARRAY_LEN(ary));
+ return subst;
+ }
+ else {
+ return rb_ary_increment_share(ary_make_shared(ary));
+ }
+}
+
+VALUE
+rb_assoc_new(VALUE car, VALUE cdr)
+{
+ return rb_ary_new3(2, car, cdr);
}
static VALUE
-rb_ary_initialize(argc, argv, ary)
- int argc;
- VALUE *argv;
- VALUE ary;
+to_ary(VALUE ary)
+{
+ return rb_convert_type(ary, T_ARRAY, "Array", "to_ary");
+}
+
+VALUE
+rb_check_array_type(VALUE ary)
+{
+ return rb_check_convert_type(ary, T_ARRAY, "Array", "to_ary");
+}
+
+/*
+ * call-seq:
+ * Array.try_convert(obj) -> array or nil
+ *
+ * Tries to convert +obj+ into an array, using +to_ary+ method. Returns the
+ * converted array or +nil+ if +obj+ cannot be converted for any reason.
+ * This method can be used to check if an argument is an array.
+ *
+ * Array.try_convert([1]) #=> [1]
+ * Array.try_convert("1") #=> nil
+ *
+ * if tmp = Array.try_convert(arg)
+ * # the argument is an array
+ * elsif tmp = String.try_convert(arg)
+ * # the argument is a string
+ * end
+ *
+ */
+
+static VALUE
+rb_ary_s_try_convert(VALUE dummy, VALUE ary)
+{
+ return rb_check_array_type(ary);
+}
+
+/*
+ * call-seq:
+ * Array.new(size=0, obj=nil)
+ * Array.new(array)
+ * Array.new(size) {|index| block }
+ *
+ * Returns a new array.
+ *
+ * In the first form, if no arguments are sent, the new array will be empty.
+ * When a +size+ and an optional +obj+ are sent, an array is created with
+ * +size+ copies of +obj+. Take notice that all elements will reference the
+ * same object +obj+.
+ *
+ * The second form creates a copy of the array passed as a parameter (the
+ * array is generated by calling to_ary on the parameter).
+ *
+ * first_array = ["Matz", "Guido"]
+ *
+ * second_array = Array.new(first_array) #=> ["Matz", "Guido"]
+ *
+ * first_array.equal? second_array #=> false
+ *
+ * In the last form, an array of the given size is created. Each element in
+ * this array is created by passing the element's index to the given block
+ * and storing the return value.
+ *
+ * Array.new(3){ |index| index ** 2 }
+ * # => [0, 1, 4]
+ *
+ * == Common gotchas
+ *
+ * When sending the second parameter, the same object will be used as the
+ * value for all the array elements:
+ *
+ * a = Array.new(2, Hash.new)
+ * # => [{}, {}]
+ *
+ * a[0]['cat'] = 'feline'
+ * a # => [{"cat"=>"feline"}, {"cat"=>"feline"}]
+ *
+ * a[1]['cat'] = 'Felix'
+ * a # => [{"cat"=>"Felix"}, {"cat"=>"Felix"}]
+ *
+ * Since all the Array elements store the same hash, changes to one of them
+ * will affect them all.
+ *
+ * If multiple copies are what you want, you should use the block
+ * version which uses the result of that block each time an element
+ * of the array needs to be initialized:
+ *
+ * a = Array.new(2) { Hash.new }
+ * a[0]['cat'] = 'feline'
+ * a # => [{"cat"=>"feline"}, {}]
+ *
+ */
+
+static VALUE
+rb_ary_initialize(int argc, VALUE *argv, VALUE ary)
{
long len;
VALUE size, val;
- if (rb_scan_args(argc, argv, "02", &size, &val) == 0) {
+ rb_ary_modify(ary);
+ if (argc == 0) {
+ if (ARY_OWNS_HEAP_P(ary) && RARRAY_PTR(ary)) {
+ xfree(RARRAY_PTR(ary));
+ }
+ rb_ary_unshare_safe(ary);
+ FL_SET_EMBED(ary);
+ ARY_SET_EMBED_LEN(ary, 0);
+ if (rb_block_given_p()) {
+ rb_warning("given block not used");
+ }
return ary;
}
+ rb_scan_args(argc, argv, "02", &size, &val);
+ if (argc == 1 && !FIXNUM_P(size)) {
+ val = rb_check_array_type(size);
+ if (!NIL_P(val)) {
+ rb_ary_replace(ary, val);
+ return ary;
+ }
+ }
- rb_ary_modify(ary);
len = NUM2LONG(size);
if (len < 0) {
rb_raise(rb_eArgError, "negative array size");
}
- if (len > 0 && len*sizeof(VALUE) <= 0) {
+ if (len > ARY_MAX_SIZE) {
rb_raise(rb_eArgError, "array size too big");
}
- if (len > RARRAY(ary)->capa) {
- RARRAY(ary)->capa = len;
- REALLOC_N(RARRAY(ary)->ptr, VALUE, RARRAY(ary)->capa);
- }
- memfill(RARRAY(ary)->ptr, len, val);
- RARRAY(ary)->len = len;
+ rb_ary_modify(ary);
+ ary_resize_capa(ary, len);
+ if (rb_block_given_p()) {
+ long i;
+ if (argc == 2) {
+ rb_warn("block supersedes default value argument");
+ }
+ for (i=0; i<len; i++) {
+ rb_ary_store(ary, i, rb_yield(LONG2NUM(i)));
+ ARY_SET_LEN(ary, i + 1);
+ }
+ }
+ else {
+ memfill(RARRAY_PTR(ary), len, val);
+ ARY_SET_LEN(ary, len);
+ }
return ary;
}
+/*
+ * Returns a new array populated with the given objects.
+ *
+ * Array.[]( 1, 'a', /^A/ ) # => [1, "a", /^A/]
+ * Array[ 1, 'a', /^A/ ] # => [1, "a", /^A/]
+ * [ 1, 'a', /^A/ ] # => [1, "a", /^A/]
+ */
+
static VALUE
-rb_ary_s_create(argc, argv, klass)
- int argc;
- VALUE *argv;
- VALUE klass;
+rb_ary_s_create(int argc, VALUE *argv, VALUE klass)
{
- NEWOBJ(ary, struct RArray);
- OBJSETUP(ary, klass, T_ARRAY);
-
- ary->len = ary->capa = 0;
- if (argc == 0) {
- ary->ptr = 0;
- }
- else {
- ary->ptr = ALLOC_N(VALUE, argc);
- MEMCPY(ary->ptr, argv, VALUE, argc);
+ VALUE ary = ary_new(klass, argc);
+ if (argc > 0 && argv) {
+ MEMCPY(RARRAY_PTR(ary), argv, VALUE, argc);
+ ARY_SET_LEN(ary, argc);
}
- ary->len = ary->capa = argc;
- return (VALUE)ary;
+ return ary;
}
void
-rb_ary_store(ary, idx, val)
- VALUE ary;
- long idx;
- VALUE val;
+rb_ary_store(VALUE ary, long idx, VALUE val)
{
- rb_ary_modify(ary);
if (idx < 0) {
- idx += RARRAY(ary)->len;
+ idx += RARRAY_LEN(ary);
if (idx < 0) {
- rb_raise(rb_eIndexError, "index %d out of array",
- idx - RARRAY(ary)->len);
+ rb_raise(rb_eIndexError, "index %ld too small for array; minimum: %ld",
+ idx - RARRAY_LEN(ary), -RARRAY_LEN(ary));
}
}
+ else if (idx >= ARY_MAX_SIZE) {
+ rb_raise(rb_eIndexError, "index %ld too big", idx);
+ }
- if (idx >= RARRAY(ary)->capa) {
- long capa_inc = RARRAY(ary)->capa / 2;
- if (capa_inc < ARY_DEFAULT_SIZE) {
- capa_inc = ARY_DEFAULT_SIZE;
- }
- RARRAY(ary)->capa = idx + capa_inc;
- REALLOC_N(RARRAY(ary)->ptr, VALUE, RARRAY(ary)->capa);
+ rb_ary_modify(ary);
+ if (idx >= ARY_CAPA(ary)) {
+ ary_double_capa(ary, idx);
}
- if (idx > RARRAY(ary)->len) {
- rb_mem_clear(RARRAY(ary)->ptr+RARRAY(ary)->len,
- idx-RARRAY(ary)->len+1);
+ if (idx > RARRAY_LEN(ary)) {
+ rb_mem_clear(RARRAY_PTR(ary) + RARRAY_LEN(ary),
+ idx-RARRAY_LEN(ary) + 1);
}
- if (idx >= RARRAY(ary)->len) {
- RARRAY(ary)->len = idx + 1;
+ if (idx >= RARRAY_LEN(ary)) {
+ ARY_SET_LEN(ary, idx + 1);
}
- RARRAY(ary)->ptr[idx] = val;
+ RARRAY_PTR(ary)[idx] = val;
}
-VALUE
-rb_ary_push(ary, item)
- VALUE ary;
- VALUE item;
+static VALUE
+ary_make_partial(VALUE ary, VALUE klass, long offset, long len)
{
- rb_ary_store(ary, RARRAY(ary)->len, item);
- return ary;
+ assert(offset >= 0);
+ assert(len >= 0);
+ assert(offset+len <= RARRAY_LEN(ary));
+
+ if (len <= RARRAY_EMBED_LEN_MAX) {
+ VALUE result = ary_alloc(klass);
+ MEMCPY(ARY_EMBED_PTR(result), RARRAY_PTR(ary) + offset, VALUE, len);
+ ARY_SET_EMBED_LEN(result, len);
+ return result;
+ }
+ else {
+ VALUE shared, result = ary_alloc(klass);
+ FL_UNSET_EMBED(result);
+
+ shared = ary_make_shared(ary);
+ ARY_SET_PTR(result, RARRAY_PTR(ary));
+ ARY_SET_LEN(result, RARRAY_LEN(ary));
+ rb_ary_set_shared(result, shared);
+
+ ARY_INCREASE_PTR(result, offset);
+ ARY_SET_LEN(result, len);
+ return result;
+ }
}
static VALUE
-rb_ary_push_m(argc, argv, ary)
- int argc;
- VALUE *argv;
- VALUE ary;
+ary_make_shared_copy(VALUE ary)
{
- if (argc == 0) {
- rb_raise(rb_eArgError, "wrong # of arguments(at least 1)");
- }
- if (argc > 0) {
- long len = RARRAY(ary)->len;
+ return ary_make_partial(ary, rb_obj_class(ary), 0, RARRAY_LEN(ary));
+}
- --argc;
- /* make rooms by copying the last item */
- rb_ary_store(ary, len + argc, argv[argc]);
+enum ary_take_pos_flags
+{
+ ARY_TAKE_FIRST = 0,
+ ARY_TAKE_LAST = 1
+};
- if (argc) { /* if any rest */
- MEMCPY(RARRAY(ary)->ptr + len, argv, VALUE, argc);
- }
+static VALUE
+ary_take_first_or_last(int argc, VALUE *argv, VALUE ary, enum ary_take_pos_flags last)
+{
+ VALUE nv;
+ long n;
+ long offset = 0;
+
+ rb_scan_args(argc, argv, "1", &nv);
+ n = NUM2LONG(nv);
+ if (n > RARRAY_LEN(ary)) {
+ n = RARRAY_LEN(ary);
}
- return ary;
+ else if (n < 0) {
+ rb_raise(rb_eArgError, "negative array size");
+ }
+ if (last) {
+ offset = RARRAY_LEN(ary) - n;
+ }
+ return ary_make_partial(ary, rb_cArray, offset, n);
}
+static VALUE rb_ary_push_1(VALUE ary, VALUE item);
+
+/*
+ * call-seq:
+ * ary << obj -> ary
+ *
+ * Append---Pushes the given object on to the end of this array. This
+ * expression returns the array itself, so several appends
+ * may be chained together.
+ *
+ * [ 1, 2 ] << "c" << "d" << [ 3, 4 ]
+ * #=> [ 1, 2, "c", "d", [ 3, 4 ] ]
+ *
+ */
+
VALUE
-rb_ary_pop(ary)
- VALUE ary;
+rb_ary_push(VALUE ary, VALUE item)
{
rb_ary_modify(ary);
- if (RARRAY(ary)->len == 0) return Qnil;
- if (RARRAY(ary)->len * 10 < RARRAY(ary)->capa && RARRAY(ary)->capa > ARY_DEFAULT_SIZE) {
- RARRAY(ary)->capa = RARRAY(ary)->len * 2;
- REALLOC_N(RARRAY(ary)->ptr, VALUE, RARRAY(ary)->capa);
+ return rb_ary_push_1(ary, item);
+}
+
+static VALUE
+rb_ary_push_1(VALUE ary, VALUE item)
+{
+ long idx = RARRAY_LEN(ary);
+
+ if (idx >= ARY_CAPA(ary)) {
+ ary_double_capa(ary, idx);
}
- return RARRAY(ary)->ptr[--RARRAY(ary)->len];
+ RARRAY_PTR(ary)[idx] = item;
+ ARY_SET_LEN(ary, idx + 1);
+ return ary;
}
VALUE
-rb_ary_shift(ary)
- VALUE ary;
+rb_ary_cat(VALUE ary, const VALUE *ptr, long len)
{
- VALUE top;
+ long oldlen;
rb_ary_modify(ary);
- if (RARRAY(ary)->len == 0) return Qnil;
+ oldlen = RARRAY_LEN(ary);
+ ary_resize_capa(ary, oldlen + len);
+ MEMCPY(RARRAY_PTR(ary) + oldlen, ptr, VALUE, len);
+ ARY_SET_LEN(ary, oldlen + len);
+ return ary;
+}
- top = RARRAY(ary)->ptr[0];
- RARRAY(ary)->len--;
+/*
+ * call-seq:
+ * ary.push(obj, ... ) -> ary
+ *
+ * Append --- Pushes the given object(s) on to the end of this array. This
+ * expression returns the array itself, so several appends
+ * may be chained together. See also Array#pop for the opposite
+ * effect.
+ *
+ * a = [ "a", "b", "c" ]
+ * a.push("d", "e", "f")
+ * #=> ["a", "b", "c", "d", "e", "f"]
+ * [1, 2, 3,].push(4).push(5)
+ * #=> [1, 2, 3, 4, 5]
+ */
- /* sliding items */
- MEMMOVE(RARRAY(ary)->ptr, RARRAY(ary)->ptr+1, VALUE, RARRAY(ary)->len);
- if (RARRAY(ary)->len * 10 < RARRAY(ary)->capa && RARRAY(ary)->capa > ARY_DEFAULT_SIZE) {
- RARRAY(ary)->capa = RARRAY(ary)->len * 2;
- REALLOC_N(RARRAY(ary)->ptr, VALUE, RARRAY(ary)->capa);
+static VALUE
+rb_ary_push_m(int argc, VALUE *argv, VALUE ary)
+{
+ return rb_ary_cat(ary, argv, argc);
+}
+
+VALUE
+rb_ary_pop(VALUE ary)
+{
+ long n;
+ rb_ary_modify_check(ary);
+ if (RARRAY_LEN(ary) == 0) return Qnil;
+ if (ARY_OWNS_HEAP_P(ary) &&
+ RARRAY_LEN(ary) * 3 < ARY_CAPA(ary) &&
+ ARY_CAPA(ary) > ARY_DEFAULT_SIZE)
+ {
+ ary_resize_capa(ary, RARRAY_LEN(ary) * 2);
}
+ n = RARRAY_LEN(ary)-1;
+ ARY_SET_LEN(ary, n);
+ return RARRAY_PTR(ary)[n];
+}
- return top;
+/*
+ * call-seq:
+ * ary.pop -> obj or nil
+ * ary.pop(n) -> new_ary
+ *
+ * Removes the last element from +self+ and returns it, or
+ * +nil+ if the array is empty.
+ *
+ * If a number +n+ is given, returns an array of the last +n+ elements
+ * (or less) just like <code>array.slice!(-n, n)</code> does. See also
+ * Array#push for the opposite effect.
+ *
+ * a = [ "a", "b", "c", "d" ]
+ * a.pop #=> "d"
+ * a.pop(2) #=> ["b", "c"]
+ * a #=> ["a"]
+ */
+
+static VALUE
+rb_ary_pop_m(int argc, VALUE *argv, VALUE ary)
+{
+ VALUE result;
+
+ if (argc == 0) {
+ return rb_ary_pop(ary);
+ }
+
+ rb_ary_modify_check(ary);
+ result = ary_take_first_or_last(argc, argv, ary, ARY_TAKE_LAST);
+ ARY_INCREASE_LEN(ary, -RARRAY_LEN(result));
+ return result;
}
VALUE
-rb_ary_unshift(ary, item)
- VALUE ary, item;
+rb_ary_shift(VALUE ary)
{
- rb_ary_modify(ary);
- if (RARRAY(ary)->len >= RARRAY(ary)->capa) {
- long capa_inc = RARRAY(ary)->capa / 2;
- if (capa_inc < ARY_DEFAULT_SIZE) {
- capa_inc = ARY_DEFAULT_SIZE;
- }
- RARRAY(ary)->capa+=capa_inc;
- REALLOC_N(RARRAY(ary)->ptr, VALUE, RARRAY(ary)->capa);
- }
+ VALUE top;
- /* sliding items */
- MEMMOVE(RARRAY(ary)->ptr+1, RARRAY(ary)->ptr, VALUE, RARRAY(ary)->len);
+ rb_ary_modify_check(ary);
+ if (RARRAY_LEN(ary) == 0) return Qnil;
+ top = RARRAY_PTR(ary)[0];
+ if (!ARY_SHARED_P(ary)) {
+ if (RARRAY_LEN(ary) < ARY_DEFAULT_SIZE) {
+ MEMMOVE(RARRAY_PTR(ary), RARRAY_PTR(ary)+1, VALUE, RARRAY_LEN(ary)-1);
+ ARY_INCREASE_LEN(ary, -1);
+ return top;
+ }
+ assert(!ARY_EMBED_P(ary)); /* ARY_EMBED_LEN_MAX < ARY_DEFAULT_SIZE */
- RARRAY(ary)->len++;
- RARRAY(ary)->ptr[0] = item;
+ RARRAY_PTR(ary)[0] = Qnil;
+ ary_make_shared(ary);
+ }
+ else if (ARY_SHARED_NUM(ARY_SHARED(ary)) == 1) {
+ RARRAY_PTR(ary)[0] = Qnil;
+ }
+ ARY_INCREASE_PTR(ary, 1); /* shift ptr */
+ ARY_INCREASE_LEN(ary, -1);
- return ary;
+ return top;
}
+/*
+ * call-seq:
+ * ary.shift -> obj or nil
+ * ary.shift(n) -> new_ary
+ *
+ * Removes the first element of +self+ and returns it (shifting all
+ * other elements down by one). Returns +nil+ if the array
+ * is empty.
+ *
+ * If a number +n+ is given, returns an array of the first +n+ elements
+ * (or less) just like <code>array.slice!(0, n)</code> does. With +ary+
+ * containing only the remainder elements, not including what was shifted to
+ * +new_ary+. See also Array#unshift for the opposite effect.
+ *
+ * args = [ "-m", "-q", "filename" ]
+ * args.shift #=> "-m"
+ * args #=> ["-q", "filename"]
+ *
+ * args = [ "-m", "-q", "filename" ]
+ * args.shift(2) #=> ["-m", "-q"]
+ * args #=> ["filename"]
+ */
+
static VALUE
-rb_ary_unshift_m(argc, argv, ary)
- int argc;
- VALUE *argv;
- VALUE ary;
+rb_ary_shift_m(int argc, VALUE *argv, VALUE ary)
{
+ VALUE result;
+ long n;
+
if (argc == 0) {
- rb_raise(rb_eArgError, "wrong # of arguments(at least 1)");
+ return rb_ary_shift(ary);
}
- if (argc > 0) {
- long len = RARRAY(ary)->len;
- /* make rooms by setting the last item */
- rb_ary_store(ary, len + argc - 1, Qnil);
+ rb_ary_modify_check(ary);
+ result = ary_take_first_or_last(argc, argv, ary, ARY_TAKE_FIRST);
+ n = RARRAY_LEN(result);
+ if (ARY_SHARED_P(ary)) {
+ if (ARY_SHARED_NUM(ARY_SHARED(ary)) == 1) {
+ rb_mem_clear(RARRAY_PTR(ary), n);
+ }
+ ARY_INCREASE_PTR(ary, n);
+ }
+ else {
+ MEMMOVE(RARRAY_PTR(ary), RARRAY_PTR(ary)+n, VALUE, RARRAY_LEN(ary)-n);
+ }
+ ARY_INCREASE_LEN(ary, -n);
- /* sliding items */
- MEMMOVE(RARRAY(ary)->ptr + argc, RARRAY(ary)->ptr, VALUE, len);
- MEMCPY(RARRAY(ary)->ptr, argv, VALUE, argc);
+ return result;
+}
+
+/*
+ * call-seq:
+ * ary.unshift(obj, ...) -> ary
+ *
+ * Prepends objects to the front of +self+, moving other elements upwards.
+ * See also Array#shift for the opposite effect.
+ *
+ * a = [ "b", "c", "d" ]
+ * a.unshift("a") #=> ["a", "b", "c", "d"]
+ * a.unshift(1, 2) #=> [ 1, 2, "a", "b", "c", "d"]
+ */
+
+static VALUE
+rb_ary_unshift_m(int argc, VALUE *argv, VALUE ary)
+{
+ long len;
+
+ rb_ary_modify(ary);
+ if (argc == 0) return ary;
+ if (ARY_CAPA(ary) <= (len = RARRAY_LEN(ary)) + argc) {
+ ary_double_capa(ary, len + argc);
}
+
+ /* sliding items */
+ MEMMOVE(RARRAY_PTR(ary) + argc, RARRAY_PTR(ary), VALUE, len);
+ MEMCPY(RARRAY_PTR(ary), argv, VALUE, argc);
+ ARY_INCREASE_LEN(ary, argc);
+
return ary;
}
VALUE
-rb_ary_entry(ary, offset)
- VALUE ary;
- long offset;
+rb_ary_unshift(VALUE ary, VALUE item)
{
- if (RARRAY(ary)->len == 0) return Qnil;
+ return rb_ary_unshift_m(1,&item,ary);
+}
- if (offset < 0) {
- offset = RARRAY(ary)->len + offset;
- }
- if (offset < 0 || RARRAY(ary)->len <= offset) {
+/* faster version - use this if you don't need to treat negative offset */
+static inline VALUE
+rb_ary_elt(VALUE ary, long offset)
+{
+ if (RARRAY_LEN(ary) == 0) return Qnil;
+ if (offset < 0 || RARRAY_LEN(ary) <= offset) {
return Qnil;
}
+ return RARRAY_PTR(ary)[offset];
+}
- return RARRAY(ary)->ptr[offset];
+VALUE
+rb_ary_entry(VALUE ary, long offset)
+{
+ if (offset < 0) {
+ offset += RARRAY_LEN(ary);
+ }
+ return rb_ary_elt(ary, offset);
}
-static VALUE
-rb_ary_subseq(ary, beg, len)
- VALUE ary;
- long beg, len;
+VALUE
+rb_ary_subseq(VALUE ary, long beg, long len)
{
- VALUE ary2;
+ VALUE klass;
- if (beg > RARRAY(ary)->len) return Qnil;
+ if (beg > RARRAY_LEN(ary)) return Qnil;
if (beg < 0 || len < 0) return Qnil;
- if (beg + len > RARRAY(ary)->len) {
- len = RARRAY(ary)->len - beg;
+ if (RARRAY_LEN(ary) < len || RARRAY_LEN(ary) < beg + len) {
+ len = RARRAY_LEN(ary) - beg;
}
- if (len < 0) {
- len = 0;
- }
- if (len == 0) return rb_ary_new2(0);
-
- ary2 = rb_ary_new2(len);
- MEMCPY(RARRAY(ary2)->ptr, RARRAY(ary)->ptr+beg, VALUE, len);
- RARRAY(ary2)->len = len;
+ klass = rb_obj_class(ary);
+ if (len == 0) return ary_new(klass, 0);
- return ary2;
+ return ary_make_partial(ary, klass, beg, len);
}
+/*
+ * call-seq:
+ * ary[index] -> obj or nil
+ * ary[start, length] -> new_ary or nil
+ * ary[range] -> new_ary or nil
+ * ary.slice(index) -> obj or nil
+ * ary.slice(start, length) -> new_ary or nil
+ * ary.slice(range) -> new_ary or nil
+ *
+ * Element Reference --- Returns the element at +index+, or returns a
+ * subarray starting at the +start+ index and continuing for +length+
+ * elements, or returns a subarray specified by +range+ of indices.
+ *
+ * Negative indices count backward from the end of the array (-1 is the last
+ * element). For +start+ and +range+ cases the starting index is just before
+ * an element. Additionally, an empty array is returned when the starting
+ * index for an element range is at the end of the array.
+ *
+ * Returns +nil+ if the index (or starting index) are out of range.
+ *
+ * a = [ "a", "b", "c", "d", "e" ]
+ * a[2] + a[0] + a[1] #=> "cab"
+ * a[6] #=> nil
+ * a[1, 2] #=> [ "b", "c" ]
+ * a[1..3] #=> [ "b", "c", "d" ]
+ * a[4..7] #=> [ "e" ]
+ * a[6..10] #=> nil
+ * a[-3, 3] #=> [ "c", "d", "e" ]
+ * # special cases
+ * a[5] #=> nil
+ * a[6, 1] #=> nil
+ * a[5, 1] #=> []
+ * a[5..10] #=> []
+ *
+ */
+
VALUE
-rb_ary_aref(argc, argv, ary)
- int argc;
- VALUE *argv;
- VALUE ary;
+rb_ary_aref(int argc, VALUE *argv, VALUE ary)
{
- VALUE arg1, arg2;
+ VALUE arg;
long beg, len;
- if (rb_scan_args(argc, argv, "11", &arg1, &arg2) == 2) {
- beg = NUM2LONG(arg1);
- len = NUM2LONG(arg2);
+ if (argc == 2) {
+ beg = NUM2LONG(argv[0]);
+ len = NUM2LONG(argv[1]);
if (beg < 0) {
- beg = RARRAY(ary)->len + beg;
+ beg += RARRAY_LEN(ary);
}
return rb_ary_subseq(ary, beg, len);
}
-
- /* special case - speeding up */
- if (FIXNUM_P(arg1)) {
- return rb_ary_entry(ary, FIX2LONG(arg1));
+ if (argc != 1) {
+ rb_scan_args(argc, argv, "11", 0, 0);
}
- else if (TYPE(arg1) == T_BIGNUM) {
- rb_raise(rb_eIndexError, "index too big");
+ arg = argv[0];
+ /* special case - speeding up */
+ if (FIXNUM_P(arg)) {
+ return rb_ary_entry(ary, FIX2LONG(arg));
}
- else {
- /* check if idx is Range */
- switch (rb_range_beg_len(arg1, &beg, &len, RARRAY(ary)->len, 0)) {
- case Qfalse:
- break;
- case Qnil:
- return Qnil;
- default:
- return rb_ary_subseq(ary, beg, len);
- }
+ /* check if idx is Range */
+ switch (rb_range_beg_len(arg, &beg, &len, RARRAY_LEN(ary), 0)) {
+ case Qfalse:
+ break;
+ case Qnil:
+ return Qnil;
+ default:
+ return rb_ary_subseq(ary, beg, len);
}
- return rb_ary_entry(ary, NUM2LONG(arg1));
+ return rb_ary_entry(ary, NUM2LONG(arg));
}
+/*
+ * call-seq:
+ * ary.at(index) -> obj or nil
+ *
+ * Returns the element at +index+. A negative index counts from the end of
+ * +self+. Returns +nil+ if the index is out of range. See also
+ * Array#[].
+ *
+ * a = [ "a", "b", "c", "d", "e" ]
+ * a.at(0) #=> "a"
+ * a.at(-1) #=> "e"
+ */
+
static VALUE
-rb_ary_at(ary, pos)
- VALUE ary, pos;
+rb_ary_at(VALUE ary, VALUE pos)
{
return rb_ary_entry(ary, NUM2LONG(pos));
}
+/*
+ * call-seq:
+ * ary.first -> obj or nil
+ * ary.first(n) -> new_ary
+ *
+ * Returns the first element, or the first +n+ elements, of the array.
+ * If the array is empty, the first form returns +nil+, and the
+ * second form returns an empty array. See also Array#last for
+ * the opposite effect.
+ *
+ * a = [ "q", "r", "s", "t" ]
+ * a.first #=> "q"
+ * a.first(2) #=> ["q", "r"]
+ */
+
static VALUE
-rb_ary_first(ary)
- VALUE ary;
+rb_ary_first(int argc, VALUE *argv, VALUE ary)
+{
+ if (argc == 0) {
+ if (RARRAY_LEN(ary) == 0) return Qnil;
+ return RARRAY_PTR(ary)[0];
+ }
+ else {
+ return ary_take_first_or_last(argc, argv, ary, ARY_TAKE_FIRST);
+ }
+}
+
+/*
+ * call-seq:
+ * ary.last -> obj or nil
+ * ary.last(n) -> new_ary
+ *
+ * Returns the last element(s) of +self+. If the array is empty,
+ * the first form returns +nil+.
+ *
+ * See also Array#first for the opposite effect.
+ *
+ * a = [ "w", "x", "y", "z" ]
+ * a.last #=> "z"
+ * a.last(2) #=> ["y", "z"]
+ */
+
+VALUE
+rb_ary_last(int argc, VALUE *argv, VALUE ary)
{
- if (RARRAY(ary)->len == 0) return Qnil;
- return RARRAY(ary)->ptr[0];
+ if (argc == 0) {
+ if (RARRAY_LEN(ary) == 0) return Qnil;
+ return RARRAY_PTR(ary)[RARRAY_LEN(ary)-1];
+ }
+ else {
+ return ary_take_first_or_last(argc, argv, ary, ARY_TAKE_LAST);
+ }
}
+/*
+ * call-seq:
+ * ary.fetch(index) -> obj
+ * ary.fetch(index, default) -> obj
+ * ary.fetch(index) { |index| block } -> obj
+ *
+ * Tries to return the element at position +index+, but throws an IndexError
+ * exception if the referenced +index+ lies outside of the array bounds. This
+ * error can be prevented by supplying a second argument, which will act as a
+ * +default+ value.
+ *
+ * Alternatively, if a block is given it will only be executed when an
+ * invalid +index+ is referenced. Negative values of +index+ count from the
+ * end of the array.
+ *
+ * a = [ 11, 22, 33, 44 ]
+ * a.fetch(1) #=> 22
+ * a.fetch(-1) #=> 44
+ * a.fetch(4, 'cat') #=> "cat"
+ * a.fetch(100) { |i| puts "#{i} is out of bounds" }
+ * #=> "100 is out of bounds"
+ */
+
static VALUE
-rb_ary_last(ary)
- VALUE ary;
+rb_ary_fetch(int argc, VALUE *argv, VALUE ary)
{
- if (RARRAY(ary)->len == 0) return Qnil;
- return RARRAY(ary)->ptr[RARRAY(ary)->len-1];
+ VALUE pos, ifnone;
+ long block_given;
+ long idx;
+
+ rb_scan_args(argc, argv, "11", &pos, &ifnone);
+ block_given = rb_block_given_p();
+ if (block_given && argc == 2) {
+ rb_warn("block supersedes default value argument");
+ }
+ idx = NUM2LONG(pos);
+
+ if (idx < 0) {
+ idx += RARRAY_LEN(ary);
+ }
+ if (idx < 0 || RARRAY_LEN(ary) <= idx) {
+ if (block_given) return rb_yield(pos);
+ if (argc == 1) {
+ rb_raise(rb_eIndexError, "index %ld outside of array bounds: %ld...%ld",
+ idx - (idx < 0 ? RARRAY_LEN(ary) : 0), -RARRAY_LEN(ary), RARRAY_LEN(ary));
+ }
+ return ifnone;
+ }
+ return RARRAY_PTR(ary)[idx];
}
+/*
+ * call-seq:
+ * ary.index(obj) -> int or nil
+ * ary.index { |item| block } -> int or nil
+ * ary.index -> Enumerator
+ *
+ * Returns the _index_ of the first object in +ary+ such that the object is
+ * <code>==</code> to +obj+.
+ *
+ * If a block is given instead of an argument, returns the _index_ of first
+ * the object for which the block returns +true+. Returns +nil+ if no match
+ * is found.
+ *
+ * See also Array#rindex.
+ *
+ * An Enumerator is returned if neither a block nor argument is given.
+ *
+ * a = [ "a", "b", "c" ]
+ * a.index("b") #=> 1
+ * a.index("z") #=> nil
+ * a.index { |x| x == "b" } #=> 1
+ *
+ * This is an alias of Array#find_index.
+ */
+
static VALUE
-rb_ary_index(ary, val)
- VALUE ary;
- VALUE val;
+rb_ary_index(int argc, VALUE *argv, VALUE ary)
{
+ VALUE val;
long i;
- for (i=0; i<RARRAY(ary)->len; i++) {
- if (rb_equal(RARRAY(ary)->ptr[i], val))
- return INT2NUM(i);
+ if (argc == 0) {
+ RETURN_ENUMERATOR(ary, 0, 0);
+ for (i=0; i<RARRAY_LEN(ary); i++) {
+ if (RTEST(rb_yield(RARRAY_PTR(ary)[i]))) {
+ return LONG2NUM(i);
+ }
+ }
+ return Qnil;
+ }
+ rb_scan_args(argc, argv, "1", &val);
+ if (rb_block_given_p())
+ rb_warn("given block not used");
+ for (i=0; i<RARRAY_LEN(ary); i++) {
+ if (rb_equal(RARRAY_PTR(ary)[i], val))
+ return LONG2NUM(i);
}
return Qnil;
}
+/*
+ * call-seq:
+ * ary.rindex(obj) -> int or nil
+ * ary.rindex { |item| block } -> int or nil
+ * ary.rindex -> Enumerator
+ *
+ * Returns the _index_ of the last object in +self+ <code>==</code> to +obj+.
+ *
+ * If a block is given instead of an argument, returns _index_ of first object
+ * for which block returns +true+, starting from the last object.
+ *
+ * Returns +nil+ if no match is found.
+ *
+ * See also Array#index.
+ *
+ * If neither block nor argument is given, an Enumerator is returned instead.
+ *
+ * a = [ "a", "b", "b", "b", "c" ]
+ * a.rindex("b") #=> 3
+ * a.rindex("z") #=> nil
+ * a.rindex { |x| x == "b" } #=> 3
+ */
+
static VALUE
-rb_ary_rindex(ary, val)
- VALUE ary;
- VALUE val;
+rb_ary_rindex(int argc, VALUE *argv, VALUE ary)
{
- long i = RARRAY(ary)->len;
+ VALUE val;
+ long i = RARRAY_LEN(ary);
+ if (argc == 0) {
+ RETURN_ENUMERATOR(ary, 0, 0);
+ while (i--) {
+ if (RTEST(rb_yield(RARRAY_PTR(ary)[i])))
+ return LONG2NUM(i);
+ if (i > RARRAY_LEN(ary)) {
+ i = RARRAY_LEN(ary);
+ }
+ }
+ return Qnil;
+ }
+ rb_scan_args(argc, argv, "1", &val);
+ if (rb_block_given_p())
+ rb_warn("given block not used");
while (i--) {
- if (rb_equal(RARRAY(ary)->ptr[i], val))
- return INT2NUM(i);
+ if (rb_equal(RARRAY_PTR(ary)[i], val))
+ return LONG2NUM(i);
+ if (i > RARRAY_LEN(ary)) {
+ i = RARRAY_LEN(ary);
+ }
}
return Qnil;
}
-static VALUE
-rb_ary_indexes(argc, argv, ary)
- int argc;
- VALUE *argv;
- VALUE ary;
+VALUE
+rb_ary_to_ary(VALUE obj)
{
- VALUE new_ary;
- long i;
+ VALUE tmp = rb_check_array_type(obj);
- new_ary = rb_ary_new2(argc);
- for (i=0; i<argc; i++) {
- rb_ary_push(new_ary, rb_ary_aref(1, argv+i, ary));
- }
-
- return new_ary;
+ if (!NIL_P(tmp)) return tmp;
+ return rb_ary_new3(1, obj);
}
static void
-rb_ary_replace(ary, beg, len, rpl)
- VALUE ary, rpl;
- long beg, len;
+rb_ary_splice(VALUE ary, long beg, long len, VALUE rpl)
{
long rlen;
- if (len < 0) rb_raise(rb_eIndexError, "negative length %d", len);
+ if (len < 0) rb_raise(rb_eIndexError, "negative length (%ld)", len);
if (beg < 0) {
- beg += RARRAY(ary)->len;
- }
- if (beg < 0) {
- beg -= RARRAY(ary)->len;
- rb_raise(rb_eIndexError, "index %d out of array", beg);
+ beg += RARRAY_LEN(ary);
+ if (beg < 0) {
+ rb_raise(rb_eIndexError, "index %ld too small for array; minimum: %ld",
+ beg - RARRAY_LEN(ary), -RARRAY_LEN(ary));
+ }
}
- if (beg + len > RARRAY(ary)->len) {
- len = RARRAY(ary)->len - beg;
+ if (RARRAY_LEN(ary) < len || RARRAY_LEN(ary) < beg + len) {
+ len = RARRAY_LEN(ary) - beg;
}
- if (NIL_P(rpl)) {
- rpl = rb_ary_new2(0);
+ if (rpl == Qundef) {
+ rlen = 0;
}
- else if (TYPE(rpl) != T_ARRAY) {
- rpl = rb_ary_new3(1, rpl);
+ else {
+ rpl = rb_ary_to_ary(rpl);
+ rlen = RARRAY_LEN(rpl);
}
- rlen = RARRAY(rpl)->len;
-
rb_ary_modify(ary);
- if (beg >= RARRAY(ary)->len) {
+ if (beg >= RARRAY_LEN(ary)) {
+ if (beg > ARY_MAX_SIZE - rlen) {
+ rb_raise(rb_eIndexError, "index %ld too big", beg);
+ }
len = beg + rlen;
- if (len >= RARRAY(ary)->capa) {
- RARRAY(ary)->capa=len;
- REALLOC_N(RARRAY(ary)->ptr, VALUE, RARRAY(ary)->capa);
+ if (len >= ARY_CAPA(ary)) {
+ ary_double_capa(ary, len);
+ }
+ rb_mem_clear(RARRAY_PTR(ary) + RARRAY_LEN(ary), beg - RARRAY_LEN(ary));
+ if (rlen > 0) {
+ MEMCPY(RARRAY_PTR(ary) + beg, RARRAY_PTR(rpl), VALUE, rlen);
}
- rb_mem_clear(RARRAY(ary)->ptr+RARRAY(ary)->len, beg-RARRAY(ary)->len);
- MEMCPY(RARRAY(ary)->ptr+beg, RARRAY(rpl)->ptr, VALUE, rlen);
- RARRAY(ary)->len = len;
+ ARY_SET_LEN(ary, len);
}
else {
long alen;
- if (beg + len > RARRAY(ary)->len) {
- len = RARRAY(ary)->len - beg;
+ alen = RARRAY_LEN(ary) + rlen - len;
+ if (alen >= ARY_CAPA(ary)) {
+ ary_double_capa(ary, alen);
}
- alen = RARRAY(ary)->len + rlen - len;
- if (alen >= RARRAY(ary)->capa) {
- RARRAY(ary)->capa=alen;
- REALLOC_N(RARRAY(ary)->ptr, VALUE, RARRAY(ary)->capa);
+ if (len != rlen) {
+ MEMMOVE(RARRAY_PTR(ary) + beg + rlen, RARRAY_PTR(ary) + beg + len,
+ VALUE, RARRAY_LEN(ary) - (beg + len));
+ ARY_SET_LEN(ary, alen);
}
+ if (rlen > 0) {
+ MEMMOVE(RARRAY_PTR(ary) + beg, RARRAY_PTR(rpl), VALUE, rlen);
+ }
+ }
+}
+
+void
+rb_ary_set_len(VALUE ary, long len)
+{
+ long capa;
+
+ rb_ary_modify_check(ary);
+ if (ARY_SHARED_P(ary)) {
+ rb_raise(rb_eRuntimeError, "can't set length of shared ");
+ }
+ if (len > (capa = (long)ARY_CAPA(ary))) {
+ rb_bug("probable buffer overflow: %ld for %ld", len, capa);
+ }
+ ARY_SET_LEN(ary, len);
+}
- if (len != RARRAY(rpl)->len) {
- MEMMOVE(RARRAY(ary)->ptr+beg+rlen, RARRAY(ary)->ptr+beg+len,
- VALUE, RARRAY(ary)->len-(beg+len));
- RARRAY(ary)->len = alen;
+/*!
+ * expands or shrinks \a ary to \a len elements.
+ * expanded region will be filled with Qnil.
+ * \param ary an array
+ * \param len new size
+ * \return \a ary
+ * \post the size of \a ary is \a len.
+ */
+VALUE
+rb_ary_resize(VALUE ary, long len)
+{
+ long olen;
+
+ rb_ary_modify(ary);
+ olen = RARRAY_LEN(ary);
+ if (len == olen) return ary;
+ if (len > ARY_MAX_SIZE) {
+ rb_raise(rb_eIndexError, "index %ld too big", len);
+ }
+ if (len > olen) {
+ if (len >= ARY_CAPA(ary)) {
+ ary_double_capa(ary, len);
+ }
+ rb_mem_clear(RARRAY_PTR(ary) + olen, len - olen);
+ ARY_SET_LEN(ary, len);
+ }
+ else if (ARY_EMBED_P(ary)) {
+ ARY_SET_EMBED_LEN(ary, len);
+ }
+ else if (len <= RARRAY_EMBED_LEN_MAX) {
+ VALUE tmp[RARRAY_EMBED_LEN_MAX];
+ MEMCPY(tmp, ARY_HEAP_PTR(ary), VALUE, len);
+ ary_discard(ary);
+ MEMCPY(ARY_EMBED_PTR(ary), tmp, VALUE, len);
+ ARY_SET_EMBED_LEN(ary, len);
+ }
+ else {
+ if (olen > len + ARY_DEFAULT_SIZE) {
+ REALLOC_N(RARRAY(ary)->as.heap.ptr, VALUE, len);
+ ARY_SET_CAPA(ary, len);
}
- MEMMOVE(RARRAY(ary)->ptr+beg, RARRAY(rpl)->ptr, VALUE, rlen);
+ ARY_SET_HEAP_LEN(ary, len);
}
+ return ary;
}
+/*
+ * call-seq:
+ * ary[index] = obj -> obj
+ * ary[start, length] = obj or other_ary or nil -> obj or other_ary or nil
+ * ary[range] = obj or other_ary or nil -> obj or other_ary or nil
+ *
+ * Element Assignment --- Sets the element at +index+, or replaces a subarray
+ * from the +start+ index for +length+ elements, or replaces a subarray
+ * specified by the +range+ of indices.
+ *
+ * If indices are greater than the current capacity of the array, the array
+ * grows automatically. Elements are inserted into the array at +start+ if
+ * +length+ is zero.
+ *
+ * Negative indices will count backward from the end of the array. For
+ * +start+ and +range+ cases the starting index is just before an element.
+ *
+ * An IndexError is raised if a negative index points past the beginning of
+ * the array.
+ *
+ * See also Array#push, and Array#unshift.
+ *
+ * a = Array.new
+ * a[4] = "4"; #=> [nil, nil, nil, nil, "4"]
+ * a[0, 3] = [ 'a', 'b', 'c' ] #=> ["a", "b", "c", nil, "4"]
+ * a[1..2] = [ 1, 2 ] #=> ["a", 1, 2, nil, "4"]
+ * a[0, 2] = "?" #=> ["?", 2, nil, "4"]
+ * a[0..2] = "A" #=> ["A", "4"]
+ * a[-1] = "Z" #=> ["A", "Z"]
+ * a[1..-1] = nil #=> ["A", nil]
+ * a[1..-1] = [] #=> ["A"]
+ * a[0, 0] = [ 1, 2 ] #=> [1, 2, "A"]
+ * a[3, 0] = "B" #=> [1, 2, "A", "B"]
+ */
+
static VALUE
-rb_ary_aset(argc, argv, ary)
- int argc;
- VALUE *argv;
- VALUE ary;
+rb_ary_aset(int argc, VALUE *argv, VALUE ary)
{
long offset, beg, len;
if (argc == 3) {
- rb_ary_replace(ary, NUM2LONG(argv[0]), NUM2LONG(argv[1]), argv[2]);
+ rb_ary_modify_check(ary);
+ beg = NUM2LONG(argv[0]);
+ len = NUM2LONG(argv[1]);
+ rb_ary_splice(ary, beg, len, argv[2]);
return argv[2];
}
- if (argc != 2) {
- rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)", argc);
- }
+ rb_check_arity(argc, 2, 2);
+ rb_ary_modify_check(ary);
if (FIXNUM_P(argv[0])) {
offset = FIX2LONG(argv[0]);
goto fixnum;
}
- else if (rb_range_beg_len(argv[0], &beg, &len, RARRAY(ary)->len, 1)) {
+ if (rb_range_beg_len(argv[0], &beg, &len, RARRAY_LEN(ary), 1)) {
/* check if idx is Range */
- rb_ary_replace(ary, beg, len, argv[1]);
+ rb_ary_splice(ary, beg, len, argv[1]);
return argv[1];
}
- if (TYPE(argv[0]) == T_BIGNUM) {
- rb_raise(rb_eIndexError, "index too big");
- }
offset = NUM2LONG(argv[0]);
- fixnum:
+fixnum:
rb_ary_store(ary, offset, argv[1]);
return argv[1];
}
+/*
+ * call-seq:
+ * ary.insert(index, obj...) -> ary
+ *
+ * Inserts the given values before the element with the given +index+.
+ *
+ * Negative indices count backwards from the end of the array, where +-1+ is
+ * the last element.
+ *
+ * a = %w{ a b c d }
+ * a.insert(2, 99) #=> ["a", "b", 99, "c", "d"]
+ * a.insert(-2, 1, 2, 3) #=> ["a", "b", 99, "c", 1, 2, 3, "d"]
+ */
+
+static VALUE
+rb_ary_insert(int argc, VALUE *argv, VALUE ary)
+{
+ long pos;
+
+ rb_check_arity(argc, 1, UNLIMITED_ARGUMENTS);
+ rb_ary_modify_check(ary);
+ if (argc == 1) return ary;
+ pos = NUM2LONG(argv[0]);
+ if (pos == -1) {
+ pos = RARRAY_LEN(ary);
+ }
+ if (pos < 0) {
+ pos++;
+ }
+ rb_ary_splice(ary, pos, 0, rb_ary_new4(argc - 1, argv + 1));
+ return ary;
+}
+
+/*
+ * call-seq:
+ * ary.each { |item| block } -> ary
+ * ary.each -> Enumerator
+ *
+ * Calls the given block once for each element in +self+, passing that element
+ * as a parameter.
+ *
+ * An Enumerator is returned if no block is given.
+ *
+ * a = [ "a", "b", "c" ]
+ * a.each {|x| print x, " -- " }
+ *
+ * produces:
+ *
+ * a -- b -- c --
+ */
+
VALUE
-rb_ary_each(ary)
- VALUE ary;
+rb_ary_each(VALUE array)
{
long i;
+ volatile VALUE ary = array;
- for (i=0; i<RARRAY(ary)->len; i++) {
- rb_yield(RARRAY(ary)->ptr[i]);
+ RETURN_ENUMERATOR(ary, 0, 0);
+ for (i=0; i<RARRAY_LEN(ary); i++) {
+ rb_yield(RARRAY_PTR(ary)[i]);
}
return ary;
}
+/*
+ * call-seq:
+ * ary.each_index { |index| block } -> ary
+ * ary.each_index -> Enumerator
+ *
+ * Same as Array#each, but passes the +index+ of the element instead of the
+ * element itself.
+ *
+ * An Enumerator is returned if no block is given.
+ *
+ * a = [ "a", "b", "c" ]
+ * a.each_index {|x| print x, " -- " }
+ *
+ * produces:
+ *
+ * 0 -- 1 -- 2 --
+ */
+
static VALUE
-rb_ary_each_index(ary)
- VALUE ary;
+rb_ary_each_index(VALUE ary)
{
long i;
+ RETURN_ENUMERATOR(ary, 0, 0);
- for (i=0; i<RARRAY(ary)->len; i++) {
- rb_yield(INT2NUM(i));
+ for (i=0; i<RARRAY_LEN(ary); i++) {
+ rb_yield(LONG2NUM(i));
}
return ary;
}
+/*
+ * call-seq:
+ * ary.reverse_each { |item| block } -> ary
+ * ary.reverse_each -> Enumerator
+ *
+ * Same as Array#each, but traverses +self+ in reverse order.
+ *
+ * a = [ "a", "b", "c" ]
+ * a.reverse_each {|x| print x, " " }
+ *
+ * produces:
+ *
+ * c b a
+ */
+
static VALUE
-rb_ary_reverse_each(ary)
- VALUE ary;
+rb_ary_reverse_each(VALUE ary)
{
- long len = RARRAY(ary)->len;
+ long len;
+ RETURN_ENUMERATOR(ary, 0, 0);
+ len = RARRAY_LEN(ary);
while (len--) {
- rb_yield(RARRAY(ary)->ptr[len]);
+ rb_yield(RARRAY_PTR(ary)[len]);
+ if (RARRAY_LEN(ary) < len) {
+ len = RARRAY_LEN(ary);
+ }
}
return ary;
}
+/*
+ * call-seq:
+ * ary.length -> int
+ *
+ * Returns the number of elements in +self+. May be zero.
+ *
+ * [ 1, 2, 3, 4, 5 ].length #=> 5
+ * [].length #=> 0
+ */
+
static VALUE
-rb_ary_length(ary)
- VALUE ary;
+rb_ary_length(VALUE ary)
{
- return INT2NUM(RARRAY(ary)->len);
+ long len = RARRAY_LEN(ary);
+ return LONG2NUM(len);
}
+/*
+ * call-seq:
+ * ary.empty? -> true or false
+ *
+ * Returns +true+ if +self+ contains no elements.
+ *
+ * [].empty? #=> true
+ */
+
static VALUE
-rb_ary_empty_p(ary)
- VALUE ary;
+rb_ary_empty_p(VALUE ary)
{
- if (RARRAY(ary)->len == 0)
+ if (RARRAY_LEN(ary) == 0)
return Qtrue;
return Qfalse;
}
-static VALUE
-rb_ary_clone(ary)
- VALUE ary;
+VALUE
+rb_ary_dup(VALUE ary)
{
- VALUE clone = rb_ary_new2(RARRAY(ary)->len);
-
- CLONESETUP(clone, ary);
- MEMCPY(RARRAY(clone)->ptr, RARRAY(ary)->ptr, VALUE, RARRAY(ary)->len);
- RARRAY(clone)->len = RARRAY(ary)->len;
- return clone;
+ VALUE dup = rb_ary_new2(RARRAY_LEN(ary));
+ MEMCPY(RARRAY_PTR(dup), RARRAY_PTR(ary), VALUE, RARRAY_LEN(ary));
+ ARY_SET_LEN(dup, RARRAY_LEN(ary));
+ return dup;
}
-static VALUE
-to_ary(ary)
- VALUE ary;
+VALUE
+rb_ary_resurrect(VALUE ary)
{
- return rb_convert_type(ary, T_ARRAY, "Array", "to_ary");
+ return rb_ary_new4(RARRAY_LEN(ary), RARRAY_PTR(ary));
}
extern VALUE rb_output_fs;
+static void ary_join_1(VALUE obj, VALUE ary, VALUE sep, long i, VALUE result, int *first);
+
static VALUE
-inspect_join(ary, arg)
- VALUE ary;
- VALUE *arg;
+recursive_join(VALUE obj, VALUE argp, int recur)
{
- return rb_ary_join(arg[0], arg[1]);
+ VALUE *arg = (VALUE *)argp;
+ VALUE ary = arg[0];
+ VALUE sep = arg[1];
+ VALUE result = arg[2];
+ int *first = (int *)arg[3];
+
+ if (recur) {
+ rb_raise(rb_eArgError, "recursive array join");
+ }
+ else {
+ ary_join_1(obj, ary, sep, 0, result, first);
+ }
+ return Qnil;
}
-VALUE
-rb_ary_join(ary, sep)
- VALUE ary, sep;
+static void
+ary_join_0(VALUE ary, VALUE sep, long max, VALUE result)
{
long i;
- int taint = 0;
- VALUE result, tmp;
-
- if (RARRAY(ary)->len == 0) return rb_str_new(0, 0);
- if (OBJ_TAINTED(ary)) taint = 1;
- if (OBJ_TAINTED(sep)) taint = 1;
-
- tmp = RARRAY(ary)->ptr[0];
- if (OBJ_TAINTED(tmp)) taint = 1;
- switch (TYPE(tmp)) {
- case T_STRING:
- result = rb_str_dup(tmp);
- break;
- case T_ARRAY:
- if (rb_inspecting_p(tmp)) {
- result = rb_str_new2("[...]");
- }
- else {
- VALUE args[2];
+ VALUE val;
- args[0] = tmp;
- args[1] = sep;
- result = rb_protect_inspect(inspect_join, ary, (VALUE)args);
- }
- break;
- default:
- result = rb_str_dup(rb_obj_as_string(tmp));
- break;
+ if (max > 0) rb_enc_copy(result, RARRAY_PTR(ary)[0]);
+ for (i=0; i<max; i++) {
+ val = RARRAY_PTR(ary)[i];
+ if (i > 0 && !NIL_P(sep))
+ rb_str_buf_append(result, sep);
+ rb_str_buf_append(result, val);
+ if (OBJ_TAINTED(val)) OBJ_TAINT(result);
+ if (OBJ_UNTRUSTED(val)) OBJ_TAINT(result);
}
+}
- for (i=1; i<RARRAY(ary)->len; i++) {
- tmp = RARRAY(ary)->ptr[i];
- switch (TYPE(tmp)) {
+static void
+ary_join_1(VALUE obj, VALUE ary, VALUE sep, long i, VALUE result, int *first)
+{
+ VALUE val, tmp;
+
+ for (; i<RARRAY_LEN(ary); i++) {
+ if (i > 0 && !NIL_P(sep))
+ rb_str_buf_append(result, sep);
+
+ val = RARRAY_PTR(ary)[i];
+ switch (TYPE(val)) {
case T_STRING:
+ str_join:
+ rb_str_buf_append(result, val);
+ *first = FALSE;
break;
case T_ARRAY:
- if (rb_inspecting_p(tmp)) {
- tmp = rb_str_new2("[...]");
+ obj = val;
+ ary_join:
+ if (val == ary) {
+ rb_raise(rb_eArgError, "recursive array join");
}
else {
- VALUE args[2];
+ VALUE args[4];
- args[0] = tmp;
+ args[0] = val;
args[1] = sep;
- tmp = rb_protect_inspect(inspect_join, ary, (VALUE)args);
+ args[2] = result;
+ args[3] = (VALUE)first;
+ rb_exec_recursive(recursive_join, obj, (VALUE)args);
}
break;
default:
- tmp = rb_obj_as_string(tmp);
+ tmp = rb_check_string_type(val);
+ if (!NIL_P(tmp)) {
+ val = tmp;
+ goto str_join;
+ }
+ tmp = rb_check_convert_type(val, T_ARRAY, "Array", "to_ary");
+ if (!NIL_P(tmp)) {
+ obj = val;
+ val = tmp;
+ goto ary_join;
+ }
+ val = rb_obj_as_string(val);
+ if (*first) {
+ rb_enc_copy(result, val);
+ *first = FALSE;
+ }
+ goto str_join;
}
- if (!NIL_P(sep)) rb_str_append(result, sep);
- rb_str_append(result, tmp);
- if (OBJ_TAINTED(tmp)) taint = 1;
}
+}
+VALUE
+rb_ary_join(VALUE ary, VALUE sep)
+{
+ long len = 1, i;
+ int taint = FALSE;
+ int untrust = FALSE;
+ VALUE val, tmp, result;
+
+ if (RARRAY_LEN(ary) == 0) return rb_usascii_str_new(0, 0);
+ if (OBJ_TAINTED(ary)) taint = TRUE;
+ if (OBJ_UNTRUSTED(ary)) untrust = TRUE;
+
+ if (!NIL_P(sep)) {
+ StringValue(sep);
+ len += RSTRING_LEN(sep) * (RARRAY_LEN(ary) - 1);
+ }
+ for (i=0; i<RARRAY_LEN(ary); i++) {
+ val = RARRAY_PTR(ary)[i];
+ tmp = rb_check_string_type(val);
+
+ if (NIL_P(tmp) || tmp != val) {
+ int first;
+ result = rb_str_buf_new(len + (RARRAY_LEN(ary)-i)*10);
+ rb_enc_associate(result, rb_usascii_encoding());
+ if (taint) OBJ_TAINT(result);
+ if (untrust) OBJ_UNTRUST(result);
+ ary_join_0(ary, sep, i, result);
+ first = i == 0;
+ ary_join_1(ary, ary, sep, i, result, &first);
+ return result;
+ }
+
+ len += RSTRING_LEN(tmp);
+ }
+
+ result = rb_str_buf_new(len);
if (taint) OBJ_TAINT(result);
+ if (untrust) OBJ_UNTRUST(result);
+ ary_join_0(ary, sep, RARRAY_LEN(ary), result);
+
return result;
}
+/*
+ * call-seq:
+ * ary.join(separator=$,) -> str
+ *
+ * Returns a string created by converting each element of the array to
+ * a string, separated by the given +separator+.
+ * If the +separator+ is +nil+, it uses current $,.
+ * If both the +separator+ and $, are nil, it uses empty string.
+ *
+ * [ "a", "b", "c" ].join #=> "abc"
+ * [ "a", "b", "c" ].join("-") #=> "a-b-c"
+ */
+
static VALUE
-rb_ary_join_m(argc, argv, ary)
- int argc;
- VALUE *argv;
- VALUE ary;
+rb_ary_join_m(int argc, VALUE *argv, VALUE ary)
{
VALUE sep;
rb_scan_args(argc, argv, "01", &sep);
if (NIL_P(sep)) sep = rb_output_fs;
+
return rb_ary_join(ary, sep);
}
-VALUE
-rb_ary_to_s(ary)
- VALUE ary;
+static VALUE
+inspect_ary(VALUE ary, VALUE dummy, int recur)
{
- VALUE str;
+ int tainted = OBJ_TAINTED(ary);
+ int untrust = OBJ_UNTRUSTED(ary);
+ long i;
+ VALUE s, str;
- if (RARRAY(ary)->len == 0) return rb_str_new(0, 0);
- str = rb_ary_join(ary, rb_output_fs);
- if (NIL_P(str)) return rb_str_new(0, 0);
+ if (recur) return rb_usascii_str_new_cstr("[...]");
+ str = rb_str_buf_new2("[");
+ for (i=0; i<RARRAY_LEN(ary); i++) {
+ s = rb_inspect(RARRAY_PTR(ary)[i]);
+ if (OBJ_TAINTED(s)) tainted = TRUE;
+ if (OBJ_UNTRUSTED(s)) untrust = TRUE;
+ if (i > 0) rb_str_buf_cat2(str, ", ");
+ else rb_enc_copy(str, s);
+ rb_str_buf_append(str, s);
+ }
+ rb_str_buf_cat2(str, "]");
+ if (tainted) OBJ_TAINT(str);
+ if (untrust) OBJ_UNTRUST(str);
return str;
}
-static ID inspect_key;
+/*
+ * call-seq:
+ * ary.inspect -> string
+ * ary.to_s -> string
+ *
+ * Creates a string representation of +self+.
+ *
+ * [ "a", "b", "c" ].to_s #=> "[\"a\", \"b\", \"c\"]"
+ */
-struct inspect_arg {
- VALUE (*func)();
- VALUE arg1, arg2;
-};
+static VALUE
+rb_ary_inspect(VALUE ary)
+{
+ if (RARRAY_LEN(ary) == 0) return rb_usascii_str_new2("[]");
+ return rb_exec_recursive(inspect_ary, ary, 0);
+}
VALUE
-inspect_call(arg)
- struct inspect_arg *arg;
+rb_ary_to_s(VALUE ary)
{
- return (*arg->func)(arg->arg1, arg->arg2);
+ return rb_ary_inspect(ary);
}
+/*
+ * call-seq:
+ * ary.to_a -> ary
+ *
+ * Returns +self+.
+ *
+ * If called on a subclass of Array, converts the receiver to an Array object.
+ */
+
static VALUE
-inspect_ensure(obj)
- VALUE obj;
+rb_ary_to_a(VALUE ary)
{
- VALUE inspect_tbl;
-
- inspect_tbl = rb_thread_local_aref(rb_thread_current(), inspect_key);
- rb_ary_pop(inspect_tbl);
- return 0;
+ if (rb_obj_class(ary) != rb_cArray) {
+ VALUE dup = rb_ary_new2(RARRAY_LEN(ary));
+ rb_ary_replace(dup, ary);
+ return dup;
+ }
+ return ary;
}
-VALUE
-rb_protect_inspect(func, obj, arg)
- VALUE (*func)();
- VALUE obj, arg;
+/*
+ * call-seq:
+ * ary.to_ary -> ary
+ *
+ * Returns +self+.
+ */
+
+static VALUE
+rb_ary_to_ary_m(VALUE ary)
{
- struct inspect_arg iarg;
- VALUE inspect_tbl;
- VALUE id;
+ return ary;
+}
- if (!inspect_key) {
- inspect_key = rb_intern("__inspect_key__");
- }
- inspect_tbl = rb_thread_local_aref(rb_thread_current(), inspect_key);
- if (NIL_P(inspect_tbl)) {
- inspect_tbl = rb_ary_new();
- rb_thread_local_aset(rb_thread_current(), inspect_key, inspect_tbl);
- }
- id = rb_obj_id(obj);
- if (rb_ary_includes(inspect_tbl, id)) {
- return (*func)(obj, arg);
+static void
+ary_reverse(VALUE *p1, VALUE *p2)
+{
+ while (p1 < p2) {
+ VALUE tmp = *p1;
+ *p1++ = *p2;
+ *p2-- = tmp;
}
- rb_ary_push(inspect_tbl, id);
- iarg.func = func;
- iarg.arg1 = obj;
- iarg.arg2 = arg;
-
- return rb_ensure(inspect_call, (VALUE)&iarg, inspect_ensure, obj);
}
VALUE
-rb_inspecting_p(obj)
- VALUE obj;
+rb_ary_reverse(VALUE ary)
{
- VALUE inspect_tbl;
+ VALUE *p1, *p2;
- if (!inspect_key) return Qfalse;
- inspect_tbl = rb_thread_local_aref(rb_thread_current(), inspect_key);
- if (NIL_P(inspect_tbl)) return Qfalse;
- return rb_ary_includes(inspect_tbl, rb_obj_id(obj));
+ rb_ary_modify(ary);
+ if (RARRAY_LEN(ary) > 1) {
+ p1 = RARRAY_PTR(ary);
+ p2 = p1 + RARRAY_LEN(ary) - 1; /* points last item */
+ ary_reverse(p1, p2);
+ }
+ return ary;
}
+/*
+ * call-seq:
+ * ary.reverse! -> ary
+ *
+ * Reverses +self+ in place.
+ *
+ * a = [ "a", "b", "c" ]
+ * a.reverse! #=> ["c", "b", "a"]
+ * a #=> ["c", "b", "a"]
+ */
+
static VALUE
-inspect_ary(ary)
- VALUE ary;
+rb_ary_reverse_bang(VALUE ary)
{
- int tainted = OBJ_TAINTED(ary);
- long i = 0;
- VALUE s, str;
-
- str = rb_str_new2("[");
-
- for (i=0; i<RARRAY(ary)->len; i++) {
- s = rb_inspect(RARRAY(ary)->ptr[i]);
- tainted = OBJ_TAINTED(s);
- if (i > 0) rb_str_cat2(str, ", ");
- rb_str_append(str, s);
- }
- rb_str_cat(str, "]", 1);
-
- if (tainted) OBJ_TAINT(str);
- return str;
+ return rb_ary_reverse(ary);
}
+/*
+ * call-seq:
+ * ary.reverse -> new_ary
+ *
+ * Returns a new array containing +self+'s elements in reverse order.
+ *
+ * [ "a", "b", "c" ].reverse #=> ["c", "b", "a"]
+ * [ 1 ].reverse #=> [1]
+ */
+
static VALUE
-rb_ary_inspect(ary)
- VALUE ary;
+rb_ary_reverse_m(VALUE ary)
{
- if (RARRAY(ary)->len == 0) return rb_str_new2("[]");
- if (rb_inspecting_p(ary)) return rb_str_new2("[...]");
- return rb_protect_inspect(inspect_ary, ary, 0);
+ long len = RARRAY_LEN(ary);
+ VALUE dup = rb_ary_new2(len);
+
+ if (len > 0) {
+ VALUE *p1 = RARRAY_PTR(ary);
+ VALUE *p2 = RARRAY_PTR(dup) + len - 1;
+ do *p2-- = *p1++; while (--len > 0);
+ }
+ ARY_SET_LEN(dup, RARRAY_LEN(ary));
+ return dup;
}
-static VALUE
-rb_ary_to_a(ary)
- VALUE ary;
+static inline long
+rotate_count(long cnt, long len)
{
- return ary;
+ return (cnt < 0) ? (len - (~cnt % len) - 1) : (cnt % len);
}
VALUE
-rb_ary_reverse(ary)
- VALUE ary;
+rb_ary_rotate(VALUE ary, long cnt)
{
- VALUE *p1, *p2;
- VALUE tmp;
-
- if (RARRAY(ary)->len <= 1) return ary;
rb_ary_modify(ary);
- p1 = RARRAY(ary)->ptr;
- p2 = p1 + RARRAY(ary)->len - 1; /* points last item */
+ if (cnt != 0) {
+ VALUE *ptr = RARRAY_PTR(ary);
+ long len = RARRAY_LEN(ary);
- while (p1 < p2) {
- tmp = *p1;
- *p1++ = *p2;
- *p2-- = tmp;
+ if (len > 0 && (cnt = rotate_count(cnt, len)) > 0) {
+ --len;
+ if (cnt < len) ary_reverse(ptr + cnt, ptr + len);
+ if (--cnt > 0) ary_reverse(ptr, ptr + cnt);
+ if (len > 0) ary_reverse(ptr, ptr + len);
+ return ary;
+ }
}
- return ary;
+ return Qnil;
}
+/*
+ * call-seq:
+ * ary.rotate!(count=1) -> ary
+ *
+ * Rotates +self+ in place so that the element at +count+ comes first, and
+ * returns +self+.
+ *
+ * If +count+ is negative then it rotates in the opposite direction, starting
+ * from the end of the array where +-1+ is the last element.
+ *
+ * a = [ "a", "b", "c", "d" ]
+ * a.rotate! #=> ["b", "c", "d", "a"]
+ * a #=> ["b", "c", "d", "a"]
+ * a.rotate!(2) #=> ["d", "a", "b", "c"]
+ * a.rotate!(-3) #=> ["a", "b", "c", "d"]
+ */
+
static VALUE
-rb_ary_reverse_bang(ary)
- VALUE ary;
+rb_ary_rotate_bang(int argc, VALUE *argv, VALUE ary)
{
- if (RARRAY(ary)->len <= 1) return Qnil;
- return rb_ary_reverse(ary);
+ long n = 1;
+
+ switch (argc) {
+ case 1: n = NUM2LONG(argv[0]);
+ case 0: break;
+ default: rb_scan_args(argc, argv, "01", NULL);
+ }
+ rb_ary_rotate(ary, n);
+ return ary;
}
+/*
+ * call-seq:
+ * ary.rotate(count=1) -> new_ary
+ *
+ * Returns new array by rotating +self+ so that the element at +count+ is the
+ * first element of the new array.
+ *
+ * If +count+ is negative then it rotates in the opposite direction, starting
+ * from the end of +self+ where +-1+ is the last element.
+ *
+ * a = [ "a", "b", "c", "d" ]
+ * a.rotate #=> ["b", "c", "d", "a"]
+ * a #=> ["a", "b", "c", "d"]
+ * a.rotate(2) #=> ["c", "d", "a", "b"]
+ * a.rotate(-3) #=> ["b", "c", "d", "a"]
+ */
+
static VALUE
-rb_ary_reverse_m(ary)
- VALUE ary;
+rb_ary_rotate_m(int argc, VALUE *argv, VALUE ary)
{
- return rb_ary_reverse(rb_obj_dup(ary));
+ VALUE rotated, *ptr, *ptr2;
+ long len, cnt = 1;
+
+ switch (argc) {
+ case 1: cnt = NUM2LONG(argv[0]);
+ case 0: break;
+ default: rb_scan_args(argc, argv, "01", NULL);
+ }
+
+ len = RARRAY_LEN(ary);
+ rotated = rb_ary_new2(len);
+ if (len > 0) {
+ cnt = rotate_count(cnt, len);
+ ptr = RARRAY_PTR(ary);
+ ptr2 = RARRAY_PTR(rotated);
+ len -= cnt;
+ MEMCPY(ptr2, ptr + cnt, VALUE, len);
+ MEMCPY(ptr2 + len, ptr, VALUE, cnt);
+ }
+ ARY_SET_LEN(rotated, RARRAY_LEN(ary));
+ return rotated;
}
-static ID cmp;
+struct ary_sort_data {
+ VALUE ary;
+ int opt_methods;
+ int opt_inited;
+};
-static int
-sort_1(a, b)
- VALUE *a, *b;
+enum {
+ sort_opt_Fixnum,
+ sort_opt_String,
+ sort_optimizable_count
+};
+
+#define STRING_P(s) (RB_TYPE_P((s), T_STRING) && CLASS_OF(s) == rb_cString)
+
+#define SORT_OPTIMIZABLE_BIT(type) (1U << TOKEN_PASTE(sort_opt_,type))
+#define SORT_OPTIMIZABLE(data, type) \
+ (((data)->opt_inited & SORT_OPTIMIZABLE_BIT(type)) ? \
+ ((data)->opt_methods & SORT_OPTIMIZABLE_BIT(type)) : \
+ (((data)->opt_inited |= SORT_OPTIMIZABLE_BIT(type)), \
+ rb_method_basic_definition_p(TOKEN_PASTE(rb_c,type), id_cmp) && \
+ ((data)->opt_methods |= SORT_OPTIMIZABLE_BIT(type))))
+
+static VALUE
+sort_reentered(VALUE ary)
{
- VALUE retval = rb_yield(rb_assoc_new(*a, *b));
- return NUM2INT(retval);
+ if (RBASIC(ary)->klass) {
+ rb_raise(rb_eRuntimeError, "sort reentered");
+ }
+ return Qnil;
}
static int
-sort_2(a, b)
- VALUE *a, *b;
+sort_1(const void *ap, const void *bp, void *dummy)
{
- VALUE retval;
+ struct ary_sort_data *data = dummy;
+ VALUE retval = sort_reentered(data->ary);
+ VALUE a = *(const VALUE *)ap, b = *(const VALUE *)bp;
+ int n;
+
+ retval = rb_yield_values(2, a, b);
+ n = rb_cmpint(retval, a, b);
+ sort_reentered(data->ary);
+ return n;
+}
- if (FIXNUM_P(*a)) {
- if (FIXNUM_P(*b)) return *a - *b;
+static int
+sort_2(const void *ap, const void *bp, void *dummy)
+{
+ struct ary_sort_data *data = dummy;
+ VALUE retval = sort_reentered(data->ary);
+ VALUE a = *(const VALUE *)ap, b = *(const VALUE *)bp;
+ int n;
+
+ if (FIXNUM_P(a) && FIXNUM_P(b) && SORT_OPTIMIZABLE(data, Fixnum)) {
+ if ((long)a > (long)b) return 1;
+ if ((long)a < (long)b) return -1;
+ return 0;
}
- else if (TYPE(*a) == T_STRING && TYPE(*b) == T_STRING) {
- return rb_str_cmp(*a, *b);
+ if (STRING_P(a) && STRING_P(b) && SORT_OPTIMIZABLE(data, String)) {
+ return rb_str_cmp(a, b);
}
- retval = rb_funcall(*a, cmp, 1, *b);
- return NUM2INT(retval);
+ retval = rb_funcall(a, id_cmp, 1, b);
+ n = rb_cmpint(retval, a, b);
+ sort_reentered(data->ary);
+
+ return n;
}
-static VALUE
-sort_internal(ary)
- VALUE ary;
+/*
+ * call-seq:
+ * ary.sort! -> ary
+ * ary.sort! { |a, b| block } -> ary
+ *
+ * Sorts +self+ in place.
+ *
+ * Comparisons for the sort will be done using the <code><=></code> operator
+ * or using an optional code block.
+ *
+ * The block must implement a comparison between +a+ and +b+, and return
+ * +-1+, when +a+ follows +b+, +0+ when +a+ and +b+ are equivalent, or ++1+
+ * if +b+ follows +a+.
+ *
+ * See also Enumerable#sort_by.
+ *
+ * a = [ "d", "a", "e", "c", "b" ]
+ * a.sort! #=> ["a", "b", "c", "d", "e"]
+ * a.sort! { |x,y| y <=> x } #=> ["e", "d", "c", "b", "a"]
+ */
+
+VALUE
+rb_ary_sort_bang(VALUE ary)
{
- qsort(RARRAY(ary)->ptr, RARRAY(ary)->len, sizeof(VALUE),
- rb_block_given_p()?sort_1:sort_2);
+ rb_ary_modify(ary);
+ assert(!ARY_SHARED_P(ary));
+ if (RARRAY_LEN(ary) > 1) {
+ VALUE tmp = ary_make_substitution(ary); /* only ary refers tmp */
+ struct ary_sort_data data;
+
+ RBASIC(tmp)->klass = 0;
+ data.ary = tmp;
+ data.opt_methods = 0;
+ data.opt_inited = 0;
+ ruby_qsort(RARRAY_PTR(tmp), RARRAY_LEN(tmp), sizeof(VALUE),
+ rb_block_given_p()?sort_1:sort_2, &data);
+
+ if (ARY_EMBED_P(tmp)) {
+ assert(ARY_EMBED_P(tmp));
+ if (ARY_SHARED_P(ary)) { /* ary might be destructively operated in the given block */
+ rb_ary_unshare(ary);
+ }
+ FL_SET_EMBED(ary);
+ MEMCPY(RARRAY_PTR(ary), ARY_EMBED_PTR(tmp), VALUE, ARY_EMBED_LEN(tmp));
+ ARY_SET_LEN(ary, ARY_EMBED_LEN(tmp));
+ }
+ else {
+ assert(!ARY_EMBED_P(tmp));
+ if (ARY_HEAP_PTR(ary) == ARY_HEAP_PTR(tmp)) {
+ assert(!ARY_EMBED_P(ary));
+ FL_UNSET_SHARED(ary);
+ ARY_SET_CAPA(ary, ARY_CAPA(tmp));
+ }
+ else {
+ assert(!ARY_SHARED_P(tmp));
+ if (ARY_EMBED_P(ary)) {
+ FL_UNSET_EMBED(ary);
+ }
+ else if (ARY_SHARED_P(ary)) {
+ /* ary might be destructively operated in the given block */
+ rb_ary_unshare(ary);
+ }
+ else {
+ xfree(ARY_HEAP_PTR(ary));
+ }
+ ARY_SET_PTR(ary, RARRAY_PTR(tmp));
+ ARY_SET_HEAP_LEN(ary, RARRAY_LEN(tmp));
+ ARY_SET_CAPA(ary, ARY_CAPA(tmp));
+ }
+ /* tmp was lost ownership for the ptr */
+ FL_UNSET(tmp, FL_FREEZE);
+ FL_SET_EMBED(tmp);
+ ARY_SET_EMBED_LEN(tmp, 0);
+ FL_SET(tmp, FL_FREEZE);
+ }
+ /* tmp will be GC'ed. */
+ RBASIC(tmp)->klass = rb_cArray;
+ }
return ary;
}
-static VALUE
-sort_unlock(ary)
- VALUE ary;
+/*
+ * call-seq:
+ * ary.sort -> new_ary
+ * ary.sort { |a, b| block } -> new_ary
+ *
+ * Returns a new array created by sorting +self+.
+ *
+ * Comparisons for the sort will be done using the <code><=></code> operator
+ * or using an optional code block.
+ *
+ * The block must implement a comparison between +a+ and +b+, and return
+ * +-1+, when +a+ follows +b+, +0+ when +a+ and +b+ are equivalent, or ++1+
+ * if +b+ follows +a+.
+ *
+ *
+ * See also Enumerable#sort_by.
+ *
+ * a = [ "d", "a", "e", "c", "b" ]
+ * a.sort #=> ["a", "b", "c", "d", "e"]
+ * a.sort { |x,y| y <=> x } #=> ["e", "d", "c", "b", "a"]
+ */
+
+VALUE
+rb_ary_sort(VALUE ary)
{
- FL_UNSET(ary, ARY_TMPLOCK);
+ ary = rb_ary_dup(ary);
+ rb_ary_sort_bang(ary);
return ary;
}
-VALUE
-rb_ary_sort_bang(ary)
- VALUE ary;
-{
- rb_ary_modify(ary);
- if (RARRAY(ary)->len <= 1) return Qnil;
- FL_SET(ary, ARY_TMPLOCK); /* prohibit modification during sort */
- rb_ensure(sort_internal, ary, sort_unlock, ary);
- return ary;
+static VALUE
+sort_by_i(VALUE i)
+{
+ return rb_yield(i);
}
-VALUE
-rb_ary_sort(ary)
- VALUE ary;
+/*
+ * call-seq:
+ * ary.sort_by! { |obj| block } -> ary
+ * ary.sort_by! -> Enumerator
+ *
+ * Sorts +self+ in place using a set of keys generated by mapping the
+ * values in +self+ through the given block.
+ *
+ * If no block is given, an Enumerator is returned instead.
+ *
+ */
+
+static VALUE
+rb_ary_sort_by_bang(VALUE ary)
{
- ary = rb_obj_dup(ary);
- rb_ary_sort_bang(ary);
+ VALUE sorted;
+
+ RETURN_ENUMERATOR(ary, 0, 0);
+ rb_ary_modify(ary);
+ sorted = rb_block_call(ary, rb_intern("sort_by"), 0, 0, sort_by_i, 0);
+ rb_ary_replace(ary, sorted);
return ary;
}
+
+/*
+ * call-seq:
+ * ary.collect { |item| block } -> new_ary
+ * ary.map { |item| block } -> new_ary
+ * ary.collect -> Enumerator
+ * ary.map -> Enumerator
+ *
+ * Invokes the given block once for each element of +self+.
+ *
+ * Creates a new array containing the values returned by the block.
+ *
+ * See also Enumerable#collect.
+ *
+ * If no block is given, an Enumerator is returned instead.
+ *
+ * a = [ "a", "b", "c", "d" ]
+ * a.map { |x| x + "!" } #=> ["a!", "b!", "c!", "d!"]
+ * a #=> ["a", "b", "c", "d"]
+ */
+
static VALUE
-rb_ary_collect(ary)
- VALUE ary;
+rb_ary_collect(VALUE ary)
{
- long len, i;
+ long i;
VALUE collect;
- if (!rb_block_given_p()) {
- return rb_obj_dup(ary);
+ RETURN_ENUMERATOR(ary, 0, 0);
+ collect = rb_ary_new2(RARRAY_LEN(ary));
+ for (i = 0; i < RARRAY_LEN(ary); i++) {
+ rb_ary_push(collect, rb_yield(RARRAY_PTR(ary)[i]));
}
+ return collect;
+}
- len = RARRAY(ary)->len;
- collect = rb_ary_new2(len);
- for (i=0; i<len; i++) {
- rb_ary_push(collect, rb_yield(RARRAY(ary)->ptr[i]));
+
+/*
+ * call-seq:
+ * ary.collect! {|item| block } -> ary
+ * ary.map! {|item| block } -> ary
+ * ary.collect! -> Enumerator
+ * ary.map! -> Enumerator
+ *
+ * Invokes the given block once for each element of +self+, replacing the
+ * element with the value returned by the block.
+ *
+ * See also Enumerable#collect.
+ *
+ * If no block is given, an Enumerator is returned instead.
+ *
+ * a = [ "a", "b", "c", "d" ]
+ * a.map! {|x| x + "!" }
+ * a #=> [ "a!", "b!", "c!", "d!" ]
+ */
+
+static VALUE
+rb_ary_collect_bang(VALUE ary)
+{
+ long i;
+
+ RETURN_ENUMERATOR(ary, 0, 0);
+ rb_ary_modify(ary);
+ for (i = 0; i < RARRAY_LEN(ary); i++) {
+ rb_ary_store(ary, i, rb_yield(RARRAY_PTR(ary)[i]));
}
- return collect;
+ return ary;
+}
+
+VALUE
+rb_get_values_at(VALUE obj, long olen, int argc, VALUE *argv, VALUE (*func) (VALUE, long))
+{
+ VALUE result = rb_ary_new2(argc);
+ long beg, len, i, j;
+
+ for (i=0; i<argc; i++) {
+ if (FIXNUM_P(argv[i])) {
+ rb_ary_push(result, (*func)(obj, FIX2LONG(argv[i])));
+ continue;
+ }
+ /* check if idx is Range */
+ if (rb_range_beg_len(argv[i], &beg, &len, olen, 1)) {
+ long end = olen < beg+len ? olen : beg+len;
+ for (j = beg; j < end; j++) {
+ rb_ary_push(result, (*func)(obj, j));
+ }
+ if (beg + len > j)
+ rb_ary_resize(result, RARRAY_LEN(result) + (beg + len) - j);
+ continue;
+ }
+ rb_ary_push(result, (*func)(obj, NUM2LONG(argv[i])));
+ }
+ return result;
}
+/*
+ * call-seq:
+ * ary.values_at(selector, ...) -> new_ary
+ *
+ * Returns an array containing the elements in +self+ corresponding to the
+ * given +selector+(s).
+ *
+ * The selectors may be either integer indices or ranges.
+ *
+ * See also Array#select.
+ *
+ * a = %w{ a b c d e f }
+ * a.values_at(1, 3, 5)
+ * a.values_at(1, 3, 5, 7)
+ * a.values_at(-1, -3, -5, -7)
+ * a.values_at(1..3, 2...5)
+ */
+
static VALUE
-rb_ary_collect_bang(ary)
- VALUE ary;
+rb_ary_values_at(int argc, VALUE *argv, VALUE ary)
{
+ return rb_get_values_at(ary, RARRAY_LEN(ary), argc, argv, rb_ary_entry);
+}
+
+
+/*
+ * call-seq:
+ * ary.select { |item| block } -> new_ary
+ * ary.select -> Enumerator
+ *
+ * Returns a new array containing all elements of +ary+
+ * for which the given +block+ returns a true value.
+ *
+ * If no block is given, an Enumerator is returned instead.
+ *
+ * [1,2,3,4,5].select { |num| num.even? } #=> [2, 4]
+ *
+ * a = %w{ a b c d e f }
+ * a.select { |v| v =~ /[aeiou]/ } #=> ["a", "e"]
+ *
+ * See also Enumerable#select.
+ */
+
+static VALUE
+rb_ary_select(VALUE ary)
+{
+ VALUE result;
long i;
+ RETURN_ENUMERATOR(ary, 0, 0);
+ result = rb_ary_new2(RARRAY_LEN(ary));
+ for (i = 0; i < RARRAY_LEN(ary); i++) {
+ if (RTEST(rb_yield(RARRAY_PTR(ary)[i]))) {
+ rb_ary_push(result, rb_ary_elt(ary, i));
+ }
+ }
+ return result;
+}
+
+/*
+ * call-seq:
+ * ary.select! {|item| block } -> ary or nil
+ * ary.select! -> Enumerator
+ *
+ * Invokes the given block passing in successive elements from +self+,
+ * deleting elements for which the block returns a +false+ value.
+ *
+ * If changes were made, it will return +self+, otherwise it returns +nil+.
+ *
+ * See also Array#keep_if
+ *
+ * If no block is given, an Enumerator is returned instead.
+ *
+ */
+
+static VALUE
+rb_ary_select_bang(VALUE ary)
+{
+ long i1, i2;
+
+ RETURN_ENUMERATOR(ary, 0, 0);
rb_ary_modify(ary);
- for (i = 0; i < RARRAY(ary)->len; i++) {
- RARRAY(ary)->ptr[i] = rb_yield(RARRAY(ary)->ptr[i]);
+ for (i1 = i2 = 0; i1 < RARRAY_LEN(ary); i1++) {
+ VALUE v = RARRAY_PTR(ary)[i1];
+ if (!RTEST(rb_yield(v))) continue;
+ if (i1 != i2) {
+ rb_ary_store(ary, i2, v);
+ }
+ i2++;
}
+
+ if (RARRAY_LEN(ary) == i2) return Qnil;
+ if (i2 < RARRAY_LEN(ary))
+ ARY_SET_LEN(ary, i2);
return ary;
}
+/*
+ * call-seq:
+ * ary.keep_if { |item| block } -> ary
+ * ary.keep_if -> Enumerator
+ *
+ * Deletes every element of +self+ for which the given block evaluates to
+ * +false+.
+ *
+ * See also Array#select!
+ *
+ * If no block is given, an Enumerator is returned instead.
+ *
+ * a = %w{ a b c d e f }
+ * a.keep_if { |v| v =~ /[aeiou]/ } #=> ["a", "e"]
+ */
+
static VALUE
-rb_ary_filter(ary)
- VALUE ary;
+rb_ary_keep_if(VALUE ary)
{
- rb_warn("Array#filter is deprecated; use Array#collect!");
- return rb_ary_collect_bang(ary);
+ RETURN_ENUMERATOR(ary, 0, 0);
+ rb_ary_select_bang(ary);
+ return ary;
}
+/*
+ * call-seq:
+ * ary.delete(obj) -> obj or nil
+ * ary.delete(obj) { block } -> obj or nil
+ *
+ * Deletes all items from +self+ that are equal to +obj+.
+ *
+ * If any items are found, returns +obj+, otherwise +nil+ is returned instead.
+ *
+ * If the optional code block is given, the result of the block is returned if
+ * the item is not found. (To remove +nil+ elements and get an informative
+ * return value, use Array#compact!)
+ *
+ * a = [ "a", "b", "b", "b", "c" ]
+ * a.delete("b") #=> "b"
+ * a #=> ["a", "c"]
+ * a.delete("z") #=> nil
+ * a.delete("z") { "not found" } #=> "not found"
+ */
+
VALUE
-rb_ary_delete(ary, item)
- VALUE ary;
- VALUE item;
+rb_ary_delete(VALUE ary, VALUE item)
{
+ VALUE v = item;
long i1, i2;
- rb_ary_modify(ary);
- for (i1 = i2 = 0; i1 < RARRAY(ary)->len; i1++) {
- if (rb_equal(RARRAY(ary)->ptr[i1], item)) continue;
+ for (i1 = i2 = 0; i1 < RARRAY_LEN(ary); i1++) {
+ VALUE e = RARRAY_PTR(ary)[i1];
+
+ if (rb_equal(e, item)) {
+ v = e;
+ continue;
+ }
if (i1 != i2) {
- RARRAY(ary)->ptr[i2] = RARRAY(ary)->ptr[i1];
+ rb_ary_store(ary, i2, e);
}
i2++;
}
- if (RARRAY(ary)->len == i2) {
+ if (RARRAY_LEN(ary) == i2) {
if (rb_block_given_p()) {
return rb_yield(item);
}
return Qnil;
}
- else {
- RARRAY(ary)->len = i2;
+
+ rb_ary_modify(ary);
+ if (RARRAY_LEN(ary) > i2) {
+ ARY_SET_LEN(ary, i2);
+ if (i2 * 2 < ARY_CAPA(ary) &&
+ ARY_CAPA(ary) > ARY_DEFAULT_SIZE) {
+ ary_resize_capa(ary, i2*2);
+ }
}
- return item;
+ return v;
}
VALUE
-rb_ary_delete_at(ary, pos)
- VALUE ary;
- long pos;
+rb_ary_delete_at(VALUE ary, long pos)
{
- long i, len = RARRAY(ary)->len;
- VALUE del = Qnil;
+ long len = RARRAY_LEN(ary);
+ VALUE del;
- rb_ary_modify(ary);
if (pos >= len) return Qnil;
- if (pos < 0) pos += len;
- if (pos < 0) return Qnil;
-
- del = RARRAY(ary)->ptr[pos];
- for (i = pos + 1; i < len; i++, pos++) {
- RARRAY(ary)->ptr[pos] = RARRAY(ary)->ptr[i];
+ if (pos < 0) {
+ pos += len;
+ if (pos < 0) return Qnil;
}
- RARRAY(ary)->len = pos;
+
+ rb_ary_modify(ary);
+ del = RARRAY_PTR(ary)[pos];
+ MEMMOVE(RARRAY_PTR(ary)+pos, RARRAY_PTR(ary)+pos+1, VALUE,
+ RARRAY_LEN(ary)-pos-1);
+ ARY_INCREASE_LEN(ary, -1);
return del;
}
-VALUE
-rb_ary_delete_at_m(ary, pos)
- VALUE ary, pos;
+/*
+ * call-seq:
+ * ary.delete_at(index) -> obj or nil
+ *
+ * Deletes the element at the specified +index+, returning that element, or
+ * +nil+ if the +index+ is out of range.
+ *
+ * See also Array#slice!
+ *
+ * a = ["ant", "bat", "cat", "dog"]
+ * a.delete_at(2) #=> "cat"
+ * a #=> ["ant", "bat", "dog"]
+ * a.delete_at(99) #=> nil
+ */
+
+static VALUE
+rb_ary_delete_at_m(VALUE ary, VALUE pos)
{
return rb_ary_delete_at(ary, NUM2LONG(pos));
}
+/*
+ * call-seq:
+ * ary.slice!(index) -> obj or nil
+ * ary.slice!(start, length) -> new_ary or nil
+ * ary.slice!(range) -> new_ary or nil
+ *
+ * Deletes the element(s) given by an +index+ (optionally up to +length+
+ * elements) or by a +range+.
+ *
+ * Returns the deleted object (or objects), or +nil+ if the +index+ is out of
+ * range.
+ *
+ * a = [ "a", "b", "c" ]
+ * a.slice!(1) #=> "b"
+ * a #=> ["a", "c"]
+ * a.slice!(-1) #=> "c"
+ * a #=> ["a"]
+ * a.slice!(100) #=> nil
+ * a #=> ["a"]
+ */
+
static VALUE
-rb_ary_slice_bang(argc, argv, ary)
- int argc;
- VALUE *argv;
- VALUE ary;
+rb_ary_slice_bang(int argc, VALUE *argv, VALUE ary)
{
VALUE arg1, arg2;
- long pos, len, i;
+ long pos, len, orig_len;
- rb_ary_modify(ary);
- if (rb_scan_args(argc, argv, "11", &arg1, &arg2) == 2) {
- pos = NUM2LONG(arg1);
- len = NUM2LONG(arg2);
+ rb_ary_modify_check(ary);
+ if (argc == 2) {
+ pos = NUM2LONG(argv[0]);
+ len = NUM2LONG(argv[1]);
delete_pos_len:
+ if (len < 0) return Qnil;
+ orig_len = RARRAY_LEN(ary);
if (pos < 0) {
- pos = RARRAY(ary)->len + pos;
+ pos += orig_len;
+ if (pos < 0) return Qnil;
+ }
+ else if (orig_len < pos) return Qnil;
+ if (orig_len < pos + len) {
+ len = orig_len - pos;
}
- arg2 = rb_ary_subseq(ary, pos, len);
- rb_ary_replace(ary, pos, len, Qnil); /* Qnil/rb_ary_new2(0) */
+ if (len == 0) return rb_ary_new2(0);
+ arg2 = rb_ary_new4(len, RARRAY_PTR(ary)+pos);
+ RBASIC(arg2)->klass = rb_obj_class(ary);
+ rb_ary_splice(ary, pos, len, Qundef);
return arg2;
}
- if (!FIXNUM_P(arg1) && rb_range_beg_len(arg1, &pos, &len, RARRAY(ary)->len, 1)) {
- goto delete_pos_len;
+ if (argc != 1) {
+ /* error report */
+ rb_scan_args(argc, argv, "11", NULL, NULL);
}
+ arg1 = argv[0];
- pos = NUM2LONG(arg1);
- len = RARRAY(ary)->len;
-
- if (pos >= len) return Qnil;
- if (pos < 0) pos += len;
- if (pos < 0) return Qnil;
-
- arg2 = RARRAY(ary)->ptr[pos];
- for (i = pos + 1; i < len; i++, pos++) {
- RARRAY(ary)->ptr[pos] = RARRAY(ary)->ptr[i];
+ if (!FIXNUM_P(arg1)) {
+ switch (rb_range_beg_len(arg1, &pos, &len, RARRAY_LEN(ary), 0)) {
+ case Qtrue:
+ /* valid range */
+ goto delete_pos_len;
+ case Qnil:
+ /* invalid range */
+ return Qnil;
+ default:
+ /* not a range */
+ break;
+ }
}
- RARRAY(ary)->len = pos;
- return arg2;
+ return rb_ary_delete_at(ary, NUM2LONG(arg1));
}
static VALUE
-rb_ary_reject_bang(ary)
- VALUE ary;
+ary_reject(VALUE orig, VALUE result)
{
- long i1, i2;
+ long i;
- rb_ary_modify(ary);
- for (i1 = i2 = 0; i1 < RARRAY(ary)->len; i1++) {
- if (RTEST(rb_yield(RARRAY(ary)->ptr[i1]))) continue;
- if (i1 != i2) {
- RARRAY(ary)->ptr[i2] = RARRAY(ary)->ptr[i1];
+ for (i = 0; i < RARRAY_LEN(orig); i++) {
+ VALUE v = RARRAY_PTR(orig)[i];
+ if (!RTEST(rb_yield(v))) {
+ rb_ary_push_1(result, v);
}
- i2++;
}
- if (RARRAY(ary)->len == i2) return Qnil;
- RARRAY(ary)->len = i2;
+ return result;
+}
- return ary;
+static VALUE
+ary_reject_bang(VALUE ary)
+{
+ long i;
+ VALUE result = Qnil;
+
+ rb_ary_modify_check(ary);
+ for (i = 0; i < RARRAY_LEN(ary); ) {
+ VALUE v = RARRAY_PTR(ary)[i];
+ if (RTEST(rb_yield(v))) {
+ rb_ary_delete_at(ary, i);
+ result = ary;
+ }
+ else {
+ i++;
+ }
+ }
+ return result;
}
+/*
+ * call-seq:
+ * ary.reject! { |item| block } -> ary or nil
+ * ary.reject! -> Enumerator
+ *
+ * Equivalent to Array#delete_if, deleting elements from +self+ for which the
+ * block evaluates to +true+, but returns +nil+ if no changes were made.
+ *
+ * The array is changed instantly every time the block is called, not after
+ * the iteration is over.
+ *
+ * See also Enumerable#reject and Array#delete_if.
+ *
+ * If no block is given, an Enumerator is returned instead.
+ */
+
static VALUE
-rb_ary_delete_if(ary)
- VALUE ary;
+rb_ary_reject_bang(VALUE ary)
{
- rb_ary_reject_bang(ary);
- return ary;
+ RETURN_ENUMERATOR(ary, 0, 0);
+ return ary_reject_bang(ary);
}
+/*
+ * call-seq:
+ * ary.reject {|item| block } -> new_ary
+ * ary.reject -> Enumerator
+ *
+ * Returns a new array containing the items in +self+ for which the given
+ * block is not +true+.
+ *
+ * See also Array#delete_if
+ *
+ * If no block is given, an Enumerator is returned instead.
+ */
+
static VALUE
-rb_ary_replace_m(ary, ary2)
- VALUE ary, ary2;
+rb_ary_reject(VALUE ary)
{
- ary2 = to_ary(ary2);
- rb_ary_replace(ary, 0, RARRAY(ary)->len, ary2);
+ VALUE rejected_ary;
+
+ RETURN_ENUMERATOR(ary, 0, 0);
+ rejected_ary = rb_ary_new();
+ ary_reject(ary, rejected_ary);
+ return rejected_ary;
+}
+
+/*
+ * call-seq:
+ * ary.delete_if { |item| block } -> ary
+ * ary.delete_if -> Enumerator
+ *
+ * Deletes every element of +self+ for which block evaluates to +true+.
+ *
+ * The array is changed instantly every time the block is called, not after
+ * the iteration is over.
+ *
+ * See also Array#reject!
+ *
+ * If no block is given, an Enumerator is returned instead.
+ *
+ * a = [ "a", "b", "c" ]
+ * a.delete_if {|x| x >= "b" } #=> ["a"]
+ */
+
+static VALUE
+rb_ary_delete_if(VALUE ary)
+{
+ RETURN_ENUMERATOR(ary, 0, 0);
+ ary_reject_bang(ary);
return ary;
}
+static VALUE
+take_i(VALUE val, VALUE *args, int argc, VALUE *argv)
+{
+ if (args[1]-- == 0) rb_iter_break();
+ if (argc > 1) val = rb_ary_new4(argc, argv);
+ rb_ary_push(args[0], val);
+ return Qnil;
+}
+
+static VALUE
+take_items(VALUE obj, long n)
+{
+ VALUE result = rb_check_array_type(obj);
+ VALUE args[2];
+
+ if (!NIL_P(result)) return rb_ary_subseq(result, 0, n);
+ result = rb_ary_new2(n);
+ args[0] = result; args[1] = (VALUE)n;
+ if (rb_check_block_call(obj, rb_intern("each"), 0, 0, take_i, (VALUE)args) == Qundef)
+ Check_Type(obj, T_ARRAY);
+ return result;
+}
+
+
+/*
+ * call-seq:
+ * ary.zip(arg, ...) -> new_ary
+ * ary.zip(arg, ...) { |arr| block } -> nil
+ *
+ * Converts any arguments to arrays, then merges elements of +self+ with
+ * corresponding elements from each argument.
+ *
+ * This generates a sequence of <code>ary.size</code> _n_-element arrays,
+ * where _n_ is one more that the count of arguments.
+ *
+ * If the size of any argument is less than the size of the initial array,
+ * +nil+ values are supplied.
+ *
+ * If a block is given, it is invoked for each output +array+, otherwise an
+ * array of arrays is returned.
+ *
+ * a = [ 4, 5, 6 ]
+ * b = [ 7, 8, 9 ]
+ * [1, 2, 3].zip(a, b) #=> [[1, 4, 7], [2, 5, 8], [3, 6, 9]]
+ * [1, 2].zip(a, b) #=> [[1, 4, 7], [2, 5, 8]]
+ * a.zip([1, 2], [8]) #=> [[4, 1, 8], [5, 2, nil], [6, nil, nil]]
+ */
+
+static VALUE
+rb_ary_zip(int argc, VALUE *argv, VALUE ary)
+{
+ int i, j;
+ long len;
+ VALUE result = Qnil;
+
+ len = RARRAY_LEN(ary);
+ for (i=0; i<argc; i++) {
+ argv[i] = take_items(argv[i], len);
+ }
+ if (!rb_block_given_p()) {
+ result = rb_ary_new2(len);
+ }
+
+ for (i=0; i<RARRAY_LEN(ary); i++) {
+ VALUE tmp = rb_ary_new2(argc+1);
+
+ rb_ary_push(tmp, rb_ary_elt(ary, i));
+ for (j=0; j<argc; j++) {
+ rb_ary_push(tmp, rb_ary_elt(argv[j], i));
+ }
+ if (NIL_P(result)) {
+ rb_yield(tmp);
+ }
+ else {
+ rb_ary_push(result, tmp);
+ }
+ }
+ return result;
+}
+
+/*
+ * call-seq:
+ * ary.transpose -> new_ary
+ *
+ * Assumes that +self+ is an array of arrays and transposes the rows and
+ * columns.
+ *
+ * a = [[1,2], [3,4], [5,6]]
+ * a.transpose #=> [[1, 3, 5], [2, 4, 6]]
+ *
+ * If the length of the subarrays don't match, an IndexError is raised.
+ */
+
+static VALUE
+rb_ary_transpose(VALUE ary)
+{
+ long elen = -1, alen, i, j;
+ VALUE tmp, result = 0;
+
+ alen = RARRAY_LEN(ary);
+ if (alen == 0) return rb_ary_dup(ary);
+ for (i=0; i<alen; i++) {
+ tmp = to_ary(rb_ary_elt(ary, i));
+ if (elen < 0) { /* first element */
+ elen = RARRAY_LEN(tmp);
+ result = rb_ary_new2(elen);
+ for (j=0; j<elen; j++) {
+ rb_ary_store(result, j, rb_ary_new2(alen));
+ }
+ }
+ else if (elen != RARRAY_LEN(tmp)) {
+ rb_raise(rb_eIndexError, "element size differs (%ld should be %ld)",
+ RARRAY_LEN(tmp), elen);
+ }
+ for (j=0; j<elen; j++) {
+ rb_ary_store(rb_ary_elt(result, j), i, rb_ary_elt(tmp, j));
+ }
+ }
+ return result;
+}
+
+/*
+ * call-seq:
+ * ary.replace(other_ary) -> ary
+ *
+ * Replaces the contents of +self+ with the contents of +other_ary+,
+ * truncating or expanding if necessary.
+ *
+ * a = [ "a", "b", "c", "d", "e" ]
+ * a.replace([ "x", "y", "z" ]) #=> ["x", "y", "z"]
+ * a #=> ["x", "y", "z"]
+ */
+
VALUE
-rb_ary_clear(ary)
- VALUE ary;
+rb_ary_replace(VALUE copy, VALUE orig)
{
- rb_ary_modify(ary);
- RARRAY(ary)->len = 0;
- if (ARY_DEFAULT_SIZE*3 < RARRAY(ary)->capa) {
- RARRAY(ary)->capa = ARY_DEFAULT_SIZE * 2;
- REALLOC_N(RARRAY(ary)->ptr, VALUE, RARRAY(ary)->capa);
+ rb_ary_modify_check(copy);
+ orig = to_ary(orig);
+ if (copy == orig) return copy;
+
+ if (RARRAY_LEN(orig) <= RARRAY_EMBED_LEN_MAX) {
+ VALUE *ptr;
+ VALUE shared = 0;
+
+ if (ARY_OWNS_HEAP_P(copy)) {
+ xfree(RARRAY_PTR(copy));
+ }
+ else if (ARY_SHARED_P(copy)) {
+ shared = ARY_SHARED(copy);
+ FL_UNSET_SHARED(copy);
+ }
+ FL_SET_EMBED(copy);
+ ptr = RARRAY_PTR(orig);
+ MEMCPY(RARRAY_PTR(copy), ptr, VALUE, RARRAY_LEN(orig));
+ if (shared) {
+ rb_ary_decrement_share(shared);
+ }
+ ARY_SET_LEN(copy, RARRAY_LEN(orig));
+ }
+ else {
+ VALUE shared = ary_make_shared(orig);
+ if (ARY_OWNS_HEAP_P(copy)) {
+ xfree(RARRAY_PTR(copy));
+ }
+ else {
+ rb_ary_unshare_safe(copy);
+ }
+ FL_UNSET_EMBED(copy);
+ ARY_SET_PTR(copy, RARRAY_PTR(orig));
+ ARY_SET_LEN(copy, RARRAY_LEN(orig));
+ rb_ary_set_shared(copy, shared);
+ }
+ return copy;
+}
+
+/*
+ * call-seq:
+ * ary.clear -> ary
+ *
+ * Removes all elements from +self+.
+ *
+ * a = [ "a", "b", "c", "d", "e" ]
+ * a.clear #=> [ ]
+ */
+
+VALUE
+rb_ary_clear(VALUE ary)
+{
+ rb_ary_modify_check(ary);
+ ARY_SET_LEN(ary, 0);
+ if (ARY_SHARED_P(ary)) {
+ if (!ARY_EMBED_P(ary)) {
+ rb_ary_unshare(ary);
+ FL_SET_EMBED(ary);
+ }
+ }
+ else if (ARY_DEFAULT_SIZE * 2 < ARY_CAPA(ary)) {
+ ary_resize_capa(ary, ARY_DEFAULT_SIZE * 2);
}
return ary;
}
+/*
+ * call-seq:
+ * ary.fill(obj) -> ary
+ * ary.fill(obj, start [, length]) -> ary
+ * ary.fill(obj, range ) -> ary
+ * ary.fill { |index| block } -> ary
+ * ary.fill(start [, length] ) { |index| block } -> ary
+ * ary.fill(range) { |index| block } -> ary
+ *
+ * The first three forms set the selected elements of +self+ (which
+ * may be the entire array) to +obj+.
+ *
+ * A +start+ of +nil+ is equivalent to zero.
+ *
+ * A +length+ of +nil+ is equivalent to the length of the array.
+ *
+ * The last three forms fill the array with the value of the given block,
+ * which is passed the absolute index of each element to be filled.
+ *
+ * Negative values of +start+ count from the end of the array, where +-1+ is
+ * the last element.
+ *
+ * a = [ "a", "b", "c", "d" ]
+ * a.fill("x") #=> ["x", "x", "x", "x"]
+ * a.fill("z", 2, 2) #=> ["x", "x", "z", "z"]
+ * a.fill("y", 0..1) #=> ["y", "y", "z", "z"]
+ * a.fill { |i| i*i } #=> [0, 1, 4, 9]
+ * a.fill(-2) { |i| i*i*i } #=> [0, 1, 8, 27]
+ */
+
static VALUE
-rb_ary_fill(argc, argv, ary)
- int argc;
- VALUE *argv;
- VALUE ary;
+rb_ary_fill(int argc, VALUE *argv, VALUE ary)
{
VALUE item, arg1, arg2;
- long beg, end, len;
+ long beg = 0, end = 0, len = 0;
VALUE *p, *pend;
+ int block_p = FALSE;
- rb_scan_args(argc, argv, "12", &item, &arg1, &arg2);
+ if (rb_block_given_p()) {
+ block_p = TRUE;
+ rb_scan_args(argc, argv, "02", &arg1, &arg2);
+ argc += 1; /* hackish */
+ }
+ else {
+ rb_scan_args(argc, argv, "12", &item, &arg1, &arg2);
+ }
switch (argc) {
case 1:
beg = 0;
- len = RARRAY(ary)->len - beg;
+ len = RARRAY_LEN(ary);
break;
case 2:
- if (rb_range_beg_len(arg1, &beg, &len, RARRAY(ary)->len, 1)) {
+ if (rb_range_beg_len(arg1, &beg, &len, RARRAY_LEN(ary), 1)) {
break;
}
/* fall through */
case 3:
- beg = NIL_P(arg1)?0:NUM2LONG(arg1);
+ beg = NIL_P(arg1) ? 0 : NUM2LONG(arg1);
if (beg < 0) {
- beg = RARRAY(ary)->len + beg;
+ beg = RARRAY_LEN(ary) + beg;
if (beg < 0) beg = 0;
}
- len = NIL_P(arg2)?RARRAY(ary)->len - beg:NUM2LONG(arg2);
+ len = NIL_P(arg2) ? RARRAY_LEN(ary) - beg : NUM2LONG(arg2);
break;
}
rb_ary_modify(ary);
+ if (len < 0) {
+ return ary;
+ }
+ if (beg >= ARY_MAX_SIZE || len > ARY_MAX_SIZE - beg) {
+ rb_raise(rb_eArgError, "argument too big");
+ }
end = beg + len;
- if (end > RARRAY(ary)->len) {
- if (end >= RARRAY(ary)->capa) {
- RARRAY(ary)->capa=end;
- REALLOC_N(RARRAY(ary)->ptr, VALUE, RARRAY(ary)->capa);
- }
- if (beg > RARRAY(ary)->len) {
- rb_mem_clear(RARRAY(ary)->ptr+RARRAY(ary)->len,end-RARRAY(ary)->len);
+ if (RARRAY_LEN(ary) < end) {
+ if (end >= ARY_CAPA(ary)) {
+ ary_resize_capa(ary, end);
}
- RARRAY(ary)->len = end;
+ rb_mem_clear(RARRAY_PTR(ary) + RARRAY_LEN(ary), end - RARRAY_LEN(ary));
+ ARY_SET_LEN(ary, end);
}
- p = RARRAY(ary)->ptr + beg; pend = p + len;
- while (p < pend) {
- *p++ = item;
+ if (block_p) {
+ VALUE v;
+ long i;
+
+ for (i=beg; i<end; i++) {
+ v = rb_yield(LONG2NUM(i));
+ if (i>=RARRAY_LEN(ary)) break;
+ RARRAY_PTR(ary)[i] = v;
+ }
+ }
+ else {
+ p = RARRAY_PTR(ary) + beg;
+ pend = p + len;
+ while (p < pend) {
+ *p++ = item;
+ }
}
return ary;
}
+/*
+ * call-seq:
+ * ary + other_ary -> new_ary
+ *
+ * Concatenation --- Returns a new array built by concatenating the
+ * two arrays together to produce a third array.
+ *
+ * [ 1, 2, 3 ] + [ 4, 5 ] #=> [ 1, 2, 3, 4, 5 ]
+ * a = [ "a", "b", "c" ]
+ * a + [ "d", "e", "f" ]
+ * a #=> [ "a", "b", "c", "d", "e", "f" ]
+ *
+ * See also Array#concat.
+ */
+
VALUE
-rb_ary_plus(x, y)
- VALUE x, y;
+rb_ary_plus(VALUE x, VALUE y)
{
VALUE z;
+ long len;
y = to_ary(y);
- z = rb_ary_new2(RARRAY(x)->len + RARRAY(y)->len);
- MEMCPY(RARRAY(z)->ptr, RARRAY(x)->ptr, VALUE, RARRAY(x)->len);
- MEMCPY(RARRAY(z)->ptr+RARRAY(x)->len, RARRAY(y)->ptr, VALUE, RARRAY(y)->len);
- RARRAY(z)->len = RARRAY(x)->len + RARRAY(y)->len;
+ len = RARRAY_LEN(x) + RARRAY_LEN(y);
+ z = rb_ary_new2(len);
+ MEMCPY(RARRAY_PTR(z), RARRAY_PTR(x), VALUE, RARRAY_LEN(x));
+ MEMCPY(RARRAY_PTR(z) + RARRAY_LEN(x), RARRAY_PTR(y), VALUE, RARRAY_LEN(y));
+ ARY_SET_LEN(z, len);
return z;
}
+/*
+ * call-seq:
+ * ary.concat(other_ary) -> ary
+ *
+ * Appends the elements of +other_ary+ to +self+.
+ *
+ * [ "a", "b" ].concat( ["c", "d"] ) #=> [ "a", "b", "c", "d" ]
+ * a = [ 1, 2, 3 ]
+ * a.concat( [ 4, 5 ] )
+ * a #=> [ 1, 2, 3, 4, 5 ]
+ *
+ * See also Array#+.
+ */
+
VALUE
-rb_ary_concat(x, y)
- VALUE x, y;
+rb_ary_concat(VALUE x, VALUE y)
{
- long xlen = RARRAY(x)->len;
- long ylen;
-
+ rb_ary_modify_check(x);
y = to_ary(y);
- ylen = RARRAY(y)->len;
- if (ylen > 0) {
- rb_ary_modify(x);
- if (xlen + ylen > RARRAY(x)->capa) {
- RARRAY(x)->capa = xlen + ylen;
- REALLOC_N(RARRAY(x)->ptr, VALUE, RARRAY(x)->capa);
- }
- MEMCPY(RARRAY(x)->ptr+xlen, RARRAY(y)->ptr, VALUE, ylen);
- RARRAY(x)->len = xlen + ylen;
+ if (RARRAY_LEN(y) > 0) {
+ rb_ary_splice(x, RARRAY_LEN(x), 0, y);
}
return x;
}
+
+/*
+ * call-seq:
+ * ary * int -> new_ary
+ * ary * str -> new_string
+ *
+ * Repetition --- With a String argument, equivalent to
+ * <code>ary.join(str)</code>.
+ *
+ * Otherwise, returns a new array built by concatenating the +int+ copies of
+ * +self+.
+ *
+ *
+ * [ 1, 2, 3 ] * 3 #=> [ 1, 2, 3, 1, 2, 3, 1, 2, 3 ]
+ * [ 1, 2, 3 ] * "," #=> "1,2,3"
+ *
+ */
+
static VALUE
-rb_ary_times(ary, times)
- VALUE ary;
- VALUE times;
+rb_ary_times(VALUE ary, VALUE times)
{
- VALUE ary2;
- long i, len;
+ VALUE ary2, tmp, *ptr, *ptr2;
+ long t, len;
- if (TYPE(times) == T_STRING) {
- return rb_ary_join(ary, times);
+ tmp = rb_check_string_type(times);
+ if (!NIL_P(tmp)) {
+ return rb_ary_join(ary, tmp);
}
len = NUM2LONG(times);
+ if (len == 0) {
+ ary2 = ary_new(rb_obj_class(ary), 0);
+ goto out;
+ }
if (len < 0) {
rb_raise(rb_eArgError, "negative argument");
}
- len *= RARRAY(ary)->len;
-
- ary2 = rb_ary_new2(len);
- RARRAY(ary2)->len = len;
-
- for (i=0; i<len; i+=RARRAY(ary)->len) {
- MEMCPY(RARRAY(ary2)->ptr+i, RARRAY(ary)->ptr, VALUE, RARRAY(ary)->len);
+ if (ARY_MAX_SIZE/len < RARRAY_LEN(ary)) {
+ rb_raise(rb_eArgError, "argument too big");
}
+ len *= RARRAY_LEN(ary);
+
+ ary2 = ary_new(rb_obj_class(ary), len);
+ ARY_SET_LEN(ary2, len);
+
+ ptr = RARRAY_PTR(ary);
+ ptr2 = RARRAY_PTR(ary2);
+ t = RARRAY_LEN(ary);
+ if (0 < t) {
+ MEMCPY(ptr2, ptr, VALUE, t);
+ while (t <= len/2) {
+ MEMCPY(ptr2+t, ptr2, VALUE, t);
+ t *= 2;
+ }
+ if (t < len) {
+ MEMCPY(ptr2+t, ptr2, VALUE, len-t);
+ }
+ }
+ out:
+ OBJ_INFECT(ary2, ary);
return ary2;
}
+/*
+ * call-seq:
+ * ary.assoc(obj) -> new_ary or nil
+ *
+ * Searches through an array whose elements are also arrays comparing +obj+
+ * with the first element of each contained array using <code>obj.==</code>.
+ *
+ * Returns the first contained array that matches (that is, the first
+ * associated array), or +nil+ if no match is found.
+ *
+ * See also Array#rassoc
+ *
+ * s1 = [ "colors", "red", "blue", "green" ]
+ * s2 = [ "letters", "a", "b", "c" ]
+ * s3 = "foo"
+ * a = [ s1, s2, s3 ]
+ * a.assoc("letters") #=> [ "letters", "a", "b", "c" ]
+ * a.assoc("foo") #=> nil
+ */
+
VALUE
-rb_ary_assoc(ary, key)
- VALUE ary;
- VALUE key;
+rb_ary_assoc(VALUE ary, VALUE key)
{
- VALUE *p, *pend;
+ long i;
+ VALUE v;
- p = RARRAY(ary)->ptr; pend = p + RARRAY(ary)->len;
- while (p < pend) {
- if (TYPE(*p) == T_ARRAY
- && RARRAY(*p)->len > 0
- && rb_equal(RARRAY(*p)->ptr[0], key))
- return *p;
- p++;
+ for (i = 0; i < RARRAY_LEN(ary); ++i) {
+ v = rb_check_array_type(RARRAY_PTR(ary)[i]);
+ if (!NIL_P(v) && RARRAY_LEN(v) > 0 &&
+ rb_equal(RARRAY_PTR(v)[0], key))
+ return v;
}
return Qnil;
}
+/*
+ * call-seq:
+ * ary.rassoc(obj) -> new_ary or nil
+ *
+ * Searches through the array whose elements are also arrays.
+ *
+ * Compares +obj+ with the second element of each contained array using
+ * <code>obj.==</code>.
+ *
+ * Returns the first contained array that matches +obj+.
+ *
+ * See also Array#assoc.
+ *
+ * a = [ [ 1, "one"], [2, "two"], [3, "three"], ["ii", "two"] ]
+ * a.rassoc("two") #=> [2, "two"]
+ * a.rassoc("four") #=> nil
+ */
+
VALUE
-rb_ary_rassoc(ary, value)
- VALUE ary;
- VALUE value;
+rb_ary_rassoc(VALUE ary, VALUE value)
{
- VALUE *p, *pend;
+ long i;
+ VALUE v;
- p = RARRAY(ary)->ptr; pend = p + RARRAY(ary)->len;
- while (p < pend) {
- if (TYPE(*p) == T_ARRAY
- && RARRAY(*p)->len > 1
- && rb_equal(RARRAY(*p)->ptr[1], value))
- return *p;
- p++;
+ for (i = 0; i < RARRAY_LEN(ary); ++i) {
+ v = RARRAY_PTR(ary)[i];
+ if (RB_TYPE_P(v, T_ARRAY) &&
+ RARRAY_LEN(v) > 1 &&
+ rb_equal(RARRAY_PTR(v)[1], value))
+ return v;
}
return Qnil;
}
static VALUE
-rb_ary_equal(ary1, ary2)
- VALUE ary1, ary2;
+recursive_equal(VALUE ary1, VALUE ary2, int recur)
{
long i;
- if (TYPE(ary2) != T_ARRAY) return Qfalse;
- if (RARRAY(ary1)->len != RARRAY(ary2)->len) return Qfalse;
- for (i=0; i<RARRAY(ary1)->len; i++) {
- if (!rb_equal(RARRAY(ary1)->ptr[i], RARRAY(ary2)->ptr[i]))
+ if (recur) return Qtrue; /* Subtle! */
+ for (i=0; i<RARRAY_LEN(ary1); i++) {
+ if (!rb_equal(rb_ary_elt(ary1, i), rb_ary_elt(ary2, i)))
return Qfalse;
}
return Qtrue;
}
+/*
+ * call-seq:
+ * ary == other_ary -> bool
+ *
+ * Equality --- Two arrays are equal if they contain the same number of
+ * elements and if each element is equal to (according to Object#==) the
+ * corresponding element in +other_ary+.
+ *
+ * [ "a", "c" ] == [ "a", "c", 7 ] #=> false
+ * [ "a", "c", 7 ] == [ "a", "c", 7 ] #=> true
+ * [ "a", "c", 7 ] == [ "a", "d", "f" ] #=> false
+ *
+ */
+
static VALUE
-rb_ary_eql(ary1, ary2)
- VALUE ary1, ary2;
+rb_ary_equal(VALUE ary1, VALUE ary2)
+{
+ if (ary1 == ary2) return Qtrue;
+ if (!RB_TYPE_P(ary2, T_ARRAY)) {
+ if (!rb_respond_to(ary2, rb_intern("to_ary"))) {
+ return Qfalse;
+ }
+ return rb_equal(ary2, ary1);
+ }
+ if (RARRAY_LEN(ary1) != RARRAY_LEN(ary2)) return Qfalse;
+ return rb_exec_recursive_paired(recursive_equal, ary1, ary2, ary2);
+}
+
+static VALUE
+recursive_eql(VALUE ary1, VALUE ary2, int recur)
{
long i;
- if (TYPE(ary2) != T_ARRAY) return Qfalse;
- if (RARRAY(ary1)->len != RARRAY(ary2)->len)
- return Qfalse;
- for (i=0; i<RARRAY(ary1)->len; i++) {
- if (!rb_eql(RARRAY(ary1)->ptr[i], RARRAY(ary2)->ptr[i]))
+ if (recur) return Qtrue; /* Subtle! */
+ for (i=0; i<RARRAY_LEN(ary1); i++) {
+ if (!rb_eql(rb_ary_elt(ary1, i), rb_ary_elt(ary2, i)))
return Qfalse;
}
return Qtrue;
}
+/*
+ * call-seq:
+ * ary.eql?(other) -> true or false
+ *
+ * Returns +true+ if +self+ and +other+ are the same object,
+ * or are both arrays with the same content.
+ */
+
static VALUE
-rb_ary_hash(ary)
- VALUE ary;
+rb_ary_eql(VALUE ary1, VALUE ary2)
+{
+ if (ary1 == ary2) return Qtrue;
+ if (!RB_TYPE_P(ary2, T_ARRAY)) return Qfalse;
+ if (RARRAY_LEN(ary1) != RARRAY_LEN(ary2)) return Qfalse;
+ return rb_exec_recursive_paired(recursive_eql, ary1, ary2, ary2);
+}
+
+static VALUE
+recursive_hash(VALUE ary, VALUE dummy, int recur)
{
long i;
+ st_index_t h;
VALUE n;
- long h;
- h = RARRAY(ary)->len;
- for (i=0; i<RARRAY(ary)->len; i++) {
- h = (h<<1) | (h<0 ? 1 : 0);
- n = rb_hash(RARRAY(ary)->ptr[i]);
- h ^= NUM2LONG(n);
+ h = rb_hash_start(RARRAY_LEN(ary));
+ if (recur) {
+ h = rb_hash_uint(h, NUM2LONG(rb_hash(rb_cArray)));
+ }
+ else {
+ for (i=0; i<RARRAY_LEN(ary); i++) {
+ n = rb_hash(RARRAY_PTR(ary)[i]);
+ h = rb_hash_uint(h, NUM2LONG(n));
+ }
}
- return INT2FIX(h);
+ h = rb_hash_end(h);
+ return LONG2FIX(h);
}
+/*
+ * call-seq:
+ * ary.hash -> fixnum
+ *
+ * Compute a hash-code for this array.
+ *
+ * Two arrays with the same content will have the same hash code (and will
+ * compare using #eql?).
+ */
+
+static VALUE
+rb_ary_hash(VALUE ary)
+{
+ return rb_exec_recursive_outer(recursive_hash, ary, 0);
+}
+
+/*
+ * call-seq:
+ * ary.include?(object) -> true or false
+ *
+ * Returns +true+ if the given +object+ is present in +self+ (that is, if any
+ * object <code>==</code> +object+), otherwise returns +false+.
+ *
+ * a = [ "a", "b", "c" ]
+ * a.include?("b") #=> true
+ * a.include?("z") #=> false
+ */
+
VALUE
-rb_ary_includes(ary, item)
- VALUE ary;
- VALUE item;
+rb_ary_includes(VALUE ary, VALUE item)
{
long i;
- for (i=0; i<RARRAY(ary)->len; i++) {
- if (rb_equal(RARRAY(ary)->ptr[i], item)) {
+
+ for (i=0; i<RARRAY_LEN(ary); i++) {
+ if (rb_equal(RARRAY_PTR(ary)[i], item)) {
return Qtrue;
}
}
return Qfalse;
}
+
static VALUE
-rb_ary_cmp(ary, ary2)
- VALUE ary;
- VALUE ary2;
+recursive_cmp(VALUE ary1, VALUE ary2, int recur)
{
long i, len;
- ary2 = to_ary(ary2);
- len = RARRAY(ary)->len;
- if (len > RARRAY(ary2)->len) {
- len = RARRAY(ary2)->len;
+ if (recur) return Qundef; /* Subtle! */
+ len = RARRAY_LEN(ary1);
+ if (len > RARRAY_LEN(ary2)) {
+ len = RARRAY_LEN(ary2);
}
for (i=0; i<len; i++) {
- VALUE v = rb_funcall(RARRAY(ary)->ptr[i],cmp,1,RARRAY(ary2)->ptr[i]);
+ VALUE v = rb_funcall(rb_ary_elt(ary1, i), id_cmp, 1, rb_ary_elt(ary2, i));
if (v != INT2FIX(0)) {
return v;
}
}
- len = RARRAY(ary)->len - RARRAY(ary2)->len;
+ return Qundef;
+}
+
+/*
+ * call-seq:
+ * ary <=> other_ary -> -1, 0, +1 or nil
+ *
+ * Comparison --- Returns an integer (+-1+, +0+, or <code>+1</code>) if this
+ * array is less than, equal to, or greater than +other_ary+.
+ *
+ * Each object in each array is compared (using the <=> operator).
+ *
+ * Arrays are compared in an "element-wise" manner; the first two elements
+ * that are not equal will determine the return value for the whole
+ * comparison.
+ *
+ * If all the values are equal, then the return is based on a comparison of
+ * the array lengths. Thus, two arrays are "equal" according to Array#<=> if,
+ * and only if, they have the same length and the value of each element is
+ * equal to the value of the corresponding element in the other array.
+ *
+ * [ "a", "a", "c" ] <=> [ "a", "b", "c" ] #=> -1
+ * [ 1, 2, 3, 4, 5, 6 ] <=> [ 1, 2 ] #=> +1
+ *
+ */
+
+VALUE
+rb_ary_cmp(VALUE ary1, VALUE ary2)
+{
+ long len;
+ VALUE v;
+
+ ary2 = rb_check_array_type(ary2);
+ if (NIL_P(ary2)) return Qnil;
+ if (ary1 == ary2) return INT2FIX(0);
+ v = rb_exec_recursive_paired(recursive_cmp, ary1, ary2, ary2);
+ if (v != Qundef) return v;
+ len = RARRAY_LEN(ary1) - RARRAY_LEN(ary2);
if (len == 0) return INT2FIX(0);
if (len > 0) return INT2FIX(1);
return INT2FIX(-1);
}
static VALUE
-rb_ary_diff(ary1, ary2)
- VALUE ary1, ary2;
+ary_add_hash(VALUE hash, VALUE ary)
{
- VALUE ary3;
long i;
- ary2 = to_ary(ary2);
- ary3 = rb_ary_new();
- for (i=0; i<RARRAY(ary1)->len; i++) {
- if (rb_ary_includes(ary2, RARRAY(ary1)->ptr[i])) continue;
- if (rb_ary_includes(ary3, RARRAY(ary1)->ptr[i])) continue;
- rb_ary_push(ary3, RARRAY(ary1)->ptr[i]);
+ for (i=0; i<RARRAY_LEN(ary); i++) {
+ rb_hash_aset(hash, RARRAY_PTR(ary)[i], Qtrue);
}
- return ary3;
+ return hash;
}
-static VALUE
-ary_make_hash(ary1, ary2)
- VALUE ary1, ary2;
+static inline VALUE
+ary_tmp_hash_new(void)
{
VALUE hash = rb_hash_new();
- int i, n;
- for (i=0; i<RARRAY(ary1)->len; i++) {
- rb_hash_aset(hash, RARRAY(ary1)->ptr[i], Qtrue);
- }
- if (ary2) {
- for (i=0; i<RARRAY(ary2)->len; i++) {
- rb_hash_aset(hash, RARRAY(ary2)->ptr[i], Qtrue);
+ RBASIC(hash)->klass = 0;
+ return hash;
+}
+
+static VALUE
+ary_make_hash(VALUE ary)
+{
+ VALUE hash = ary_tmp_hash_new();
+ return ary_add_hash(hash, ary);
+}
+
+static VALUE
+ary_add_hash_by(VALUE hash, VALUE ary)
+{
+ long i;
+
+ for (i = 0; i < RARRAY_LEN(ary); ++i) {
+ VALUE v = rb_ary_elt(ary, i), k = rb_yield(v);
+ if (rb_hash_lookup2(hash, k, Qundef) == Qundef) {
+ rb_hash_aset(hash, k, v);
}
}
return hash;
}
static VALUE
-rb_ary_and(ary1, ary2)
- VALUE ary1, ary2;
+ary_make_hash_by(VALUE ary)
+{
+ VALUE hash = ary_tmp_hash_new();
+ return ary_add_hash_by(hash, ary);
+}
+
+static inline void
+ary_recycle_hash(VALUE hash)
+{
+ if (RHASH(hash)->ntbl) {
+ st_table *tbl = RHASH(hash)->ntbl;
+ RHASH(hash)->ntbl = 0;
+ st_free_table(tbl);
+ }
+}
+
+/*
+ * call-seq:
+ * ary - other_ary -> new_ary
+ *
+ * Array Difference
+ *
+ * Returns a new array that is a copy of the original array, removing any
+ * items that also appear in +other_ary+.
+ *
+ * It compares elements using their hash (returned by the Object#hash method).
+ *
+ * [ 1, 1, 2, 2, 3, 3, 4, 5 ] - [ 1, 2, 4 ] #=> [ 3, 3, 5 ]
+ *
+ * If you need set-like behavior, see the library class Set.
+ */
+
+static VALUE
+rb_ary_diff(VALUE ary1, VALUE ary2)
{
- VALUE hash;
- VALUE ary3 = rb_ary_new();
+ VALUE ary3;
+ volatile VALUE hash;
+ long i;
+
+ hash = ary_make_hash(to_ary(ary2));
+ ary3 = rb_ary_new();
+
+ for (i=0; i<RARRAY_LEN(ary1); i++) {
+ if (st_lookup(RHASH_TBL(hash), RARRAY_PTR(ary1)[i], 0)) continue;
+ rb_ary_push(ary3, rb_ary_elt(ary1, i));
+ }
+ ary_recycle_hash(hash);
+ return ary3;
+}
+
+/*
+ * call-seq:
+ * ary & other_ary -> new_ary
+ *
+ * Set Intersection --- Returns a new array containing elements common to the
+ * two arrays, excluding any duplicates.
+ *
+ * [ 1, 1, 3, 5 ] & [ 1, 2, 3 ] #=> [ 1, 3 ]
+ * [ 'a', 'b', 'b', 'z' ] & [ 'a', 'b', 'c' ] #=> [ 'a', 'b' ]
+ *
+ * See also Array#uniq.
+ */
+
+
+static VALUE
+rb_ary_and(VALUE ary1, VALUE ary2)
+{
+ VALUE hash, ary3, v;
+ st_data_t vv;
long i;
ary2 = to_ary(ary2);
- hash = ary_make_hash(ary2, 0);
+ ary3 = rb_ary_new2(RARRAY_LEN(ary1) < RARRAY_LEN(ary2) ?
+ RARRAY_LEN(ary1) : RARRAY_LEN(ary2));
+ hash = ary_make_hash(ary2);
+
+ if (RHASH_EMPTY_P(hash))
+ return ary3;
- for (i=0; i<RARRAY(ary1)->len; i++) {
- VALUE v = RARRAY(ary1)->ptr[i];
- if (st_delete(RHASH(hash)->tbl, &v, 0)) {
+ for (i=0; i<RARRAY_LEN(ary1); i++) {
+ vv = (st_data_t)(v = rb_ary_elt(ary1, i));
+ if (st_delete(RHASH_TBL(hash), &vv, 0)) {
rb_ary_push(ary3, v);
}
}
+ ary_recycle_hash(hash);
return ary3;
}
+/*
+ * call-seq:
+ * ary | other_ary -> new_ary
+ *
+ * Set Union --- Returns a new array by joining +ary+ with +other_ary+,
+ * excluding any duplicates.
+ *
+ * [ "a", "b", "c" ] | [ "c", "d", "a" ] #=> [ "a", "b", "c", "d" ]
+ *
+ * See also Array#uniq.
+ */
+
static VALUE
-rb_ary_or(ary1, ary2)
- VALUE ary1, ary2;
+rb_ary_or(VALUE ary1, VALUE ary2)
{
- VALUE hash;
- VALUE ary3 = rb_ary_new();
- VALUE v;
+ VALUE hash, ary3, v;
+ st_data_t vv;
long i;
ary2 = to_ary(ary2);
- hash = ary_make_hash(ary1, ary2);
+ ary3 = rb_ary_new2(RARRAY_LEN(ary1)+RARRAY_LEN(ary2));
+ hash = ary_add_hash(ary_make_hash(ary1), ary2);
- for (i=0; i<RARRAY(ary1)->len; i++) {
- v = RARRAY(ary1)->ptr[i];
- if (st_delete(RHASH(hash)->tbl, &v, 0)) {
+ for (i=0; i<RARRAY_LEN(ary1); i++) {
+ vv = (st_data_t)(v = rb_ary_elt(ary1, i));
+ if (st_delete(RHASH_TBL(hash), &vv, 0)) {
rb_ary_push(ary3, v);
}
}
- for (i=0; i<RARRAY(ary2)->len; i++) {
- v = RARRAY(ary2)->ptr[i];
- if (st_delete(RHASH(hash)->tbl, &v, 0)) {
+ for (i=0; i<RARRAY_LEN(ary2); i++) {
+ vv = (st_data_t)(v = rb_ary_elt(ary2, i));
+ if (st_delete(RHASH_TBL(hash), &vv, 0)) {
rb_ary_push(ary3, v);
}
}
-
+ ary_recycle_hash(hash);
return ary3;
}
-static VALUE
-rb_ary_uniq_bang(ary)
- VALUE ary;
+static int
+push_value(st_data_t key, st_data_t val, st_data_t ary)
{
- VALUE hash = ary_make_hash(ary, 0);
- VALUE *p, *q, *end;
+ rb_ary_push((VALUE)ary, (VALUE)val);
+ return ST_CONTINUE;
+}
- if (RARRAY(ary)->len == RHASH(hash)->tbl->num_entries) {
- return Qnil;
- }
+/*
+ * call-seq:
+ * ary.uniq! -> ary or nil
+ * ary.uniq! { |item| ... } -> ary or nil
+ *
+ * Removes duplicate elements from +self+.
+ *
+ * If a block is given, it will use the return value of the block for
+ * comparison.
+ *
+ * Returns +nil+ if no changes are made (that is, no duplicates are found).
+ *
+ * a = [ "a", "a", "b", "b", "c" ]
+ * a.uniq! # => ["a", "b", "c"]
+ *
+ * b = [ "a", "b", "c" ]
+ * b.uniq! # => nil
+ *
+ * c = [["student","sam"], ["student","george"], ["teacher","matz"]]
+ * c.uniq! { |s| s.first } # => [["student", "sam"], ["teacher", "matz"]]
+ *
+ */
- rb_ary_modify(ary);
- p = q = RARRAY(ary)->ptr;
- end = p + RARRAY(ary)->len;
- while (p < end) {
- VALUE v = *p++;
- if (st_delete(RHASH(hash)->tbl, &v, 0)) {
- *q++ = v;
+static VALUE
+rb_ary_uniq_bang(VALUE ary)
+{
+ VALUE hash, v;
+ long i, j;
+
+ rb_ary_modify_check(ary);
+ if (RARRAY_LEN(ary) <= 1)
+ return Qnil;
+ if (rb_block_given_p()) {
+ hash = ary_make_hash_by(ary);
+ if (RARRAY_LEN(ary) == (i = RHASH_SIZE(hash))) {
+ return Qnil;
+ }
+ ARY_SET_LEN(ary, 0);
+ if (ARY_SHARED_P(ary) && !ARY_EMBED_P(ary)) {
+ rb_ary_unshare(ary);
+ FL_SET_EMBED(ary);
+ }
+ ary_resize_capa(ary, i);
+ st_foreach(RHASH_TBL(hash), push_value, ary);
+ }
+ else {
+ hash = ary_make_hash(ary);
+ if (RARRAY_LEN(ary) == (long)RHASH_SIZE(hash)) {
+ return Qnil;
+ }
+ for (i=j=0; i<RARRAY_LEN(ary); i++) {
+ st_data_t vv = (st_data_t)(v = rb_ary_elt(ary, i));
+ if (st_delete(RHASH_TBL(hash), &vv, 0)) {
+ rb_ary_store(ary, j++, v);
+ }
}
+ ARY_SET_LEN(ary, j);
}
- RARRAY(ary)->len = (q - RARRAY(ary)->ptr);
+ ary_recycle_hash(hash);
return ary;
}
+/*
+ * call-seq:
+ * ary.uniq -> ary or nil
+ * ary.uniq { |item| ... } -> ary or nil
+ *
+ * Returns a new array by removing duplicate values in +self+.
+ *
+ * If a block is given, it will use the return value of the block for comparison.
+ *
+ * It compares elements using their hash (provided by the Object#hash method)
+ * then compares hashes with Object#eql?.
+ *
+ * a = [ "a", "a", "b", "b", "c" ]
+ * a.uniq # => ["a", "b", "c"]
+ *
+ * b = [["student","sam"], ["student","george"], ["teacher","matz"]]
+ * b.uniq { |s| s.first } # => [["student", "sam"], ["teacher", "matz"]]
+ *
+ */
+
static VALUE
-rb_ary_uniq(ary)
- VALUE ary;
+rb_ary_uniq(VALUE ary)
{
- ary = rb_obj_dup(ary);
- rb_ary_uniq_bang(ary);
- return ary;
+ VALUE hash, uniq, v;
+ long i;
+
+ if (RARRAY_LEN(ary) <= 1)
+ return rb_ary_dup(ary);
+ if (rb_block_given_p()) {
+ hash = ary_make_hash_by(ary);
+ uniq = ary_new(rb_obj_class(ary), RHASH_SIZE(hash));
+ st_foreach(RHASH_TBL(hash), push_value, uniq);
+ }
+ else {
+ hash = ary_make_hash(ary);
+ uniq = ary_new(rb_obj_class(ary), RHASH_SIZE(hash));
+ for (i=0; i<RARRAY_LEN(ary); i++) {
+ st_data_t vv = (st_data_t)(v = rb_ary_elt(ary, i));
+ if (st_delete(RHASH_TBL(hash), &vv, 0)) {
+ rb_ary_push(uniq, v);
+ }
+ }
+ }
+ ary_recycle_hash(hash);
+
+ return uniq;
}
+/*
+ * call-seq:
+ * ary.compact! -> ary or nil
+ *
+ * Removes +nil+ elements from the array.
+ *
+ * Returns +nil+ if no changes were made, otherwise returns the array.
+ *
+ * [ "a", nil, "b", nil, "c" ].compact! #=> [ "a", "b", "c" ]
+ * [ "a", "b", "c" ].compact! #=> nil
+ */
+
static VALUE
-rb_ary_compact_bang(ary)
- VALUE ary;
+rb_ary_compact_bang(VALUE ary)
{
VALUE *p, *t, *end;
+ long n;
rb_ary_modify(ary);
- p = t = RARRAY(ary)->ptr;
- end = p + RARRAY(ary)->len;
+ p = t = RARRAY_PTR(ary);
+ end = p + RARRAY_LEN(ary);
+
while (t < end) {
if (NIL_P(*t)) t++;
else *p++ = *t++;
}
- if (RARRAY(ary)->len == (p - RARRAY(ary)->ptr)) {
+ n = p - RARRAY_PTR(ary);
+ if (RARRAY_LEN(ary) == n) {
return Qnil;
}
- RARRAY(ary)->len = RARRAY(ary)->capa = (p - RARRAY(ary)->ptr);
- REALLOC_N(RARRAY(ary)->ptr, VALUE, RARRAY(ary)->len);
+ ARY_SET_LEN(ary, n);
+ if (n * 2 < ARY_CAPA(ary) && ARY_DEFAULT_SIZE * 2 < ARY_CAPA(ary)) {
+ ary_resize_capa(ary, n * 2);
+ }
return ary;
}
+/*
+ * call-seq:
+ * ary.compact -> new_ary
+ *
+ * Returns a copy of +self+ with all +nil+ elements removed.
+ *
+ * [ "a", nil, "b", nil, "c", nil ].compact
+ * #=> [ "a", "b", "c" ]
+ */
+
static VALUE
-rb_ary_compact(ary)
- VALUE ary;
+rb_ary_compact(VALUE ary)
{
- ary = rb_obj_dup(ary);
+ ary = rb_ary_dup(ary);
rb_ary_compact_bang(ary);
return ary;
}
+/*
+ * call-seq:
+ * ary.count -> int
+ * ary.count(obj) -> int
+ * ary.count { |item| block } -> int
+ *
+ * Returns the number of elements.
+ *
+ * If an argument is given, counts the number of elements which equal +obj+
+ * using <code>===</code>.
+ *
+ * If a block is given, counts the number of elements for which the block
+ * returns a true value.
+ *
+ * ary = [1, 2, 4, 2]
+ * ary.count #=> 4
+ * ary.count(2) #=> 2
+ * ary.count { |x| x%2 == 0 } #=> 3
+ *
+ */
+
static VALUE
-rb_ary_nitems(ary)
- VALUE ary;
+rb_ary_count(int argc, VALUE *argv, VALUE ary)
{
long n = 0;
- VALUE *p, *pend;
- p = RARRAY(ary)->ptr;
- pend = p + RARRAY(ary)->len;
- while (p < pend) {
- if (!NIL_P(*p)) n++;
- p++;
+ if (argc == 0) {
+ VALUE *p, *pend;
+
+ if (!rb_block_given_p())
+ return LONG2NUM(RARRAY_LEN(ary));
+
+ for (p = RARRAY_PTR(ary), pend = p + RARRAY_LEN(ary); p < pend; p++) {
+ if (RTEST(rb_yield(*p))) n++;
+ }
+ }
+ else {
+ VALUE obj, *p, *pend;
+
+ rb_scan_args(argc, argv, "1", &obj);
+ if (rb_block_given_p()) {
+ rb_warn("given block not used");
+ }
+ for (p = RARRAY_PTR(ary), pend = p + RARRAY_LEN(ary); p < pend; p++) {
+ if (rb_equal(*p, obj)) n++;
+ }
}
- return INT2NUM(n);
+
+ return LONG2NUM(n);
}
static VALUE
-rb_ary_flatten_bang(ary)
- VALUE ary;
+flatten(VALUE ary, int level, int *modified)
{
- long i;
- int mod = 0;
- VALUE flattening = Qnil;
+ long i = 0;
+ VALUE stack, result, tmp, elt;
+ st_table *memo;
+ st_data_t id;
+
+ stack = ary_new(0, ARY_DEFAULT_SIZE);
+ result = ary_new(0, RARRAY_LEN(ary));
+ memo = st_init_numtable();
+ st_insert(memo, (st_data_t)ary, (st_data_t)Qtrue);
+ *modified = 0;
+
+ while (1) {
+ while (i < RARRAY_LEN(ary)) {
+ elt = RARRAY_PTR(ary)[i++];
+ tmp = rb_check_array_type(elt);
+ if (RBASIC(result)->klass) {
+ rb_raise(rb_eRuntimeError, "flatten reentered");
+ }
+ if (NIL_P(tmp) || (level >= 0 && RARRAY_LEN(stack) / 2 >= level)) {
+ rb_ary_push(result, elt);
+ }
+ else {
+ *modified = 1;
+ id = (st_data_t)tmp;
+ if (st_lookup(memo, id, 0)) {
+ st_free_table(memo);
+ rb_raise(rb_eArgError, "tried to flatten recursive array");
+ }
+ st_insert(memo, id, (st_data_t)Qtrue);
+ rb_ary_push(stack, ary);
+ rb_ary_push(stack, LONG2NUM(i));
+ ary = tmp;
+ i = 0;
+ }
+ }
+ if (RARRAY_LEN(stack) == 0) {
+ break;
+ }
+ id = (st_data_t)ary;
+ st_delete(memo, &id, 0);
+ tmp = rb_ary_pop(stack);
+ i = NUM2LONG(tmp);
+ ary = rb_ary_pop(stack);
+ }
+
+ st_free_table(memo);
+
+ RBASIC(result)->klass = rb_class_of(ary);
+ return result;
+}
+
+/*
+ * call-seq:
+ * ary.flatten! -> Array or nil
+ * ary.flatten!(level) -> Array or nil
+ *
+ * Flattens +self+ in place.
+ *
+ * Returns +nil+ if no modifications were made (i.e., the array contains no
+ * subarrays.)
+ *
+ * The optional +level+ argument determines the level of recursion to flatten.
+ *
+ * a = [ 1, 2, [3, [4, 5] ] ]
+ * a.flatten! #=> [1, 2, 3, 4, 5]
+ * a.flatten! #=> nil
+ * a #=> [1, 2, 3, 4, 5]
+ * a = [ 1, 2, [3, [4, 5] ] ]
+ * a.flatten!(1) #=> [1, 2, 3, [4, 5]]
+ */
+
+static VALUE
+rb_ary_flatten_bang(int argc, VALUE *argv, VALUE ary)
+{
+ int mod = 0, level = -1;
+ VALUE result, lv;
+
+ rb_scan_args(argc, argv, "01", &lv);
+ rb_ary_modify_check(ary);
+ if (!NIL_P(lv)) level = NUM2INT(lv);
+ if (level == 0) return Qnil;
+
+ result = flatten(ary, level, &mod);
+ if (mod == 0) {
+ ary_discard(result);
+ return Qnil;
+ }
+ if (!(mod = ARY_EMBED_P(result))) rb_obj_freeze(result);
+ rb_ary_replace(ary, result);
+ if (mod) ARY_SET_EMBED_LEN(result, 0);
+
+ return ary;
+}
+/*
+ * call-seq:
+ * ary.flatten -> new_ary
+ * ary.flatten(level) -> new_ary
+ *
+ * Returns a new array that is a one-dimensional flattening of +self+
+ * (recursively).
+ *
+ * That is, for every element that is an array, extract its elements into
+ * the new array.
+ *
+ * The optional +level+ argument determines the level of recursion to
+ * flatten.
+ *
+ * s = [ 1, 2, 3 ] #=> [1, 2, 3]
+ * t = [ 4, 5, 6, [7, 8] ] #=> [4, 5, 6, [7, 8]]
+ * a = [ s, t, 9, 10 ] #=> [[1, 2, 3], [4, 5, 6, [7, 8]], 9, 10]
+ * a.flatten #=> [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
+ * a = [ 1, 2, [3, [4, 5] ] ]
+ * a.flatten(1) #=> [1, 2, 3, [4, 5]]
+ */
+
+static VALUE
+rb_ary_flatten(int argc, VALUE *argv, VALUE ary)
+{
+ int mod = 0, level = -1;
+ VALUE result, lv;
+
+ rb_scan_args(argc, argv, "01", &lv);
+ if (!NIL_P(lv)) level = NUM2INT(lv);
+ if (level == 0) return ary_make_shared_copy(ary);
+
+ result = flatten(ary, level, &mod);
+ OBJ_INFECT(result, ary);
+
+ return result;
+}
+
+#define OPTHASH_GIVEN_P(opts) \
+ (argc > 0 && !NIL_P((opts) = rb_check_hash_type(argv[argc-1])) && (--argc, 1))
+static VALUE sym_random;
+
+#define RAND_UPTO(max) (long)rb_random_ulong_limited((randgen), (max)-1)
+
+/*
+ * call-seq:
+ * ary.shuffle! -> ary
+ * ary.shuffle!(random: rng) -> ary
+ *
+ * Shuffles elements in +self+ in place.
+ *
+ * The optional +rng+ argument will be used as random number generator.
+ */
+
+static VALUE
+rb_ary_shuffle_bang(int argc, VALUE *argv, VALUE ary)
+{
+ VALUE *ptr, opts, *snap_ptr, randgen = rb_cRandom;
+ long i, snap_len;
+
+ if (OPTHASH_GIVEN_P(opts)) {
+ randgen = rb_hash_lookup2(opts, sym_random, randgen);
+ }
+ rb_check_arity(argc, 0, 0);
rb_ary_modify(ary);
- for (i=0; i<RARRAY(ary)->len; i++) {
- VALUE ary2 = RARRAY(ary)->ptr[i];
- if (TYPE(ary2) == T_ARRAY) {
- if (ary == ary2) {
- ary2 = Qnil;
- } else {
- VALUE id;
-
- if (NIL_P(flattening)) {
- flattening = rb_ary_new();
+ i = RARRAY_LEN(ary);
+ ptr = RARRAY_PTR(ary);
+ snap_len = i;
+ snap_ptr = ptr;
+ while (i) {
+ long j = RAND_UPTO(i);
+ VALUE tmp;
+ if (snap_len != RARRAY_LEN(ary) || snap_ptr != RARRAY_PTR(ary)) {
+ rb_raise(rb_eRuntimeError, "modified during shuffle");
+ }
+ tmp = ptr[--i];
+ ptr[i] = ptr[j];
+ ptr[j] = tmp;
+ }
+ return ary;
+}
+
+
+/*
+ * call-seq:
+ * ary.shuffle -> new_ary
+ * ary.shuffle(random: rng) -> new_ary
+ *
+ * Returns a new array with elements of +self+ shuffled.
+ *
+ * a = [ 1, 2, 3 ] #=> [1, 2, 3]
+ * a.shuffle #=> [2, 3, 1]
+ *
+ * The optional +rng+ argument will be used as the random number generator.
+ *
+ * a.shuffle(random: Random.new(1)) #=> [1, 3, 2]
+ */
+
+static VALUE
+rb_ary_shuffle(int argc, VALUE *argv, VALUE ary)
+{
+ ary = rb_ary_dup(ary);
+ rb_ary_shuffle_bang(argc, argv, ary);
+ return ary;
+}
+
+
+/*
+ * call-seq:
+ * ary.sample -> obj
+ * ary.sample(random: rng) -> obj
+ * ary.sample(n) -> new_ary
+ * ary.sample(n, random: rng) -> new_ary
+ *
+ * Choose a random element or +n+ random elements from the array.
+ *
+ * The elements are chosen by using random and unique indices into the array
+ * in order to ensure that an element doesn't repeat itself unless the array
+ * already contained duplicate elements.
+ *
+ * If the array is empty the first form returns +nil+ and the second form
+ * returns an empty array.
+ *
+ * The optional +rng+ argument will be used as the random number generator.
+ *
+ * a = [ 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 ]
+ * a.sample #=> 7
+ * a.sample(4) #=> [6, 4, 2, 5]
+ */
+
+
+static VALUE
+rb_ary_sample(int argc, VALUE *argv, VALUE ary)
+{
+ VALUE nv, result, *ptr;
+ VALUE opts, randgen = rb_cRandom;
+ long n, len, i, j, k, idx[10];
+ long rnds[numberof(idx)];
+
+ if (OPTHASH_GIVEN_P(opts)) {
+ randgen = rb_hash_lookup2(opts, sym_random, randgen);
+ }
+ ptr = RARRAY_PTR(ary);
+ len = RARRAY_LEN(ary);
+ if (argc == 0) {
+ if (len == 0) return Qnil;
+ if (len == 1) {
+ i = 0;
+ }
+ else {
+ i = RAND_UPTO(len);
+ if ((len = RARRAY_LEN(ary)) <= i) return Qnil;
+ ptr = RARRAY_PTR(ary);
+ }
+ return ptr[i];
+ }
+ rb_scan_args(argc, argv, "1", &nv);
+ n = NUM2LONG(nv);
+ if (n < 0) rb_raise(rb_eArgError, "negative sample number");
+ if (n > len) n = len;
+ if (n <= numberof(idx)) {
+ for (i = 0; i < n; ++i) {
+ rnds[i] = RAND_UPTO(len - i);
+ }
+ }
+ k = len;
+ len = RARRAY_LEN(ary);
+ ptr = RARRAY_PTR(ary);
+ if (len < k) {
+ if (n <= numberof(idx)) {
+ for (i = 0; i < n; ++i) {
+ if (rnds[i] >= len) {
+ return rb_ary_new2(0);
}
- id = rb_obj_id(ary2);
- if (rb_ary_includes(flattening, id)) {
- rb_raise(rb_eArgError, "tried to flatten recursive array");
+ }
+ }
+ }
+ if (n > len) n = len;
+ switch (n) {
+ case 0:
+ return rb_ary_new2(0);
+ case 1:
+ i = rnds[0];
+ return rb_ary_new4(1, &ptr[i]);
+ case 2:
+ i = rnds[0];
+ j = rnds[1];
+ if (j >= i) j++;
+ return rb_ary_new3(2, ptr[i], ptr[j]);
+ case 3:
+ i = rnds[0];
+ j = rnds[1];
+ k = rnds[2];
+ {
+ long l = j, g = i;
+ if (j >= i) l = i, g = ++j;
+ if (k >= l && (++k >= g)) ++k;
+ }
+ return rb_ary_new3(3, ptr[i], ptr[j], ptr[k]);
+ }
+ if (n <= numberof(idx)) {
+ VALUE *ptr_result;
+ long sorted[numberof(idx)];
+ sorted[0] = idx[0] = rnds[0];
+ for (i=1; i<n; i++) {
+ k = rnds[i];
+ for (j = 0; j < i; ++j) {
+ if (k < sorted[j]) break;
+ ++k;
+ }
+ memmove(&sorted[j+1], &sorted[j], sizeof(sorted[0])*(i-j));
+ sorted[j] = idx[i] = k;
+ }
+ result = rb_ary_new2(n);
+ ptr_result = RARRAY_PTR(result);
+ for (i=0; i<n; i++) {
+ ptr_result[i] = ptr[idx[i]];
+ }
+ }
+ else {
+ VALUE *ptr_result;
+ result = rb_ary_new4(len, ptr);
+ RBASIC(result)->klass = 0;
+ ptr_result = RARRAY_PTR(result);
+ RB_GC_GUARD(ary);
+ for (i=0; i<n; i++) {
+ j = RAND_UPTO(len-i) + i;
+ nv = ptr_result[j];
+ ptr_result[j] = ptr_result[i];
+ ptr_result[i] = nv;
+ }
+ RBASIC(result)->klass = rb_cArray;
+ }
+ ARY_SET_LEN(result, n);
+
+ return result;
+}
+
+
+/*
+ * call-seq:
+ * ary.cycle(n=nil) { |obj| block } -> nil
+ * ary.cycle(n=nil) -> Enumerator
+ *
+ * Calls the given block for each element +n+ times or forever if +nil+ is
+ * given.
+ *
+ * Does nothing if a non-positive number is given or the array is empty.
+ *
+ * Returns +nil+ if the loop has finished without getting interrupted.
+ *
+ * If no block is given, an Enumerator is returned instead.
+ *
+ * a = ["a", "b", "c"]
+ * a.cycle { |x| puts x } # print, a, b, c, a, b, c,.. forever.
+ * a.cycle(2) { |x| puts x } # print, a, b, c, a, b, c.
+ *
+ */
+
+static VALUE
+rb_ary_cycle(int argc, VALUE *argv, VALUE ary)
+{
+ long n, i;
+ VALUE nv = Qnil;
+
+ rb_scan_args(argc, argv, "01", &nv);
+
+ RETURN_ENUMERATOR(ary, argc, argv);
+ if (NIL_P(nv)) {
+ n = -1;
+ }
+ else {
+ n = NUM2LONG(nv);
+ if (n <= 0) return Qnil;
+ }
+
+ while (RARRAY_LEN(ary) > 0 && (n < 0 || 0 < n--)) {
+ for (i=0; i<RARRAY_LEN(ary); i++) {
+ rb_yield(RARRAY_PTR(ary)[i]);
+ }
+ }
+ return Qnil;
+}
+
+#define tmpbuf(n, size) rb_str_tmp_new((n)*(size))
+#define tmpbuf_discard(s) (rb_str_resize((s), 0L), RBASIC(s)->klass = rb_cString)
+#define tmpary(n) rb_ary_tmp_new(n)
+#define tmpary_discard(a) (ary_discard(a), RBASIC(a)->klass = rb_cArray)
+
+/*
+ * Recursively compute permutations of +r+ elements of the set
+ * <code>[0..n-1]</code>.
+ *
+ * When we have a complete permutation of array indexes, copy the values
+ * at those indexes into a new array and yield that array.
+ *
+ * n: the size of the set
+ * r: the number of elements in each permutation
+ * p: the array (of size r) that we're filling in
+ * index: what index we're filling in now
+ * used: an array of booleans: whether a given index is already used
+ * values: the Ruby array that holds the actual values to permute
+ */
+static void
+permute0(long n, long r, long *p, long index, char *used, VALUE values)
+{
+ long i,j;
+ for (i = 0; i < n; i++) {
+ if (used[i] == 0) {
+ p[index] = i;
+ if (index < r-1) { /* if not done yet */
+ used[i] = 1; /* mark index used */
+ permute0(n, r, p, index+1, /* recurse */
+ used, values);
+ used[i] = 0; /* index unused */
+ }
+ else {
+ /* We have a complete permutation of array indexes */
+ /* Build a ruby array of the corresponding values */
+ /* And yield it to the associated block */
+ VALUE result = rb_ary_new2(r);
+ VALUE *result_array = RARRAY_PTR(result);
+ const VALUE *values_array = RARRAY_PTR(values);
+
+ for (j = 0; j < r; j++) result_array[j] = values_array[p[j]];
+ ARY_SET_LEN(result, r);
+ rb_yield(result);
+ if (RBASIC(values)->klass) {
+ rb_raise(rb_eRuntimeError, "permute reentered");
}
- rb_ary_push(flattening, id);
}
- rb_ary_replace(ary, i--, 1, ary2);
- mod = 1;
}
}
- if (mod == 0) return Qnil;
+}
+
+/*
+ * call-seq:
+ * ary.permutation { |p| block } -> ary
+ * ary.permutation -> Enumerator
+ * ary.permutation(n) { |p| block } -> ary
+ * ary.permutation(n) -> Enumerator
+ *
+ * When invoked with a block, yield all permutations of length +n+ of the
+ * elements of the array, then return the array itself.
+ *
+ * If +n+ is not specified, yield all permutations of all elements.
+ *
+ * The implementation makes no guarantees about the order in which the
+ * permutations are yielded.
+ *
+ * If no block is given, an Enumerator is returned instead.
+ *
+ * Examples:
+ *
+ * a = [1, 2, 3]
+ * a.permutation.to_a #=> [[1,2,3],[1,3,2],[2,1,3],[2,3,1],[3,1,2],[3,2,1]]
+ * a.permutation(1).to_a #=> [[1],[2],[3]]
+ * a.permutation(2).to_a #=> [[1,2],[1,3],[2,1],[2,3],[3,1],[3,2]]
+ * a.permutation(3).to_a #=> [[1,2,3],[1,3,2],[2,1,3],[2,3,1],[3,1,2],[3,2,1]]
+ * a.permutation(0).to_a #=> [[]] # one permutation of length 0
+ * a.permutation(4).to_a #=> [] # no permutations of length 4
+ */
+
+static VALUE
+rb_ary_permutation(int argc, VALUE *argv, VALUE ary)
+{
+ VALUE num;
+ long r, n, i;
+
+ n = RARRAY_LEN(ary); /* Array length */
+ RETURN_ENUMERATOR(ary, argc, argv); /* Return Enumerator if no block */
+ rb_scan_args(argc, argv, "01", &num);
+ r = NIL_P(num) ? n : NUM2LONG(num); /* Permutation size from argument */
+
+ if (r < 0 || n < r) {
+ /* no permutations: yield nothing */
+ }
+ else if (r == 0) { /* exactly one permutation: the zero-length array */
+ rb_yield(rb_ary_new2(0));
+ }
+ else if (r == 1) { /* this is a special, easy case */
+ for (i = 0; i < RARRAY_LEN(ary); i++) {
+ rb_yield(rb_ary_new3(1, RARRAY_PTR(ary)[i]));
+ }
+ }
+ else { /* this is the general case */
+ volatile VALUE t0 = tmpbuf(n,sizeof(long));
+ long *p = (long*)RSTRING_PTR(t0);
+ volatile VALUE t1 = tmpbuf(n,sizeof(char));
+ char *used = (char*)RSTRING_PTR(t1);
+ VALUE ary0 = ary_make_shared_copy(ary); /* private defensive copy of ary */
+ RBASIC(ary0)->klass = 0;
+
+ MEMZERO(used, char, n); /* initialize array */
+
+ permute0(n, r, p, 0, used, ary0); /* compute and yield permutations */
+ tmpbuf_discard(t0);
+ tmpbuf_discard(t1);
+ RBASIC(ary0)->klass = rb_cArray;
+ }
return ary;
}
+/*
+ * call-seq:
+ * ary.combination(n) { |c| block } -> ary
+ * ary.combination(n) -> Enumerator
+ *
+ * When invoked with a block, yields all combinations of length +n+ of elements
+ * from the array and then returns the array itself.
+ *
+ * The implementation makes no guarantees about the order in which the
+ * combinations are yielded.
+ *
+ * If no block is given, an Enumerator is returned instead.
+ *
+ * Examples:
+ *
+ * a = [1, 2, 3, 4]
+ * a.combination(1).to_a #=> [[1],[2],[3],[4]]
+ * a.combination(2).to_a #=> [[1,2],[1,3],[1,4],[2,3],[2,4],[3,4]]
+ * a.combination(3).to_a #=> [[1,2,3],[1,2,4],[1,3,4],[2,3,4]]
+ * a.combination(4).to_a #=> [[1,2,3,4]]
+ * a.combination(0).to_a #=> [[]] # one combination of length 0
+ * a.combination(5).to_a #=> [] # no combinations of length 5
+ *
+ */
+
static VALUE
-rb_ary_flatten(ary)
- VALUE ary;
+rb_ary_combination(VALUE ary, VALUE num)
+{
+ long n, i, len;
+
+ n = NUM2LONG(num);
+ RETURN_ENUMERATOR(ary, 1, &num);
+ len = RARRAY_LEN(ary);
+ if (n < 0 || len < n) {
+ /* yield nothing */
+ }
+ else if (n == 0) {
+ rb_yield(rb_ary_new2(0));
+ }
+ else if (n == 1) {
+ for (i = 0; i < len; i++) {
+ rb_yield(rb_ary_new3(1, RARRAY_PTR(ary)[i]));
+ }
+ }
+ else {
+ volatile VALUE t0 = tmpbuf(n+1, sizeof(long));
+ long *stack = (long*)RSTRING_PTR(t0);
+ volatile VALUE cc = tmpary(n);
+ VALUE *chosen = RARRAY_PTR(cc);
+ long lev = 0;
+
+ MEMZERO(stack, long, n);
+ stack[0] = -1;
+ for (;;) {
+ chosen[lev] = RARRAY_PTR(ary)[stack[lev+1]];
+ for (lev++; lev < n; lev++) {
+ chosen[lev] = RARRAY_PTR(ary)[stack[lev+1] = stack[lev]+1];
+ }
+ rb_yield(rb_ary_new4(n, chosen));
+ if (RBASIC(t0)->klass) {
+ rb_raise(rb_eRuntimeError, "combination reentered");
+ }
+ do {
+ if (lev == 0) goto done;
+ stack[lev--]++;
+ } while (stack[lev+1]+n == len+lev+1);
+ }
+ done:
+ tmpbuf_discard(t0);
+ tmpary_discard(cc);
+ }
+ return ary;
+}
+
+/*
+ * Recursively compute repeated permutations of +r+ elements of the set
+ * <code>[0..n-1]</code>.
+ *
+ * When we have a complete repeated permutation of array indexes, copy the
+ * values at those indexes into a new array and yield that array.
+ *
+ * n: the size of the set
+ * r: the number of elements in each permutation
+ * p: the array (of size r) that we're filling in
+ * index: what index we're filling in now
+ * values: the Ruby array that holds the actual values to permute
+ */
+static void
+rpermute0(long n, long r, long *p, long index, VALUE values)
+{
+ long i, j;
+ for (i = 0; i < n; i++) {
+ p[index] = i;
+ if (index < r-1) { /* if not done yet */
+ rpermute0(n, r, p, index+1, values); /* recurse */
+ }
+ else {
+ /* We have a complete permutation of array indexes */
+ /* Build a ruby array of the corresponding values */
+ /* And yield it to the associated block */
+ VALUE result = rb_ary_new2(r);
+ VALUE *result_array = RARRAY_PTR(result);
+ const VALUE *values_array = RARRAY_PTR(values);
+
+ for (j = 0; j < r; j++) result_array[j] = values_array[p[j]];
+ ARY_SET_LEN(result, r);
+ rb_yield(result);
+ if (RBASIC(values)->klass) {
+ rb_raise(rb_eRuntimeError, "repeated permute reentered");
+ }
+ }
+ }
+}
+
+/*
+ * call-seq:
+ * ary.repeated_permutation(n) { |p| block } -> ary
+ * ary.repeated_permutation(n) -> Enumerator
+ *
+ * When invoked with a block, yield all repeated permutations of length +n+ of
+ * the elements of the array, then return the array itself.
+ *
+ * The implementation makes no guarantees about the order in which the repeated
+ * permutations are yielded.
+ *
+ * If no block is given, an Enumerator is returned instead.
+ *
+ * Examples:
+ *
+ * a = [1, 2]
+ * a.repeated_permutation(1).to_a #=> [[1], [2]]
+ * a.repeated_permutation(2).to_a #=> [[1,1],[1,2],[2,1],[2,2]]
+ * a.repeated_permutation(3).to_a #=> [[1,1,1],[1,1,2],[1,2,1],[1,2,2],
+ * # [2,1,1],[2,1,2],[2,2,1],[2,2,2]]
+ * a.repeated_permutation(0).to_a #=> [[]] # one permutation of length 0
+ */
+
+static VALUE
+rb_ary_repeated_permutation(VALUE ary, VALUE num)
{
- ary = rb_obj_dup(ary);
- rb_ary_flatten_bang(ary);
+ long r, n, i;
+
+ n = RARRAY_LEN(ary); /* Array length */
+ RETURN_ENUMERATOR(ary, 1, &num); /* Return Enumerator if no block */
+ r = NUM2LONG(num); /* Permutation size from argument */
+
+ if (r < 0) {
+ /* no permutations: yield nothing */
+ }
+ else if (r == 0) { /* exactly one permutation: the zero-length array */
+ rb_yield(rb_ary_new2(0));
+ }
+ else if (r == 1) { /* this is a special, easy case */
+ for (i = 0; i < RARRAY_LEN(ary); i++) {
+ rb_yield(rb_ary_new3(1, RARRAY_PTR(ary)[i]));
+ }
+ }
+ else { /* this is the general case */
+ volatile VALUE t0 = tmpbuf(r, sizeof(long));
+ long *p = (long*)RSTRING_PTR(t0);
+ VALUE ary0 = ary_make_shared_copy(ary); /* private defensive copy of ary */
+ RBASIC(ary0)->klass = 0;
+
+ rpermute0(n, r, p, 0, ary0); /* compute and yield repeated permutations */
+ tmpbuf_discard(t0);
+ RBASIC(ary0)->klass = rb_cArray;
+ }
return ary;
}
+static void
+rcombinate0(long n, long r, long *p, long index, long rest, VALUE values)
+{
+ long j;
+ if (rest > 0) {
+ for (; index < n; ++index) {
+ p[r-rest] = index;
+ rcombinate0(n, r, p, index, rest-1, values);
+ }
+ }
+ else {
+ VALUE result = rb_ary_new2(r);
+ VALUE *result_array = RARRAY_PTR(result);
+ const VALUE *values_array = RARRAY_PTR(values);
+
+ for (j = 0; j < r; ++j) result_array[j] = values_array[p[j]];
+ ARY_SET_LEN(result, r);
+ rb_yield(result);
+ if (RBASIC(values)->klass) {
+ rb_raise(rb_eRuntimeError, "repeated combination reentered");
+ }
+ }
+}
+
+/*
+ * call-seq:
+ * ary.repeated_combination(n) { |c| block } -> ary
+ * ary.repeated_combination(n) -> Enumerator
+ *
+ * When invoked with a block, yields all repeated combinations of length +n+ of
+ * elements from the array and then returns the array itself.
+ *
+ * The implementation makes no guarantees about the order in which the repeated
+ * combinations are yielded.
+ *
+ * If no block is given, an Enumerator is returned instead.
+ *
+ * Examples:
+ *
+ * a = [1, 2, 3]
+ * a.repeated_combination(1).to_a #=> [[1], [2], [3]]
+ * a.repeated_combination(2).to_a #=> [[1,1],[1,2],[1,3],[2,2],[2,3],[3,3]]
+ * a.repeated_combination(3).to_a #=> [[1,1,1],[1,1,2],[1,1,3],[1,2,2],[1,2,3],
+ * # [1,3,3],[2,2,2],[2,2,3],[2,3,3],[3,3,3]]
+ * a.repeated_combination(4).to_a #=> [[1,1,1,1],[1,1,1,2],[1,1,1,3],[1,1,2,2],[1,1,2,3],
+ * # [1,1,3,3],[1,2,2,2],[1,2,2,3],[1,2,3,3],[1,3,3,3],
+ * # [2,2,2,2],[2,2,2,3],[2,2,3,3],[2,3,3,3],[3,3,3,3]]
+ * a.repeated_combination(0).to_a #=> [[]] # one combination of length 0
+ *
+ */
+
+static VALUE
+rb_ary_repeated_combination(VALUE ary, VALUE num)
+{
+ long n, i, len;
+
+ n = NUM2LONG(num); /* Combination size from argument */
+ RETURN_ENUMERATOR(ary, 1, &num); /* Return Enumerator if no block */
+ len = RARRAY_LEN(ary);
+ if (n < 0) {
+ /* yield nothing */
+ }
+ else if (n == 0) {
+ rb_yield(rb_ary_new2(0));
+ }
+ else if (n == 1) {
+ for (i = 0; i < len; i++) {
+ rb_yield(rb_ary_new3(1, RARRAY_PTR(ary)[i]));
+ }
+ }
+ else if (len == 0) {
+ /* yield nothing */
+ }
+ else {
+ volatile VALUE t0 = tmpbuf(n, sizeof(long));
+ long *p = (long*)RSTRING_PTR(t0);
+ VALUE ary0 = ary_make_shared_copy(ary); /* private defensive copy of ary */
+ RBASIC(ary0)->klass = 0;
+
+ rcombinate0(len, n, p, 0, n, ary0); /* compute and yield repeated combinations */
+ tmpbuf_discard(t0);
+ RBASIC(ary0)->klass = rb_cArray;
+ }
+ return ary;
+}
+
+/*
+ * call-seq:
+ * ary.product(other_ary, ...) -> new_ary
+ * ary.product(other_ary, ...) { |p| block } -> ary
+ *
+ * Returns an array of all combinations of elements from all arrays.
+ *
+ * The length of the returned array is the product of the length of +self+ and
+ * the argument arrays.
+ *
+ * If given a block, #product will yield all combinations and return +self+
+ * instead.
+ *
+ * [1,2,3].product([4,5]) #=> [[1,4],[1,5],[2,4],[2,5],[3,4],[3,5]]
+ * [1,2].product([1,2]) #=> [[1,1],[1,2],[2,1],[2,2]]
+ * [1,2].product([3,4],[5,6]) #=> [[1,3,5],[1,3,6],[1,4,5],[1,4,6],
+ * # [2,3,5],[2,3,6],[2,4,5],[2,4,6]]
+ * [1,2].product() #=> [[1],[2]]
+ * [1,2].product([]) #=> []
+ */
+
+static VALUE
+rb_ary_product(int argc, VALUE *argv, VALUE ary)
+{
+ int n = argc+1; /* How many arrays we're operating on */
+ volatile VALUE t0 = tmpary(n);
+ volatile VALUE t1 = tmpbuf(n, sizeof(int));
+ VALUE *arrays = RARRAY_PTR(t0); /* The arrays we're computing the product of */
+ int *counters = (int*)RSTRING_PTR(t1); /* The current position in each one */
+ VALUE result = Qnil; /* The array we'll be returning, when no block given */
+ long i,j;
+ long resultlen = 1;
+
+ RBASIC(t0)->klass = 0;
+ RBASIC(t1)->klass = 0;
+
+ /* initialize the arrays of arrays */
+ ARY_SET_LEN(t0, n);
+ arrays[0] = ary;
+ for (i = 1; i < n; i++) arrays[i] = Qnil;
+ for (i = 1; i < n; i++) arrays[i] = to_ary(argv[i-1]);
+
+ /* initialize the counters for the arrays */
+ for (i = 0; i < n; i++) counters[i] = 0;
+
+ /* Otherwise, allocate and fill in an array of results */
+ if (rb_block_given_p()) {
+ /* Make defensive copies of arrays; exit if any is empty */
+ for (i = 0; i < n; i++) {
+ if (RARRAY_LEN(arrays[i]) == 0) goto done;
+ arrays[i] = ary_make_shared_copy(arrays[i]);
+ }
+ }
+ else {
+ /* Compute the length of the result array; return [] if any is empty */
+ for (i = 0; i < n; i++) {
+ long k = RARRAY_LEN(arrays[i]), l = resultlen;
+ if (k == 0) {
+ result = rb_ary_new2(0);
+ goto done;
+ }
+ resultlen *= k;
+ if (resultlen < k || resultlen < l || resultlen / k != l) {
+ rb_raise(rb_eRangeError, "too big to product");
+ }
+ }
+ result = rb_ary_new2(resultlen);
+ }
+ for (;;) {
+ int m;
+ /* fill in one subarray */
+ VALUE subarray = rb_ary_new2(n);
+ for (j = 0; j < n; j++) {
+ rb_ary_push(subarray, rb_ary_entry(arrays[j], counters[j]));
+ }
+
+ /* put it on the result array */
+ if(NIL_P(result)) {
+ FL_SET(t0, FL_USER5);
+ rb_yield(subarray);
+ if (! FL_TEST(t0, FL_USER5)) {
+ rb_raise(rb_eRuntimeError, "product reentered");
+ }
+ else {
+ FL_UNSET(t0, FL_USER5);
+ }
+ }
+ else {
+ rb_ary_push(result, subarray);
+ }
+
+ /*
+ * Increment the last counter. If it overflows, reset to 0
+ * and increment the one before it.
+ */
+ m = n-1;
+ counters[m]++;
+ while (counters[m] == RARRAY_LEN(arrays[m])) {
+ counters[m] = 0;
+ /* If the first counter overflows, we are done */
+ if (--m < 0) goto done;
+ counters[m]++;
+ }
+ }
+done:
+ tmpary_discard(t0);
+ tmpbuf_discard(t1);
+
+ return NIL_P(result) ? ary : result;
+}
+
+/*
+ * call-seq:
+ * ary.take(n) -> new_ary
+ *
+ * Returns first +n+ elements from the array.
+ *
+ * If a non-positive number is given, raises an ArgumentError.
+ *
+ * See also Array#drop
+ *
+ * a = [1, 2, 3, 4, 5, 0]
+ * a.take(3) #=> [1, 2, 3]
+ *
+ */
+
+static VALUE
+rb_ary_take(VALUE obj, VALUE n)
+{
+ long len = NUM2LONG(n);
+ if (len < 0) {
+ rb_raise(rb_eArgError, "attempt to take negative size");
+ }
+ return rb_ary_subseq(obj, 0, len);
+}
+
+/*
+ * call-seq:
+ * ary.take_while { |arr| block } -> new_ary
+ * ary.take_while -> Enumerator
+ *
+ * Passes elements to the block until the block returns +nil+ or +false+, then
+ * stops iterating and returns an array of all prior elements.
+ *
+ * If no block is given, an Enumerator is returned instead.
+ *
+ * See also Array#drop_while
+ *
+ * a = [1, 2, 3, 4, 5, 0]
+ * a.take_while { |i| i < 3 } #=> [1, 2]
+ *
+ */
+
+static VALUE
+rb_ary_take_while(VALUE ary)
+{
+ long i;
+
+ RETURN_ENUMERATOR(ary, 0, 0);
+ for (i = 0; i < RARRAY_LEN(ary); i++) {
+ if (!RTEST(rb_yield(RARRAY_PTR(ary)[i]))) break;
+ }
+ return rb_ary_take(ary, LONG2FIX(i));
+}
+
+/*
+ * call-seq:
+ * ary.drop(n) -> new_ary
+ *
+ * Drops first +n+ elements from +ary+ and returns the rest of the elements in
+ * an array.
+ *
+ * If a non-positive number is given, raises an ArgumentError.
+ *
+ * See also Array#take
+ *
+ * a = [1, 2, 3, 4, 5, 0]
+ * a.drop(3) #=> [4, 5, 0]
+ *
+ */
+
+static VALUE
+rb_ary_drop(VALUE ary, VALUE n)
+{
+ VALUE result;
+ long pos = NUM2LONG(n);
+ if (pos < 0) {
+ rb_raise(rb_eArgError, "attempt to drop negative size");
+ }
+
+ result = rb_ary_subseq(ary, pos, RARRAY_LEN(ary));
+ if (result == Qnil) result = rb_ary_new();
+ return result;
+}
+
+/*
+ * call-seq:
+ * ary.drop_while { |arr| block } -> new_ary
+ * ary.drop_while -> Enumerator
+ *
+ * Drops elements up to, but not including, the first element for which the
+ * block returns +nil+ or +false+ and returns an array containing the
+ * remaining elements.
+ *
+ * If no block is given, an Enumerator is returned instead.
+ *
+ * See also Array#take_while
+ *
+ * a = [1, 2, 3, 4, 5, 0]
+ * a.drop_while {|i| i < 3 } #=> [3, 4, 5, 0]
+ *
+ */
+
+static VALUE
+rb_ary_drop_while(VALUE ary)
+{
+ long i;
+
+ RETURN_ENUMERATOR(ary, 0, 0);
+ for (i = 0; i < RARRAY_LEN(ary); i++) {
+ if (!RTEST(rb_yield(RARRAY_PTR(ary)[i]))) break;
+ }
+ return rb_ary_drop(ary, LONG2FIX(i));
+}
+
+/*
+ * Arrays are ordered, integer-indexed collections of any object.
+ *
+ * Array indexing starts at 0, as in C or Java. A negative index is assumed
+ * to be relative to the end of the array---that is, an index of -1 indicates
+ * the last element of the array, -2 is the next to last element in the
+ * array, and so on.
+ *
+ * == Creating Arrays
+ *
+ * A new array can be created by using the literal constructor
+ * <code>[]</code>. Arrays can contain different types of objects. For
+ * example, the array below contains an Integer, a String and a Float:
+ *
+ * ary = [1, "two", 3.0] #=> [1, "two", 3.0]
+ *
+ * An array can also be created by explicitly calling Array.new with zero, one
+ * (the initial size of the Array) or two arguments (the initial size and a
+ * default object).
+ *
+ * ary = Array.new #=> []
+ * Array.new(3) #=> [nil, nil, nil]
+ * Array.new(3, true) #=> [0, 0, 0]
+ *
+ * Note that the second argument populates the array with references the same
+ * object. Therefore, it is only recommended in cases when you need to
+ * instantiate arrays with natively immutable objects such Symbols, numbers,
+ * true or false.
+ *
+ * To create an array with separate objects a block can be passed instead.
+ * This method is safe to use with mutable objects such as hashes, strings or
+ * other arrays:
+ *
+ * Array.new(4) { Hash.new } #=> [{}, {}, {}, {}]
+ *
+ * This is also a quick way to build up multi-dimensional arrays:
+ *
+ * empty_table = Array.new(3) { Array.new(3) }
+ * #=> [[nil, nil, nil], [nil, nil, nil], [nil, nil, nil]]
+ *
+ * == Example Usage
+ *
+ * In addition to the methods it mixes in through the Enumerable module, the
+ * Array class has proprietary methods for accessing, searching and otherwise
+ * manipulating arrays.
+ *
+ * Some of the more common ones are illustrated below.
+ *
+ * == Accessing Elements
+ *
+ * Elements in an array can be retrieved using the Array#[] method. It can
+ * take a single integer argument (a numeric index), a pair of arguments
+ * (start and length) or a range.
+ *
+ * arr = [1, 2, 3, 4, 5, 6]
+ * arr[2] #=> 3
+ * arr[100] #=> nil
+ * arr[-3] #=> 4
+ * arr[2, 3] #=> [3, 4, 5]
+ * arr[1..4] #=> [2, 3, 4, 5]
+ *
+ * Another way to access a particular array element is by using the #at method
+ *
+ * arr.at(0) #=> 1
+ *
+ * The #slice method works in an identical manner to Array#[].
+ *
+ * To raise an error for indices outside of the array bounds or else to
+ * provide a default value when that happens, you can use #fetch.
+ *
+ * arr = ['a', 'b', 'c', 'd', 'e', 'f']
+ * arr.fetch(100) #=> IndexError: index 100 outside of array bounds: -6...6
+ * arr.fetch(100, "oops") #=> "oops"
+ *
+ * The special methods #first and #last will return the first and last
+ * elements of an array, respectively.
+ *
+ * arr.first #=> 1
+ * arr.last #=> 6
+ *
+ * To return the first +n+ elements of an array, use #take
+ *
+ * arr.take(3) #=> [1, 2, 3]
+ *
+ * #drop does the opposite of #take, by returning the elements after +n+
+ * elements have been dropped:
+ *
+ * arr.drop(3) #=> [4, 5, 6]
+ *
+ * == Obtaining Information about an Array
+ *
+ * Arrays keep track of their own length at all times. To query an array
+ * about the number of elements it contains, use #length, #count or #size.
+ *
+ * browsers = ['Chrome', 'Firefox', 'Safari', 'Opera', 'IE']
+ * browsers.length #=> 5
+ * browsers.count #=> 5
+ *
+ * To check whether an array contains any elements at all
+ *
+ * browsers.empty? #=> false
+ *
+ * To check whether a particular item is included in the array
+ *
+ * browsers.include?('Konqueror') #=> false
+ *
+ * == Adding Items to Arrays
+ *
+ * Items can be added to the end of an array by using either #push or #<<
+ *
+ * arr = [1, 2, 3, 4]
+ * arr.push(5) #=> [1, 2, 3, 4, 5]
+ * arr << 6 #=> [1, 2, 3, 4, 5, 6]
+ *
+ * #unshift will add a new item to the beginning of an array.
+ *
+ * arr.unshift(0) #=> [0, 1, 2, 3, 4, 5, 6]
+ *
+ * With #insert you can add a new element to an array at any position.
+ *
+ * arr.insert(3, 'apple') #=> [0, 1, 2, 'apple', 3, 4, 5, 6]
+ *
+ * Using the #insert method, you can also insert multiple values at once:
+ *
+ * arr.insert(3, 'orange', 'pear', 'grapefruit')
+ * #=> [0, 1, 2, "orange", "pear", "grapefruit", "apple", 3, 4, 5, 6]
+ *
+ * == Removing Items from an Array
+ *
+ * The method #pop removes the last element in an array and returns it:
+ *
+ * arr = [1, 2, 3, 4, 5, 6]
+ * arr.pop #=> 6
+ * arr #=> [1, 2, 3, 4, 5]
+ *
+ * To retrieve and at the same time remove the first item, use #shift:
+ *
+ * arr.shift #=> 1
+ * arr #=> [2, 3, 4, 5]
+ *
+ * To delete an element at a particular index:
+ *
+ * arr.delete_at(2) #=> 4
+ * arr #=> [2, 3, 5]
+ *
+ * To delete a particular element anywhere in an array, use #delete:
+ *
+ * arr = [1, 2, 2, 3]
+ * arr.delete(2) #=> [1, 3]
+ *
+ * A useful method if you need to remove +nil+ values from an array is
+ * #compact:
+ *
+ * arr = ['foo', 0, nil, 'bar', 7, 'baz', nil]
+ * arr.compact #=> ['foo', 0, 'bar', 7, 'baz']
+ * arr #=> ['foo', 0, nil, 'bar', 7, 'baz', nil]
+ * arr.compact! #=> ['foo', 0, 'bar', 7, 'baz']
+ * arr #=> ['foo', 0, 'bar', 7, 'baz']
+ *
+ * Another common need is to remove duplicate elements from an array.
+ *
+ * It has the non-destructive #uniq, and destructive method #uniq!
+ *
+ * arr = [2, 5, 6, 556, 6, 6, 8, 9, 0, 123, 556]
+ * arr.uniq #=> [2, 5, 6, 556, 8, 9, 0, 123]
+ *
+ * == Iterating over Arrays
+ *
+ * Like all classes that include the Enumerable module, Array has an each
+ * method, which defines what elements should be iterated over and how. In
+ * case of Array's #each, all elements in the Array instance are yielded to
+ * the supplied block in sequence.
+ *
+ * Note that this operation leaves the array unchanged.
+ *
+ * arr = [1, 2, 3, 4, 5]
+ * arr.each { |a| print a -= 10, " " }
+ * # prints: -9 -8 -7 -6 -5
+ * #=> [1, 2, 3, 4, 5]
+ *
+ * Another sometimes useful iterator is #reverse_each which will iterate over
+ * the elements in the array in reverse order.
+ *
+ * words = %w[rats live on no evil star]
+ * str = ""
+ * words.reverse_each { |word| str += "#{word.reverse} " }
+ * str #=> "rats live on no evil star "
+ *
+ * The #map method can be used to create a new array based on the original
+ * array, but with the values modified by the supplied block:
+ *
+ * arr.map { |a| 2*a } #=> [2, 4, 6, 8, 10]
+ * arr #=> [1, 2, 3, 4, 5]
+ * arr.map! { |a| a**2 } #=> [1, 4, 9, 16, 25]
+ * arr #=> [1, 4, 9, 16, 25]
+ *
+ * == Selecting Items from an Array
+ *
+ * Elements can be selected from an array according to criteria defined in a
+ * block. The selection can happen in a destructive or a non-destructive
+ * manner. While the destructive operations will modify the array they were
+ * called on, the non-destructive methods usually return a new array with the
+ * selected elements, but leave the original array unchanged.
+ *
+ * === Non-destructive Selection
+ *
+ * arr = [1, 2, 3, 4, 5, 6]
+ * arr.select { |a| a > 3 } #=> [4, 5, 6]
+ * arr.reject { |a| a < 3 } #=> [4, 5, 6]
+ * arr.drop_while { |a| a < 4 } #=> [4, 5, 6]
+ * arr #=> [1, 2, 3, 4, 5, 6]
+ *
+ * === Destructive Selection
+ *
+ * #select! and #reject! are the corresponding destructive methods to #select
+ * and #reject
+ *
+ * Similar to #select vs. #reject, #delete_if and #keep_if have the exact
+ * opposite result when supplied with the same block:
+ *
+ * arr.delete_if { |a| a < 4 } #=> [4, 5, 6]
+ * arr #=> [4, 5, 6]
+ *
+ * arr = [1, 2, 3, 4, 5, 6]
+ * arr.keep_if { |a| a < 4 } #=> [1, 2, 3]
+ * arr #=> [1, 2, 3]
+ *
+ */
+
void
-Init_Array()
+Init_Array(void)
{
+#undef rb_intern
+#define rb_intern(str) rb_intern_const(str)
+
rb_cArray = rb_define_class("Array", rb_cObject);
rb_include_module(rb_cArray, rb_mEnumerable);
- rb_define_singleton_method(rb_cArray, "new", rb_ary_s_new, -1);
+ rb_define_alloc_func(rb_cArray, ary_alloc);
rb_define_singleton_method(rb_cArray, "[]", rb_ary_s_create, -1);
+ rb_define_singleton_method(rb_cArray, "try_convert", rb_ary_s_try_convert, 1);
rb_define_method(rb_cArray, "initialize", rb_ary_initialize, -1);
- rb_define_method(rb_cArray, "to_s", rb_ary_to_s, 0);
+ rb_define_method(rb_cArray, "initialize_copy", rb_ary_replace, 1);
+
rb_define_method(rb_cArray, "inspect", rb_ary_inspect, 0);
+ rb_define_alias(rb_cArray, "to_s", "inspect");
rb_define_method(rb_cArray, "to_a", rb_ary_to_a, 0);
- rb_define_method(rb_cArray, "to_ary", rb_ary_to_a, 0);
+ rb_define_method(rb_cArray, "to_ary", rb_ary_to_ary_m, 0);
rb_define_method(rb_cArray, "frozen?", rb_ary_frozen_p, 0);
rb_define_method(rb_cArray, "==", rb_ary_equal, 1);
rb_define_method(rb_cArray, "eql?", rb_ary_eql, 1);
rb_define_method(rb_cArray, "hash", rb_ary_hash, 0);
- rb_define_method(rb_cArray, "===", rb_ary_equal, 1);
rb_define_method(rb_cArray, "[]", rb_ary_aref, -1);
rb_define_method(rb_cArray, "[]=", rb_ary_aset, -1);
rb_define_method(rb_cArray, "at", rb_ary_at, 1);
- rb_define_method(rb_cArray, "first", rb_ary_first, 0);
- rb_define_method(rb_cArray, "last", rb_ary_last, 0);
+ rb_define_method(rb_cArray, "fetch", rb_ary_fetch, -1);
+ rb_define_method(rb_cArray, "first", rb_ary_first, -1);
+ rb_define_method(rb_cArray, "last", rb_ary_last, -1);
rb_define_method(rb_cArray, "concat", rb_ary_concat, 1);
rb_define_method(rb_cArray, "<<", rb_ary_push, 1);
rb_define_method(rb_cArray, "push", rb_ary_push_m, -1);
- rb_define_method(rb_cArray, "pop", rb_ary_pop, 0);
- rb_define_method(rb_cArray, "shift", rb_ary_shift, 0);
+ rb_define_method(rb_cArray, "pop", rb_ary_pop_m, -1);
+ rb_define_method(rb_cArray, "shift", rb_ary_shift_m, -1);
rb_define_method(rb_cArray, "unshift", rb_ary_unshift_m, -1);
+ rb_define_method(rb_cArray, "insert", rb_ary_insert, -1);
rb_define_method(rb_cArray, "each", rb_ary_each, 0);
rb_define_method(rb_cArray, "each_index", rb_ary_each_index, 0);
rb_define_method(rb_cArray, "reverse_each", rb_ary_reverse_each, 0);
rb_define_method(rb_cArray, "length", rb_ary_length, 0);
rb_define_alias(rb_cArray, "size", "length");
rb_define_method(rb_cArray, "empty?", rb_ary_empty_p, 0);
- rb_define_method(rb_cArray, "index", rb_ary_index, 1);
- rb_define_method(rb_cArray, "rindex", rb_ary_rindex, 1);
- rb_define_method(rb_cArray, "indexes", rb_ary_indexes, -1);
- rb_define_method(rb_cArray, "indices", rb_ary_indexes, -1);
- rb_define_method(rb_cArray, "clone", rb_ary_clone, 0);
+ rb_define_method(rb_cArray, "find_index", rb_ary_index, -1);
+ rb_define_method(rb_cArray, "index", rb_ary_index, -1);
+ rb_define_method(rb_cArray, "rindex", rb_ary_rindex, -1);
rb_define_method(rb_cArray, "join", rb_ary_join_m, -1);
rb_define_method(rb_cArray, "reverse", rb_ary_reverse_m, 0);
rb_define_method(rb_cArray, "reverse!", rb_ary_reverse_bang, 0);
+ rb_define_method(rb_cArray, "rotate", rb_ary_rotate_m, -1);
+ rb_define_method(rb_cArray, "rotate!", rb_ary_rotate_bang, -1);
rb_define_method(rb_cArray, "sort", rb_ary_sort, 0);
rb_define_method(rb_cArray, "sort!", rb_ary_sort_bang, 0);
+ rb_define_method(rb_cArray, "sort_by!", rb_ary_sort_by_bang, 0);
rb_define_method(rb_cArray, "collect", rb_ary_collect, 0);
rb_define_method(rb_cArray, "collect!", rb_ary_collect_bang, 0);
+ rb_define_method(rb_cArray, "map", rb_ary_collect, 0);
rb_define_method(rb_cArray, "map!", rb_ary_collect_bang, 0);
- rb_define_method(rb_cArray, "filter", rb_ary_filter, 0);
+ rb_define_method(rb_cArray, "select", rb_ary_select, 0);
+ rb_define_method(rb_cArray, "select!", rb_ary_select_bang, 0);
+ rb_define_method(rb_cArray, "keep_if", rb_ary_keep_if, 0);
+ rb_define_method(rb_cArray, "values_at", rb_ary_values_at, -1);
rb_define_method(rb_cArray, "delete", rb_ary_delete, 1);
rb_define_method(rb_cArray, "delete_at", rb_ary_delete_at_m, 1);
rb_define_method(rb_cArray, "delete_if", rb_ary_delete_if, 0);
+ rb_define_method(rb_cArray, "reject", rb_ary_reject, 0);
rb_define_method(rb_cArray, "reject!", rb_ary_reject_bang, 0);
- rb_define_method(rb_cArray, "replace", rb_ary_replace_m, 1);
+ rb_define_method(rb_cArray, "zip", rb_ary_zip, -1);
+ rb_define_method(rb_cArray, "transpose", rb_ary_transpose, 0);
+ rb_define_method(rb_cArray, "replace", rb_ary_replace, 1);
rb_define_method(rb_cArray, "clear", rb_ary_clear, 0);
rb_define_method(rb_cArray, "fill", rb_ary_fill, -1);
rb_define_method(rb_cArray, "include?", rb_ary_includes, 1);
@@ -1705,9 +5158,24 @@ Init_Array()
rb_define_method(rb_cArray, "uniq!", rb_ary_uniq_bang, 0);
rb_define_method(rb_cArray, "compact", rb_ary_compact, 0);
rb_define_method(rb_cArray, "compact!", rb_ary_compact_bang, 0);
- rb_define_method(rb_cArray, "flatten", rb_ary_flatten, 0);
- rb_define_method(rb_cArray, "flatten!", rb_ary_flatten_bang, 0);
- rb_define_method(rb_cArray, "nitems", rb_ary_nitems, 0);
-
- cmp = rb_intern("<=>");
+ rb_define_method(rb_cArray, "flatten", rb_ary_flatten, -1);
+ rb_define_method(rb_cArray, "flatten!", rb_ary_flatten_bang, -1);
+ rb_define_method(rb_cArray, "count", rb_ary_count, -1);
+ rb_define_method(rb_cArray, "shuffle!", rb_ary_shuffle_bang, -1);
+ rb_define_method(rb_cArray, "shuffle", rb_ary_shuffle, -1);
+ rb_define_method(rb_cArray, "sample", rb_ary_sample, -1);
+ rb_define_method(rb_cArray, "cycle", rb_ary_cycle, -1);
+ rb_define_method(rb_cArray, "permutation", rb_ary_permutation, -1);
+ rb_define_method(rb_cArray, "combination", rb_ary_combination, 1);
+ rb_define_method(rb_cArray, "repeated_permutation", rb_ary_repeated_permutation, 1);
+ rb_define_method(rb_cArray, "repeated_combination", rb_ary_repeated_combination, 1);
+ rb_define_method(rb_cArray, "product", rb_ary_product, -1);
+
+ rb_define_method(rb_cArray, "take", rb_ary_take, 1);
+ rb_define_method(rb_cArray, "take_while", rb_ary_take_while, 0);
+ rb_define_method(rb_cArray, "drop", rb_ary_drop, 1);
+ rb_define_method(rb_cArray, "drop_while", rb_ary_drop_while, 0);
+
+ id_cmp = rb_intern("<=>");
+ sym_random = ID2SYM(rb_intern("random"));
}
diff --git a/atomic.h b/atomic.h
new file mode 100644
index 0000000000..f4dd5db38a
--- /dev/null
+++ b/atomic.h
@@ -0,0 +1,115 @@
+#ifndef RUBY_ATOMIC_H
+#define RUBY_ATOMIC_H
+
+#if 0
+#elif defined HAVE_GCC_ATOMIC_BUILTINS
+/* @shyouhei hack to support atomic operations in case of gcc. Gcc
+ * has its own pseudo-insns to support them. See info, or
+ * http://gcc.gnu.org/onlinedocs/gcc/Atomic-Builtins.html */
+
+typedef unsigned int rb_atomic_t; /* Anything OK */
+# define ATOMIC_SET(var, val) (void)__sync_lock_test_and_set(&(var), (val))
+# define ATOMIC_INC(var) __sync_fetch_and_add(&(var), 1)
+# define ATOMIC_DEC(var) __sync_fetch_and_sub(&(var), 1)
+# define ATOMIC_OR(var, val) __sync_or_and_fetch(&(var), (val))
+# define ATOMIC_EXCHANGE(var, val) __sync_lock_test_and_set(&(var), (val))
+
+# define ATOMIC_SIZE_ADD(var, val) __sync_fetch_and_add(&(var), (val))
+# define ATOMIC_SIZE_SUB(var, val) __sync_fetch_and_sub(&(var), (val))
+# define ATOMIC_SIZE_INC(var) __sync_fetch_and_add(&(var), 1)
+# define ATOMIC_SIZE_DEC(var) __sync_fetch_and_sub(&(var), 1)
+# define ATOMIC_SIZE_EXCHANGE(var, val) __sync_lock_test_and_set(&(var), (val))
+
+#elif defined _WIN32
+#if defined _MSC_VER && _MSC_VER > 1200
+#pragma intrinsic(_InterlockedOr)
+#endif
+typedef LONG rb_atomic_t;
+
+# define ATOMIC_SET(var, val) InterlockedExchange(&(var), (val))
+# define ATOMIC_INC(var) InterlockedIncrement(&(var))
+# define ATOMIC_DEC(var) InterlockedDecrement(&(var))
+#if defined __GNUC__
+# define ATOMIC_OR(var, val) __asm__("lock\n\t" "orl\t%1, %0" : "=m"(var) : "Ir"(val))
+#elif defined _MSC_VER && _MSC_VER <= 1200
+# define ATOMIC_OR(var, val) rb_w32_atomic_or(&(var), (val))
+static inline void
+rb_w32_atomic_or(volatile rb_atomic_t *var, rb_atomic_t val)
+{
+#ifdef _M_IX86
+ __asm mov eax, var;
+ __asm mov ecx, val;
+ __asm lock or [eax], ecx;
+#else
+#error unsupported architecture
+#endif
+}
+#else
+# define ATOMIC_OR(var, val) _InterlockedOr(&(var), (val))
+#endif
+# define ATOMIC_EXCHANGE(var, val) InterlockedExchange(&(var), (val))
+
+# ifdef _M_AMD64
+# define ATOMIC_SIZE_ADD(var, val) InterlockedExchangeAdd64(&(var), (val))
+# define ATOMIC_SIZE_SUB(var, val) InterlockedExchangeAdd64(&(var), -(val))
+# define ATOMIC_SIZE_INC(var) InterlockedIncrement64(&(var))
+# define ATOMIC_SIZE_DEC(var) InterlockedDecrement64(&(var))
+# define ATOMIC_SIZE_EXCHANGE(var, val) InterlockedExchange64(&(var), (val))
+# else
+# define ATOMIC_SIZE_ADD(var, val) InterlockedExchangeAdd((LONG *)&(var), (val))
+# define ATOMIC_SIZE_SUB(var, val) InterlockedExchangeAdd((LONG *)&(var), -(val))
+# define ATOMIC_SIZE_INC(var) InterlockedIncrement((LONG *)&(var))
+# define ATOMIC_SIZE_DEC(var) InterlockedDecrement((LONG *)&(var))
+# define ATOMIC_SIZE_EXCHANGE(var, val) InterlockedExchange((LONG *)&(var), (val))
+# endif
+
+#elif defined(__sun)
+#include <atomic.h>
+typedef unsigned int rb_atomic_t;
+
+# define ATOMIC_SET(var, val) (void)atomic_swap_uint(&(var), (val))
+# define ATOMIC_INC(var) atomic_inc_uint(&(var))
+# define ATOMIC_DEC(var) atomic_dec_uint(&(var))
+# define ATOMIC_OR(var, val) atomic_or_uint(&(var), (val))
+# define ATOMIC_EXCHANGE(var, val) atomic_swap_uint(&(var), (val))
+
+# if SIZEOF_SIZE_T == SIZEOF_LONG
+# define ATOMIC_SIZE_ADD(var, val) atomic_add_long(&(var), (val))
+# define ATOMIC_SIZE_SUB(var, val) atomic_add_long(&(var), -(val))
+# define ATOMIC_SIZE_INC(var) atomic_inc_ulong(&(var))
+# define ATOMIC_SIZE_DEC(var) atomic_dec_ulong(&(var))
+# define ATOMIC_SIZE_EXCHANGE(var, val) atomic_swap_ulong(&(var), (val))
+# else
+# define ATOMIC_SIZE_ADD(var, val) atomic_add_int(&(var), (val))
+# define ATOMIC_SIZE_SUB(var, val) atomic_add_int(&(var), -(val))
+# define ATOMIC_SIZE_INC(var) atomic_inc_uint(&(var))
+# define ATOMIC_SIZE_DEC(var) atomic_dec_uint(&(var))
+# define ATOMIC_SIZE_EXCHANGE(var, val) atomic_swap_uint(&(var), (val))
+# endif
+
+#else
+typedef int rb_atomic_t;
+#define NEED_RUBY_ATOMIC_EXCHANGE
+extern rb_atomic_t ruby_atomic_exchange(rb_atomic_t *ptr, rb_atomic_t val);
+
+# define ATOMIC_SET(var, val) (void)((var) = (val))
+# define ATOMIC_INC(var) ((var)++)
+# define ATOMIC_DEC(var) ((var)--)
+# define ATOMIC_OR(var, val) ((var) |= (val))
+# define ATOMIC_EXCHANGE(var, val) ruby_atomic_exchange(&(var), (val))
+
+# define ATOMIC_SIZE_ADD(var, val) (void)((var) += (val))
+# define ATOMIC_SIZE_SUB(var, val) (void)((var) -= (val))
+# define ATOMIC_SIZE_INC(var) ((var)++)
+# define ATOMIC_SIZE_DEC(var) ((var)--)
+# define ATOMIC_SIZE_EXCHANGE(var, val) atomic_size_exchange(&(var), (val))
+static inline size_t
+atomic_size_exchange(size_t *ptr, size_t val)
+{
+ size_t old = *ptr;
+ *ptr = val;
+ return old;
+}
+#endif
+
+#endif /* RUBY_ATOMIC_H */
diff --git a/bcc32/Makefile.sub b/bcc32/Makefile.sub
new file mode 100644
index 0000000000..1cd26a8643
--- /dev/null
+++ b/bcc32/Makefile.sub
@@ -0,0 +1,617 @@
+# -*- makefile -*-
+
+SHELL = $(COMSPEC)
+MKFILES = Makefile
+
+!ifndef MFLAGS
+MFLAGS=-
+!endif
+
+#### Start of system configuration section. ####
+!ifndef OS
+OS = bccwin32
+!endif
+!if !defined(RT)
+!error RT not defined. Retry from configure pass.
+!endif
+
+arch = $(ARCH)-$(OS)
+
+## variables may be overridden by $(compile_dir)/Makefile
+!ifndef srcdir
+srcdir = ..
+!endif
+!ifndef RUBY_INSTALL_NAME
+RUBY_INSTALL_NAME = ruby
+!endif
+!ifndef RUBYW_INSTALL_NAME
+RUBYW_INSTALL_NAME = $(RUBY_INSTALL_NAME:ruby=rubyw)
+!elif "$(RUBYW_INSTALL_NAME)" == "$(RUBY_INSTALL_NAME)"
+RUBYW_INSTALL_NAME = $(RUBY_INSTALL_NAME:ruby=rubyw)
+!endif
+!if "$(RUBYW_INSTALL_NAME)" == "$(RUBY_INSTALL_NAME)"
+RUBYW_INSTALL_NAME = $(RUBY_INSTALL_NAME)w
+!endif
+!ifndef RUBY_SO_NAME
+RUBY_SO_NAME = $(RT)-$(RUBY_INSTALL_NAME)$(MAJOR)$(MINOR)$(TEENY)
+!endif
+!ifndef icondirs
+!ifdef ICONDIRS
+icondirs=$(ICONDIRS)
+!endif
+!endif
+!ifdef icondirs
+icondirs=$(icondirs:\=/)
+iconinc=-I$(icondirs: = -I)
+!endif
+###############
+
+.SUFFIXES: .y
+
+!ifndef CC
+CC = bcc32
+!endif
+!ifndef CPP
+CPP = cpp32
+!endif
+!ifndef RC
+RC = brcc32
+!endif
+!ifndef YACC
+YACC = bison
+!endif
+!ifndef AR
+AR = tlib
+!endif
+!ifndef BASERUBY
+BASERUBY = ruby
+!endif
+
+PURIFY =
+AUTOCONF = autoconf
+IFCHANGE = $(srcdir:/=\)\win32\ifchange.bat
+RM = $(srcdir:/=\)\win32\rm.bat
+CP = copy > nul
+MV = move > nul
+
+!if !defined(PROCESSOR_ARCHITECTURE)
+PROCESSOR_ARCHITECTURE = x86
+!endif
+MACHINE = $(PROCESSOR_ARCHITECTURE)
+!if "$(PROCESSOR_ARCHITECTURE)" == "x86"
+!ifndef PROCESSOR_LEVEL
+PROCESSOR_LEVEL = 5
+!endif
+!if 6 < $(PROCESSOR_LEVEL)
+PROCESSOR_LEVEL = 6
+!endif
+PROCESSOR_FLAG = -$(PROCESSOR_LEVEL)
+CPU = i$(PROCESSOR_LEVEL)86
+ARCH = i386
+!else
+CPU = $(PROCESSOR_ARCHITECTURE)
+ARCH = $(PROCESSOR_ARCHITECTURE)
+!endif
+!ifndef DEBUGFLAGS
+DEBUGFLAGS =
+!endif
+!ifndef OPTFLAGS
+OPTFLAGS = -O
+!endif
+
+!ifndef prefix
+prefix = /usr
+!endif
+!ifndef exec_prefix
+exec_prefix = $(prefix)
+!endif
+!ifndef libdir
+libdir = $(exec_prefix)/lib
+!endif
+!if !defined(datadir)
+datadir = $(prefix)/share
+!endif
+!ifndef EXTOUT
+EXTOUT = .ext
+!endif
+!ifndef TESTUI
+TESTUI = console
+!endif
+!ifndef TESTS
+TESTS =
+!endif
+!ifndef RDOCTARGET
+RDOCTARGET = install-doc
+!endif
+
+OUTFLAG = -o
+COUTFLAG = -o
+!ifndef CFLAGS
+CFLAGS = -q -tWR -tWC $(DEBUGFLAGS) $(OPTFLAGS) $(PROCESSOR_FLAG) -w- -wsus -wcpt -wdup -wext -wrng -wrpt -wzdi
+!endif
+!ifndef DEFS
+DEFS =
+!endif
+!ifndef CPPFLAGS
+CPPFLAGS =
+!endif
+CPPFLAGS = $(DEFS) $(CPPFLAGS)
+!ifndef CXXFLAGS
+CXXFLAGS = $(CFLAGS)
+!endif
+!ifndef LDFLAGS
+LDFLAGS = -S:$(STACK)
+!endif
+!ifndef RFLAGS
+RFLAGS = $(iconinc)
+!endif
+!ifndef EXTLIBS
+EXTLIBS =
+!endif
+!ifndef MEMLIB
+MEMLIB =
+!endif
+LIBS = $(MEMLIB) cw32i.lib import32.lib ws2_32.lib $(EXTLIBS)
+MISSING = acosh.obj cbrt.obj crypt.obj erf.obj lgamma_r.obj strlcat.obj strlcpy.obj tgamma.obj win32.obj
+
+!ifndef STACK
+STACK = 0x2000000
+!endif
+
+XCFLAGS = -DRUBY_EXPORT -I. -I$(arch_hdrdir) -I$(hdrdir) -I$(srcdir) -I$(srcdir)/missing
+
+ARFLAGS = /a /p32
+LD = ilink32 -q -Gn
+LDSHARED = $(LD)
+XLDFLAGS = -Tpe c0x32.obj
+WLDFLAGS = -aa -Tpe c0w32.obj
+DLDFLAGS = -Tpd c0d32.obj
+LIBRUBY_LDSHARED = $(LDSHARED)
+LIBRUBY_DLDFLAGS = -Gi $(DLDFLAGS) $(EXTLDFLAGS)
+LDOBJECTS = $(MAINOBJ)
+
+SOLIBS =
+
+EXEEXT = .exe
+PROGRAM=$(RUBY_INSTALL_NAME)$(EXEEXT)
+WPROGRAM=$(RUBYW_INSTALL_NAME)$(EXEEXT)
+RUBYDEF = $(RUBY_SO_NAME).def
+MINIRUBY = .\miniruby$(EXEEXT) -I$(srcdir)/lib $(MINIRUBYOPT)
+RUNRUBY = .\$(PROGRAM) -i"$(EXTOUT)/$(arch)" "$(srcdir)/runruby.rb" --extout="$(EXTOUT)" --
+
+ORGLIBPATH = $(LIB)
+
+#### End of system configuration section. ####
+
+LIBRUBY_A = $(RUBY_SO_NAME)-static.lib
+LIBRUBY_SO = $(RUBY_SO_NAME).dll
+LIBRUBY = $(RUBY_SO_NAME).lib
+LIBRUBYARG = $(LIBRUBY)
+THREAD_MODEL = win32
+
+PREP = miniruby$(EXEEXT)
+
+OBJEXT = obj
+ASMEXT = asm
+
+INSTALLED_LIST= .installed.list
+
+MKMAIN_CMD = mkmain.bat
+
+SRC_FILE = $(<:\=/)
+
+WINMAINOBJ = winmain.$(OBJEXT)
+ARCHMINIOBJS = dmydln.$(OBJEXT)
+
+arch_hdrdir = $(EXTOUT)/include/$(arch)
+hdrdir = $(srcdir)/include
+VPATH = $(arch_hdrdir)/ruby;$(hdrdir)/ruby;$(srcdir);$(srcdir)/enc;$(srcdir)/missing;$(srcdir)/win32
+
+.path.c = .;$(srcdir);$(srcdir)/enc;$(srcdir)/win32;$(srcdir)/missing
+.path.ci = $(srcdir)
+.path.inc = .;$(srcdir)
+.path.def = .;$(srcdir)
+.path.h = .;$(arch_hdrdir)/ruby;$(hdrdir)/ruby;$(srcdir);$(srcdir)/win32;$(srcdir)/missing
+.path.y = $(srcdir)
+.path. = $(srcdir)
+
+.c.obj:
+ $(CC) $(CFLAGS) $(XCFLAGS) -I. $(CPPFLAGS) $(COUTFLAG)$@ -c $(<:/=\)
+
+.c.asm:
+ $(CC) $(CFLAGS) $(XCFLAGS) -I. $(CPPFLAGS) $(COUTFLAG)$@ -S $(<:\=/)
+
+.rc.res:
+ $(RC) $(RFLAGS) -I. -I$(<D). $(iconinc) -I$(srcdir)/win32 $(RFLAGS) -fo$@ $(<:/=\)
+
+all: $(srcdir)/bcc32/Makefile.sub $(srcdir)/common.mk
+
+ruby: $(PROGRAM)
+rubyw: $(WPROGRAM)
+
+!include $(srcdir)/common.mk
+
+$(MKFILES): $(srcdir)/bcc32/Makefile.sub $(srcdir)/bcc32/configure.bat $(srcdir)/bcc32/setup.mak
+ $(COMSPEC) /C $(srcdir:/=\)\bcc32\configure.bat $(configure_args)
+ @echo $(MKFILES) should be updated, re-run $(MAKE).
+ @$(MAKE) > nul -q -f &&|
+PHONY: nul
+ @exit
+|
+
+PHONY: nul
+
+RUBY_CONFIG_H = $(arch_hdrdir)/ruby/config.h
+CONFIG_H = ./.config.h.time
+
+config: config.status
+
+config.status: $(CONFIG_H)
+
+guard = INCLUDE_RUBY_CONFIG_H
+
+$(CONFIG_H): $(MKFILES) $(srcdir)/bcc32/Makefile.sub
+ @if not exist $(arch_hdrdir:/=\) md $(arch_hdrdir:/=\)
+ @if not exist $(arch_hdrdir:/=\)\ruby md $(arch_hdrdir:/=\)\ruby
+ @$(IFCHANGE) $(RUBY_CONFIG_H:/=\) &&|
+\#ifndef $(guard)
+\#define $(guard) 1
+\#define NO_BIG_INLINE 1
+\#define HAVE_SYS_TYPES_H 1
+\#define HAVE_SYS_STAT_H 1
+\#define HAVE_STDLIB_H 1
+\#define HAVE_STRING_H 1
+\#define HAVE_MEMORY_H 1
+\#define HAVE_LONG_LONG 1
+\#define HAVE_OFF_T 1
+\#define SIZEOF_INT 4
+\#define SIZEOF_SHORT 2
+\#define SIZEOF_LONG 4
+\#define SIZEOF_LONG_LONG 0
+\#define SIZEOF___INT64 8
+\#define SIZEOF_OFF_T 8
+\#define SIZEOF_VOIDP 4
+\#define SIZEOF_FLOAT 4
+\#define SIZEOF_DOUBLE 8
+\#define SIZEOF_TIME_T 4
+\#define SIZEOF_RLIM_T 0
+\#define SIZEOF_SIZE_T 4
+\#define SIZEOF_PTRDIFF_T 4
+\#define HAVE_PROTOTYPES 1
+\#define TOKEN_PASTE(x,y) x\#\#y
+\#define HAVE_STDARG_PROTOTYPES 1
+\#define NORETURN(x) x
+\#define RUBY_EXTERN extern __declspec(dllimport)
+\#define HAVE_DECL_SYS_NERR 1
+\#define HAVE_LIMITS_H 1
+\#define HAVE_FCNTL_H 1
+\#define HAVE_UTIME_H 1
+\#define HAVE_FLOAT_H 1
+\#define rb_uid_t uid_t
+\#define rb_gid_t gid_t
+\#define rb_pid_t int
+\#define HAVE_STRUCT_STAT_ST_RDEV 1
+\#define HAVE_ST_RDEV 1
+!if $(BORLANDC) < 0x0580
+\#define int8_t signed char
+\#define uint8_t unsigned char
+\#define int16_t short
+\#define uint16_t unsigned short
+\#define int32_t int
+\#define uint32_t unsigned int
+\#define int64_t __int64
+\#define uint64_t unsigned __int64
+\#define ssize_t int
+!endif
+\#define HAVE_INT8_T 1
+\#define HAVE_UINT8_T 1
+\#define SIZEOF_INT8_T 1
+\#define HAVE_INT16_T 1
+\#define HAVE_UINT16_T 1
+\#define SIZEOF_INT32_T 2
+\#define HAVE_INT32_T 1
+\#define HAVE_UINT32_T 1
+\#define SIZEOF_INT32_T 4
+\#define HAVE_INT64_T 1
+\#define HAVE_UINT64_T 1
+\#define SIZEOF_INT64_T 8
+\#define HAVE_INTPTR_T 1
+\#define HAVE_UINTPTR_T 1
+\#define HAVE_SSIZE_T 1
+\#define GETGROUPS_T int
+\#define RETSIGTYPE void
+\#define HAVE_ALLOCA 1
+\#define HAVE_DUP2 1
+\#define HAVE_MEMMOVE 1
+\#define HAVE_MKDIR 1
+\#define HAVE_STRCASECMP 1
+\#define HAVE_STRNCASECMP 1
+\#define HAVE_STRERROR 1
+\#define HAVE_STRFTIME 1
+\#define HAVE_STRCHR 1
+\#define HAVE_STRSTR 1
+\#define HAVE_STRTOD 1
+\#define HAVE_STRTOL 1
+\#define HAVE_STRTOUL 1
+\#define HAVE_SNPRINTF 1
+\#define HAVE_VSNPRINTF 1
+\#define HAVE_ISNAN 1
+\#define HAVE_FINITE 1
+\#define HAVE_HYPOT 1
+\#define HAVE_FMOD 1
+\#define HAVE_WAITPID 1
+\#define HAVE_FSYNC 1
+\#define HAVE_GETCWD 1
+\#define HAVE_TRUNCATE 1
+\#define HAVE_FTRUNCATE 1
+\#define HAVE_FSEEKO 1
+\#define HAVE_FTELLO 1
+\#define HAVE_TIMES 1
+\#define HAVE_FCNTL 1
+\#define HAVE_LINK 1
+\#define HAVE_TELLDIR 1
+\#define HAVE_SEEKDIR 1
+\#define HAVE_COSH 1
+\#define HAVE_SINH 1
+\#define HAVE_TANH 1
+\#define RSHIFT(x,y) ((x)>>(int)y)
+\#define FILE_COUNT level
+\#define FILE_READPTR curp
+\#define RUBY_SETJMP(env) setjmp(env)
+\#define RUBY_LONGJMP(env,val) longjmp(env,val)
+\#define RUBY_JMP_BUF jmp_buf
+\#define inline __inline
+\#define NEED_IO_SEEK_BETWEEN_RW 1
+\#define STACK_GROW_DIRECTION -1
+\#define DEFAULT_KCODE KCODE_NONE
+\#define LOAD_RELATIVE 1
+\#define DLEXT ".so"
+\#define RUBY_LIB_PREFIX "/lib/ruby"
+\#define RUBY_PLATFORM "$(ARCH)-$(OS)"
+\#endif /* $(guard) */
+|
+ @exit > $(@:/=\)
+
+config.status: $(MKFILES) $(srcdir)/bcc32/Makefile.sub $(srcdir)/common.mk
+ @echo Creating $@
+ @type > $@ &&|
+# Generated automatically by Makefile.sub.
+s,@SHELL@,$$(COMSPEC),;t t
+s,@BUILD_FILE_SEPARATOR@,\,;t t
+s,@PATH_SEPARATOR@,;,;t t
+s,@CFLAGS@,$(CFLAGS),;t t
+s,@DEFS@,$(DEFS),;t t
+s,@CPPFLAGS@,$(CPPFLAGS),;t t
+s,@CXXFLAGS@,$(CXXFLAGS),;t t
+s,@FFLAGS@,$(FFLAGS),;t t
+s,@LDFLAGS@,,;t t
+s,@LIBS@,$(LIBS),;t t
+s,@exec_prefix@,$${prefix},;t t
+s,@prefix@,$(prefix),;t t
+s,@program_transform_name@,s,,,,;t t
+s,@bindir@,$${exec_prefix}/bin,;t t
+s,@sbindir@,$${exec_prefix}/sbin,;t t
+s,@libexecdir@,$${exec_prefix}/libexec,;t t
+s,@datadir@,$${prefix}/share,;t t
+s,@sysconfdir@,$${prefix}/etc,;t t
+s,@sharedstatedir@,/etc,;t t
+s,@localstatedir@,/var,;t t
+s,@libdir@,$${exec_prefix}/lib,;t t
+s,@includedir@,$${prefix}/include,;t t
+s,@oldincludedir@,/usr/include,;t t
+s,@infodir@,$${prefix}/info,;t t
+s,@mandir@,$${prefix}/man,;t t
+s,@ridir@,$${prefix}/share/ri,;t t
+s,@build@,$(CPU)-pc-$(OS),;t t
+s,@build_alias@,$(CPU)-$(OS),;t t
+s,@build_cpu@,$(CPU),;t t
+s,@build_vendor@,pc,;t t
+s,@build_os@,$(OS),;t t
+s,@host@,$(CPU)-pc-$(OS),;t t
+s,@host_alias@,$(CPU)-$(OS),;t t
+s,@host_cpu@,$(CPU),;t t
+s,@host_vendor@,pc,;t t
+s,@host_os@,$(OS),;t t
+s,@target@,$(ARCH)-pc-$(OS),;t t
+s,@target_alias@,$(ARCH)-$(OS),;t t
+s,@target_cpu@,$(ARCH),;t t
+s,@target_vendor@,pc,;t t
+s,@target_os@,$(OS),;t t
+s,@CC@,$(CC),;t t
+s,@CPP@,cpp32,;t t
+s,@CXX@,$$(CC),;t t
+s,@LD@,$(LD),;t t
+s,@YACC@,$(YACC),;t t
+s,@RANLIB@,,;t t
+s,@AR@,$(AR),;t t
+s,@ARFLAGS@,$(ARFLAGS) ,;t t
+s,@LN_S@,$(LN_S),;t t
+s,@SET_MAKE@,MFLAGS = -$$(MAKEFLAGS),;t t
+s,@RM@,$$(top_srcdir:/=\)\win32\rm.bat,;t t
+s,@CP@,copy > nul,;t t
+s,@LIBOBJS@, $(MISSING),;t t
+s,@ALLOCA@,$(ALLOCA),;t t
+s,@DEFAULT_KCODE@,$(DEFAULT_KCODE),;t t
+s,@EXEEXT@,.exe,;t t
+s,@OBJEXT@,obj,;t t
+s,@XCFLAGS@,$(XCFLAGS),;t t
+s,@XLDFLAGS@,$(XLDFLAGS),;t t
+s,@DLDFLAGS@,$(DLDFLAGS),;t t
+s,@ARCH_FLAG@,$(ARCH_FLAG),;t t
+s,@STATIC@,$(STATIC),;t t
+s,@CCDLFLAGS@,,;t t
+s,@LDSHARED@,$(LDSHARED),;t t
+s,@DLEXT@,so,;t t
+s,@LIBEXT@,lib,;t t
+s,@STRIP@,$(STRIP),;t t
+s,@EXTSTATIC@,$(EXTSTATIC),;t t
+s,@setup@,Setup,;t t
+s,@MINIRUBY@,$(MINIRUBY),;t t
+s,@PREP@,miniruby$(EXEEXT),;t t
+s,@RUNRUBY@,$(RUNRUBY),;t t
+s,@EXTOUT@,$(EXTOUT),;t t
+s,@ARCHFILE@,,;t t
+s,@RDOCTARGET@,,;t t
+s,@LIBRUBY_LDSHARED@,$$(LDSHARED),;t t
+s,@LIBRUBY_DLDFLAGS@,-Gi $$(DLDFLAGS),;t t
+s,@RUBY_INSTALL_NAME@,$(RUBY_INSTALL_NAME),;t t
+s,@rubyw_install_name@,$(RUBYW_INSTALL_NAME),;t t
+s,@RUBYW_INSTALL_NAME@,$(RUBYW_INSTALL_NAME),;t t
+s,@RUBY_SO_NAME@,$(RUBY_SO_NAME),;t t
+s,@LIBRUBY_A@,$$(RUBY_SO_NAME)-static.lib,;t t
+s,@LIBRUBY_SO@,$$(RUBY_SO_NAME).dll,;t t
+s,@LIBRUBY_ALIASES@,$(LIBRUBY_ALIASES),;t t
+s,@LIBRUBY@,$$(RUBY_SO_NAME).lib,;t t
+s,@LIBRUBYARG@,$$(LIBRUBYARG_SHARED),;t t
+s,@LIBRUBYARG_STATIC@,$$(LIBRUBY_A),;t t
+s,@LIBRUBYARG_SHARED@,$$(LIBRUBY),;t t
+s,@SOLIBS@,$(SOLIBS),;t t
+s,@DLDLIBS@,$(DLDLIBS),;t t
+s,@ENABLE_SHARED@,yes,;t t
+s,@OUTFLAG@,$(OUTFLAG),;t t
+s,@COUTFLAG@,$(COUTFLAG),;t t
+s,@CPPOUTFILE@,,;t t
+s,@LIBPATHFLAG@, -L"%s",;t t
+s,@RPATHFLAG@,,;t t
+s,@LIBARG@,%s.lib,;t t
+s,@LINK_SO@,$$(LDSHARED) $$(DLDFLAGS) $$(LIBPATH) $$(OBJS:/=\), $$(@:/=\), nul, $$(LIBS) $$(LOCAL_LIBS), $$(DEFFILE:/=\), $$(RESFILE:/=\),;t t
+s,@COMPILE_C@,$$(CC) $$(INCFLAGS) $$(CFLAGS) $$(CPPFLAGS) $(COUTFLAG)$$(@) -c $$(<:/=\),;t t
+s,@COMPILE_CXX@,$$(CXX) $$(INCFLAGS) $$(CXXFLAGS) $$(CPPFLAGS) -P $(COUTFLAG)$$(@) -c $$(<:/=\),;t t
+s,@COMPILE_RULES@,{$$(srcdir)}.%s{}.%s: {$$(topdir)}.%s{}.%s: {$$(hdrdir)}.%s{}.%s: .%s.%s:,;t t
+s,@RULE_SUBST@,{.;$$(VPATH)}%s,;t t
+s,@COMMON_LIBS@,m advapi32 avicap32 avifil32 cap comctl32 comdlg32 dlcapi gdi32 glu32 imagehlp imm32 inetmib1 kernel32 loadperf lsapi32 lz32 mapi32 mgmtapi mpr msacm32 msvfw32 nddeapi netapi32 ole32 oleaut32 oledlg olepro32 opengl32 pdh pkpd32 rasapi32 rasdlg rassapi rpcrt4 setupapi shell32 shfolder snmpapi sporder tapi32 url user32 vdmdbg version win32spl winmm wintrust wsock32,;t t
+s,@COMMON_MACROS@,WIN32_LEAN_AND_MEAN WIN32,;t t
+s,@COMMON_HEADERS@,winsock2.h windows.h,;t t
+s,@cleanlibs@,$$*.tds,;t t
+s,@cleanobjs@,$$*-$$(arch).def $$*.il? $$*.lib,;t t
+s,@TRY_LINK@,$$(CC) -oconftest $$(INCFLAGS) -I$$(hdrdir) $$(CPPFLAGS) $$(CFLAGS) $$(LIBPATH) $$(LDFLAGS) $$(src) $$(LOCAL_LIBS) $$(LIBS),;t t
+s,@EXPORT_PREFIX@,_,;t t
+s,@arch@,$(ARCH)-$(OS),;t t
+s,@sitearch@,$(ARCH)-$(OS),;t t
+s,@sitedir@,$${prefix}/lib/ruby/site_ruby,;t t
+s,@vendordir@,$${prefix}/lib/ruby/vendor_ruby,;t t
+s,@rubyhdrdir@,$$(includedir)/ruby-$$(MAJOR).$$(MINOR).$$(TEENY),;t t
+s,@sitehdrdir@,$$(rubyhdrdir)/site_ruby,;t t
+s,@vendorhdrdir@,$$(rubyhdrdir)/vendor_ruby,;t t
+s,@configure_args@,--enable-shared $(configure_args),;t t
+s,@configure_input@,$$configure_input,;t t
+s,@srcdir@,$(srcdir),;t t
+s,@top_srcdir@,$(srcdir),;t t
+|
+
+miniruby$(EXEEXT):
+ @echo $(LIBS)
+ $(LD) $(LDFLAGS) $(XLDFLAGS) $(MAINOBJ) $(MINIOBJS) $(COMMONOBJS:/=\) $(DMYEXT),$@,nul,$(LIBS)
+
+$(PROGRAM): $(MAINOBJ) $(LIBRUBY_SO) $(RUBY_INSTALL_NAME).res
+ $(LD) $(LDFLAGS) $(XLDFLAGS) $(MAINOBJ),$@,nul,$(LIBRUBYARG) $(LIBS),,$(RUBY_INSTALL_NAME).res
+
+$(WPROGRAM): $(MAINOBJ) $(WINMAINOBJ) $(LIBRUBY_SO) $(RUBYW_INSTALL_NAME).res
+ $(LD) $(LDFLAGS) $(WLDFLAGS) $(MAINOBJ) $(WINMAINOBJ),$@,nul,$(LIBRUBYARG) $(LIBS),,$(RUBYW_INSTALL_NAME).res
+
+$(LIBRUBY_A): $(OBJS) $(DMYEXT)
+ @-if exist $@ del $@
+ $(AR) $(ARFLAGS) "$@" $(OBJS) $(DMYEXT)
+
+# $(LIBRUBY): $(LIBRUBY_SO)
+# implib $@ $(LIBRUBY_SO)
+
+$(LIBRUBY_SO): $(LIBRUBY_A) $(DLDOBJS) $(RUBYDEF) $(RUBY_SO_NAME).res
+ @echo $(DLDOBJS)
+ @$(PRE_LIBRUBY_UPDATE)
+ $(LIBRUBY_LDSHARED) $(LIBRUBY_DLDFLAGS) $(DLDOBJS:/=\),$(LIBRUBY_SO),nul,$(LIBRUBY_A) $(LIBS),$(RUBYDEF),$(RUBY_SO_NAME).res
+
+$(LIBRUBY): $(LIBRUBY_SO)
+
+$(RUBYDEF): $(LIBRUBY_A) $(PREP)
+ $(MINIRUBY) $(srcdir)/bcc32/mkexports.rb -output=$@ -base=$(RUBY_SO_NAME) $(LIBRUBY_A)
+
+$(RUBY_INSTALL_NAME).rc $(RUBYW_INSTALL_NAME).rc $(RUBY_SO_NAME).rc: rbconfig.rb $(srcdir)/revision.h $(srcdir)/win32/resource.rb
+ @$(MINIRUBY) $(srcdir)/win32/resource.rb \
+ -ruby_name=$(RUBY_INSTALL_NAME) \
+ -rubyw_name=$(RUBYW_INSTALL_NAME) \
+ -so_name=$(RUBY_SO_NAME) \
+ . $(icondirs) $(srcdir)/win32
+
+lex.c: {$(srcdir)}lex.c.blt
+ copy "$(?:/=\)" $@
+
+post-install-bin::
+ @$(NULLCMD)
+post-install-lib::
+ @$(NULLCMD)
+post-install-ext-comm::
+ @$(NULLCMD)
+post-install-ext-arch::
+ @$(NULLCMD)
+post-install-man::
+ @$(NULLCMD)
+post-install-doc::
+ @$(NULLCMD)
+
+clean-local::
+ @$(RM) $(WINMAINOBJ) ext\extinit.c ext\extinit.$(OBJEXT) *.tds *.il? $(RUBY_SO_NAME).lib
+ @$(RM) $(RUBY_INSTALL_NAME).res $(RUBYW_INSTALL_NAME).res $(RUBY_SO_NAME).res
+ @$(RM) *.map *.pdb *.ilk *.exp $(RUBYDEF) ext\ripper\y.output
+
+distclean-local::
+ @$(RM) ext\config.cache $(RBCONFIG:/=\)
+ @$(RM) $(RUBY_INSTALL_NAME).rc $(RUBYW_INSTALL_NAME).rc $(RUBY_SO_NAME).rc
+
+clean-ext distclean-ext realclean-ext::
+ @for /R ext %I in (.) do @if exist %I\Makefile ( \
+ echo $(@:-ext=)ing %~nI & \
+ cd %I & \
+ $(MAKE) $(MFLAGS) $(@:-ext=) & \
+ cd %CD% \
+ )
+
+ext/extinit.obj: ext/extinit.c $(SETUP)
+ $(CC) $(CFLAGS) $(XCFLAGS) $(CPPFLAGS) $(COUTFLAG)$@ -c ext/extinit.c
+
+main.$(OBJEXT): win32.h
+ascii.$(OBJEXT): win32.h
+array.$(OBJEXT): win32.h
+bignum.$(OBJEXT): win32.h
+class.$(OBJEXT): win32.h
+compar.$(OBJEXT): win32.h
+dir.$(OBJEXT): dir.h win32.h
+dln.$(OBJEXT): win32.h
+enum.$(OBJEXT): win32.h
+error.$(OBJEXT): win32.h
+euc_jp.$(OBJEXT): win32.h
+eval.$(OBJEXT): win32.h
+file.$(OBJEXT): win32.h
+gc.$(OBJEXT): win32.h
+hash.$(OBJEXT): win32.h
+inits.$(OBJEXT): win32.h
+io.$(OBJEXT): win32.h
+marshal.$(OBJEXT): win32.h
+math.$(OBJEXT): win32.h
+numeric.$(OBJEXT): win32.h
+object.$(OBJEXT): win32.h
+pack.$(OBJEXT): win32.h
+parse.$(OBJEXT): win32.h
+process.$(OBJEXT): win32.h
+prec.$(OBJEXT): win32.h
+random.$(OBJEXT): win32.h
+range.$(OBJEXT): win32.h
+re.$(OBJEXT): win32.h
+regcomp.$(OBJEXT): win32.h
+regenc.$(OBJEXT): win32.h
+regerror.$(OBJEXT): win32.h
+regexec.$(OBJEXT): win32.h
+reggnu.$(OBJEXT): win32.h
+regparse.$(OBJEXT): win32.h
+ruby.$(OBJEXT): win32.h
+signal.$(OBJEXT): win32.h
+sjis.$(OBJEXT): win32.h
+sprintf.$(OBJEXT): win32.h
+st.$(OBJEXT): win32.h
+string.$(OBJEXT): win32.h
+struct.$(OBJEXT): win32.h
+time.$(OBJEXT): win32.h
+utf_8.$(OBJEXT): win32.h
+util.$(OBJEXT): win32.h
+variable.$(OBJEXT): win32.h
+version.$(OBJEXT): win32.h
diff --git a/bcc32/README.bcc32 b/bcc32/README.bcc32
new file mode 100644
index 0000000000..cd33eec0a1
--- /dev/null
+++ b/bcc32/README.bcc32
@@ -0,0 +1,130 @@
+=begin
+
+= How to build ruby using Borland C++
+
+== Requirement
+
+(1) Borland C++ 5.0 or later.
+
+(2) Please set environment variable (({PATH}))
+ to run required commands properly from the command line.
+
+ Note: building ruby requires following commands.
+ * make
+ * bcc32
+ * tlib
+ * ilink32
+
+(3) If you want to build from CVS source, following commands are required.
+ * bison ((<URL:http://gnuwin32.sourceforge.net/packages/bison.htm>))
+ * sed ((<URL:http://gnuwin32.sourceforge.net/packages/sed.htm>))
+
+(4) We strongly recommend to build ruby on C++Builder, to link following files.
+ * usebormm.lib
+ * memmgr.lib
+
+ RTL's internal memory manager cannot handle large memory block properly,
+ so we should use borlndmm.dll instead.
+ 10000.times { "" << "." * 529671; GC.start } # crash
+
+== How to compile and install
+
+(1) Execute bcc32\configure.bat on your build directory.
+ ex. c:\src\ruby> bcc32\configure.bat
+ You can specify the target platform as an argument.
+ For example, run `((%configure i686-bccwin32%))'
+ You can also specify the install directory.
+ For example, run `((%configure --prefix=<install_directory>%))'
+ Default of the install directory is /usr .
+ The default ((|<PLATFORM>|)) is `(({i386-bccwin32}))'.
+
+(2) Change ((|RUBY_INSTALL_NAME|)) and ((|RUBY_SO_NAME|)) in (({Makefile}))
+ if you want to change the name of the executable files.
+ And add ((|RUBYW_INSTALL_NAME|)) to change the name of the
+ executable without console window if also you want.
+
+(3) Run `((%make%))'
+
+(4) Run `((%make test%))'
+
+(5) Run `((%make install%))'
+
+(6) Requires dynamic RTL (cc3250.dll on C++Builder5) and borlndmm.dll (If built with
+ usebormm.lib) to use installed binary. These files are ordinary in bcc32's bin
+ directory.
+
+== Icons
+
+Any icon files(*.ico) in the build directory, directories specified with
+((|icondirs|)) make variable and (({win32})) directory under the ruby
+source directory will be included in DLL or executable files, according
+to their base names.
+ $(RUBY_INSTALL_NAME).ico or ruby.ico --> $(RUBY_INSTALL_NAME).exe
+ $(RUBYW_INSTALL_NAME).ico or rubyw.ico --> $(RUBYW_INSTALL_NAME).exe
+ the others --> $(RUBY_SO_NAME).dll
+
+Although no icons are distributed with the ruby source or in the official
+site, you can use anything you like. For example, followings are written
+in Japanese, but you can download at least.
+
+* ((<URL:http://member.nifty.ne.jp/ueivu/rubyico.html>)) or
+ ((<zipped icons|URL:http://member.nifty.ne.jp/ueivu/Ruby_ico.zip>))
+* ((<URL:http://homepage1.nifty.com/a_nakata/ruby/>)) or
+ ((<icon itself|URL:http://homepage1.nifty.com/a_nakata/ruby/RubyIcon.ico>))
+
+== Build examples
+
+* Build on the ruby source directory.
+
+ ex.)
+ ruby source directory: C:\ruby
+ build directory: C:\ruby
+ install directory: C:\usr\local
+
+ C:
+ cd \ruby
+ bcc32\configure --prefix=/usr/local
+ make
+ make test
+ make install
+
+* Build on the relative directory from the ruby source directory and CPU type
+ i386.
+
+ ex.)
+ ruby source directory: C:\ruby
+ build directory: C:\ruby\bccwin32
+ install directory: C:\usr\local
+ CPU i386
+
+ C:
+ cd \ruby
+ mkdir bccwin32
+ cd bccwin32
+ ..\bcc32\configure --prefix=/usr/local
+ make
+ make test
+ make install
+
+* Build on the different drive.
+
+ ex.)
+ ruby source directory: C:\src\ruby
+ build directory: D:\build\ruby
+ install directory: C:\usr\local
+
+ D:
+ cd D:\build\ruby
+ C:\src\ruby\bcc32\configure --prefix=C:/usr/local
+ make
+ make test
+ make install
+
+== Bugs
+
+You can ((*NOT*)) use a path name contains any white space characters as
+the ruby source directory, this restriction comes from the behavior of
+(({!INCLUDE})) directives of (({MAKE})).
+((- you may call it a bug. -))
+
+=end
diff --git a/bcc32/configure.bat b/bcc32/configure.bat
new file mode 100755
index 0000000000..8cdfc64b03
--- /dev/null
+++ b/bcc32/configure.bat
@@ -0,0 +1,163 @@
+@echo off
+::: Don't set environment variable in batch file other than autoexec.bat
+::: to avoid "Out of environment space" problem on Windows 95/98.
+::: set TMPMAKE=~tmp~.mak
+
+echo> ~tmp~.mak ####
+echo>> ~tmp~.mak conf = %0
+echo>> ~tmp~.mak $(conf:\=/): nul
+echo>> ~tmp~.mak @del ~setup~.mak
+echo>> ~tmp~.mak @-$(MAKE) -l$(MAKEFLAGS) -f $(@D)setup.mak \
+if exist pathlist.tmp del pathlist.tmp
+if exist confargs.mk del confargs.mk
+:loop
+if "%1" == "" goto :end
+if "%1" == "--prefix" goto :prefix
+if "%1" == "prefix" goto :prefix
+if "%1" == "--srcdir" goto :srcdir
+if "%1" == "srcdir" goto :srcdir
+if "%1" == "--target" goto :target
+if "%1" == "target" goto :target
+if "%1" == "--with-static-linked-ext" goto :extstatic
+if "%1" == "--program-suffix" goto :suffix
+if "%1" == "RUBY_SUFFIX" goto :suffix
+if "%1" == "--program-name" goto :installname
+if "%1" == "--install-name" goto :installname
+if "%1" == "RUBY_INSTALL_NAME" goto :installname
+if "%1" == "--so-name" goto :soname
+if "%1" == "RUBY_SO_NAME" goto :soname
+if "%1" == "--enable-install-doc" goto :enable-rdoc
+if "%1" == "--disable-install-doc" goto :disable-rdoc
+if "%1" == "--extout" goto :extout
+if "%1" == "EXTOUT" goto :extout
+if "%1" == "--with-baseruby" goto :baseruby
+if "%1" == "BASERUBY" goto :baseruby
+if "%1" == "--path" goto :path
+if "%1" == "-h" goto :help
+if "%1" == "--help" goto :help
+ echo>>confargs.tmp %1 \
+ shift
+goto :loop
+:srcdir
+ echo>> ~tmp~.mak -Dsrcdir=%2 \
+ echo>>confargs.tmp --srcdir=%2 \
+ shift
+ shift
+goto :loop
+:prefix
+ echo>> ~tmp~.mak -Dprefix=%2 \
+ echo>>confargs.tmp %1=%2 \
+ shift
+ shift
+goto :loop
+:suffix
+ echo>>confargs.mk !ifndef RUBY_SUFFIX
+ echo>>confargs.mk RUBY_SUFFIX = %2
+ echo>>confargs.mk !endif
+ echo>>confargs.tmp %1=%2 \
+ shift
+ shift
+goto :loop
+:installname
+ echo>>confargs.mk !ifndef RUBY_INSTALL_NAME
+ echo>>confargs.mk RUBY_INSTALL_NAME = %2
+ echo>>confargs.mk !endif
+ echo>>confargs.tmp %1=%2 \
+ shift
+ shift
+goto :loop
+:soname
+ echo>>confargs.mk !ifndef RUBY_SO_NAME
+ echo>>confargs.mk RUBY_SO_NAME = %2
+ echo>>confargs.mk !endif
+ echo>>confargs.tmp %1=%2 \
+ shift
+ shift
+goto :loop
+:target
+ echo>> ~tmp~.mak %2 \
+ echo>>confargs.tmp --target=%2 \
+ shift
+ shift
+goto :loop
+:extstatic
+ echo>>confargs.mk !ifndef EXTSTATIC
+ echo>>confargs.mk EXTSTATIC = static
+ echo>>confargs.mk !endif
+ echo>>confargs.tmp %1 \
+ shift
+goto :loop
+:enable-rdoc
+ echo>>confargs.mk !ifndef RDOCTARGET
+ echo>>confargs.mk RDOCTARGET = install-doc
+ echo>>confargs.mk !endif
+ echo>>confargs.tmp %1 \
+ shift
+goto :loop
+:disable-rdoc
+ echo>>confargs.mk !ifndef RDOCTARGET
+ echo>>confargs.mk RDOCTARGET = install-nodoc
+ echo>>confargs.mk !endif
+ echo>>confargs.tmp %1 \
+ shift
+goto :loop
+:extout
+ echo>>confargs.mk !ifndef EXTOUT
+ echo>>confargs.mk EXTOUT = %2
+ echo>>confargs.mk !endif
+ echo>>confargs.tmp %1=%2 \
+ shift
+ shift
+goto :loop
+:baseruby
+ echo>>confargs.mk !ifndef BASERUBY
+ echo>>confargs.mk BASERUBY = %2
+ echo>>confargs.mk !endif
+ echo>>confargs.tmp %1=%2 \
+ shift
+ shift
+goto :loop
+:path
+ echo>>pathlist.tmp %2;\
+ echo>>confargs.tmp %1=%2 \
+ shift
+ shift
+goto :loop
+:help
+ echo Configuration:
+ echo --help display this help
+ echo --srcdir=DIR find the sources in DIR [configure dir or `..']
+ echo Installation directories:
+ echo --prefix=PREFIX install files in PREFIX (ignored currently)
+ echo System types:
+ echo --target=TARGET configure for TARGET [i386-bccwin32]
+ echo Optional Package:
+ echo --with-baseruby=RUBY use RUBY as baseruby [ruby]
+ echo --with-static-linked-ext link external modules statically
+ echo --enable-install-doc install rdoc indexes during install
+ del *.tmp
+ del ~tmp~.mak
+goto :exit
+:end
+echo>> ~tmp~.mak -Dbcc32dir=$(@D)
+if not exist confargs.tmp goto :noconfargs
+ echo>>confargs.mk configure_args = \
+ type>>confargs.mk confargs.tmp
+ echo.>>confargs.mk
+ echo>>confargs.mk ####
+:noconfargs
+if not exist pathlist.tmp goto :nopathlist
+ echo>>confargs.mk pathlist = \
+ type>>confargs.mk pathlist.tmp
+ echo.>>confargs.mk
+ echo>>confargs.mk ####
+ echo>>confargs.mk PATH = $(pathlist:;=/bin;)$(PATH)
+ echo>>confargs.mk INCLUDE = $(pathlist:;=/include;)
+ echo>>confargs.mk LIB = $(pathlist:;=/lib;)
+:nopathlist
+if exist confargs.mk copy confargs.mk ~setup~.mak > nul
+type>>~setup~.mak ~tmp~.mak
+del *.tmp > nul
+del ~tmp~.mak > nul
+make -s -f ~setup~.mak
+:exit
diff --git a/bcc32/mkexports.rb b/bcc32/mkexports.rb
new file mode 100755
index 0000000000..888ab2e2a6
--- /dev/null
+++ b/bcc32/mkexports.rb
@@ -0,0 +1,26 @@
+#!./miniruby -s
+
+$:.unshift(File.expand_path("../..", __FILE__))
+require 'win32/mkexports'
+
+class Exports::Bcc < Exports
+ def forwarding(internal, export)
+ internal[/\A_?/]+export
+ end
+
+ def each_line(objs, &block)
+ objs.each do |obj|
+ opt = /\.(?:so|dll)\z/i =~ obj ? "-ee" : "-oiPUBDEF -oiPUBD32"
+ IO.foreach("|tdump -q #{opt} #{obj.tr('/', '\\')} < nul", &block)
+ end
+ end
+
+ def each_export(objs)
+ objdump(objs) do |l|
+ next unless /(?:PUBDEF|PUBD32|EXPORT)/ =~ l
+ yield $1 if /'(.*?)'/ =~ l
+ end
+ yield "_strcasecmp", "_stricmp"
+ yield "_strncasecmp", "_strnicmp"
+ end
+end
diff --git a/bcc32/setup.mak b/bcc32/setup.mak
new file mode 100644
index 0000000000..df2fd3c128
--- /dev/null
+++ b/bcc32/setup.mak
@@ -0,0 +1,179 @@
+# -*- makefile -*-
+
+!if "$(srcdir)" != ""
+bcc32dir = $(srcdir)/bcc32
+!elseif "$(bcc32dir)" == "bcc32/"
+srcdir = .
+!elseif "$(bcc32dir:/bcc32/=)/bcc32/" == "$(bcc32dir)"
+srcdir = $(bcc32dir:/bcc32/=)
+!else
+srcdir = $(bcc32dir)/..
+!endif
+!ifndef prefix
+prefix = /usr
+!endif
+OS = bccwin32
+RT = $(OS)
+BANG = !
+APPEND = echo.>>$(MAKEFILE)
+!ifdef MAKEFILE
+MAKE = $(MAKE) -f $(MAKEFILE)
+!else
+MAKEFILE = Makefile
+!endif
+
+all: Makefile
+Makefile: -prologue- -generic- -epilogue-
+i386-$(OS): -prologue- -i386- -epilogue-
+i486-$(OS): -prologue- -i486- -epilogue-
+i586-$(OS): -prologue- -i586- -epilogue-
+i686-$(OS): -prologue- -i686- -epilogue-
+alpha-$(OS): -prologue- -alpha- -epilogue-
+
+-prologue-: -basic-vars- -version- -system-vars-
+
+-basic-vars-: nul
+ @echo Creating $(MAKEFILE)
+ @type > $(MAKEFILE) &&|
+\#\#\# Makefile for ruby $(OS) \#\#\#
+$(BANG)ifndef srcdir
+srcdir = $(srcdir:\=/)
+$(BANG)endif
+$(BANG)ifndef prefix
+prefix = $(prefix:\=/)
+$(BANG)endif
+$(BANG)if !defined(BASERUBY)
+!if defined(BASERUBY)
+BASERUBY = $(BASERUBY)
+!endif
+|
+!if !defined(BASERUBY)
+ @for %I in (ruby.exe) do @echo BASERUBY = "%~$$PATH:I" >> $(MAKEFILE)
+!endif
+ @type >> $(MAKEFILE) &&|
+$(BANG)endif
+|
+!if exist(confargs.mk)
+ @type confargs.mk >> $(MAKEFILE)
+ @del confargs.mk
+!endif
+
+-system-vars-: -runtime- -bormm-
+
+-bormm-: nul
+ @-ilink32 -q -Gn -x usebormm.lib > nul
+ @-if exist usebormm.tds $(APPEND) MEMLIB = usebormm.lib
+ @if exist usebormm.* del usebormm.*
+
+-osname-: nul
+ @echo OS = >>$(MAKEFILE)
+
+-runtime-: nul
+ type > conftest.c &&|
+\#include <stdio.h>
+int main(){printf("");return 0;}
+|
+ bcc32 conftest.c cw32i.lib > nul
+ tdump conftest.exe < nul > conftest.i
+ grep "^Imports from CC" conftest.i > conftest.c
+ cpp32 -P- -DFile=\# -DImports=RTNAME -Dfrom== conftest.c > nul
+ $(MAKE) > nul -DBANG=$(BANG) -f &&|
+-runtime-: nul
+$(BANG)include conftest.i
+RT = $$(RTNAME:.DLL=)
+OS = $$(RT:CC32=)
+-runtime-:
+ del conftest.*
+$(BANG)if "$$(OS)" == "50"
+ echo OS = bccwin32 >> $(MAKEFILE)
+$(BANG)else
+ echo OS = bccwin32_$$(OS) >> $(MAKEFILE)
+$(BANG)endif
+|
+ @echo RT = $$(OS) >> $(MAKEFILE)
+
+-version-: nul
+ @cpp32 -I$(srcdir) -P- -o$(MAKEFILE) > nul &&|
+\#define RUBY_REVISION 0
+\#include "version.h"
+MAJOR = RUBY_API_VERSION_MAJOR
+MINOR = RUBY_API_VERSION_MINOR
+TEENY = RUBY_API_VERSION_TEENY
+
+BORLANDC = __BORLANDC__
+|
+ @$(MAKE) > nul -DBANG=$(BANG) -f &&,
+-version-: nul
+$(BANG)include $(MAKEFILE)
+$(BANG)include $(MAKEFILE).i
+-version-:
+ @del $(MAKEFILE).i
+ @type >> $(MAKEFILE) &&|
+MAJOR = $$(MAJOR)
+MINOR = $$(MINOR)
+TEENY = $$(TEENY)
+BORLANDC = $$(BORLANDC)
+|
+,
+
+-generic-: nul
+!if defined(PROCESSOR_ARCHITECTURE) || defined(PROCESSOR_LEVEL)
+ @type >> $(MAKEFILE) &&|
+!if defined(PROCESSOR_ARCHITECTURE)
+$(BANG)ifndef PROCESSOR_ARCHITECTURE
+PROCESSOR_ARCHITECTURE = $(PROCESSOR_ARCHITECTURE)
+$(BANG)endif
+!endif
+!if defined(PROCESSOR_LEVEL)
+$(BANG)ifndef PROCESSOR_LEVEL
+PROCESSOR_LEVEL = $(PROCESSOR_LEVEL)
+$(BANG)endif
+!endif
+|
+!endif
+
+-alpha-: nul
+ @$(APPEND) !ifndef PROCESSOR_ARCHITECTURE
+ @$(APPEND) PROCESSOR_ARCHITECTURE = alpha
+ @$(APPEND) !endif
+-ix86-: nul
+ @$(APPEND) !ifndef PROCESSOR_ARCHITECTURE
+ @$(APPEND) PROCESSOR_ARCHITECTURE = x86
+ @$(APPEND) !endif
+
+-i386-: -ix86-
+ @$(APPEND) !ifndef PROCESSOR_LEVEL
+ @$(APPEND) PROCESSOR_LEVEL = 3
+ @$(APPEND) !endif
+-i486-: -ix86-
+ @$(APPEND) !ifndef PROCESSOR_LEVEL
+ @$(APPEND) PROCESSOR_LEVEL = 4
+ @$(APPEND) !endif
+-i586-: -ix86-
+ @$(APPEND) !ifndef PROCESSOR_LEVEL
+ @$(APPEND) PROCESSOR_LEVEL = 5
+ @$(APPEND) !endif
+-i686-: -ix86-
+ @$(APPEND) !ifndef PROCESSOR_LEVEL
+ @$(APPEND) PROCESSOR_LEVEL = 6
+ @$(APPEND) !endif
+
+-epilogue-: -encs-
+
+-encs-: nul
+ @$(MAKE) -f $(srcdir)/win32/enc-setup.mak srcdir="$(srcdir)" MAKEFILE=$(MAKEFILE)
+
+-epilogue-: nul
+ @type >> $(MAKEFILE) &&|
+
+\# RUBY_INSTALL_NAME = ruby
+\# RUBY_SO_NAME = $$(RT)-$$(RUBY_INSTALL_NAME)$$(MAJOR)$$(MINOR)
+\# CFLAGS = -q $$(DEBUGFLAGS) $$(OPTFLAGS) $$(PROCESSOR_FLAG) -w- -wsus -wcpt -wdup -wext -wrng -wrpt -wzdi
+\# CPPFLAGS = -I. -I$$(srcdir) -I$$(srcdir)/missing -DLIBRUBY_SO=\"$$(LIBRUBY_SO)\"
+\# STACK = 0x2000000
+\# LDFLAGS = -S:$$(STACK)
+\# RFLAGS = $$(iconinc)
+\# EXTLIBS = cw32.lib import32.lib user32.lib kernel32.lib
+$(BANG)include $$(srcdir)/bcc32/Makefile.sub
+|
+ @echo type "`$(MAKE)'" to make ruby for $(OS).
diff --git a/benchmark/bm_app_answer.rb b/benchmark/bm_app_answer.rb
new file mode 100644
index 0000000000..3cd8a8fd37
--- /dev/null
+++ b/benchmark/bm_app_answer.rb
@@ -0,0 +1,15 @@
+def ack(m, n)
+ if m == 0 then
+ n + 1
+ elsif n == 0 then
+ ack(m - 1, 1)
+ else
+ ack(m - 1, ack(m, n - 1))
+ end
+end
+
+def the_answer_to_life_the_universe_and_everything
+ (ack(3,7).to_s.split(//).inject(0){|s,x| s+x.to_i}.to_s + "2" ).to_i
+end
+
+answer = the_answer_to_life_the_universe_and_everything
diff --git a/benchmark/bm_app_erb.rb b/benchmark/bm_app_erb.rb
new file mode 100644
index 0000000000..77c66a7949
--- /dev/null
+++ b/benchmark/bm_app_erb.rb
@@ -0,0 +1,26 @@
+#
+# Create many HTML strings with ERB.
+#
+
+require 'erb'
+
+data = DATA.read
+max = 15_000
+title = "hello world!"
+content = "hello world!\n" * 10
+
+max.times{
+ ERB.new(data).result(binding)
+}
+
+__END__
+
+<html>
+ <head> <%= title %> </head>
+ <body>
+ <h1> <%= title %> </h1>
+ <p>
+ <%= content %>
+ </p>
+ </body>
+</html>
diff --git a/benchmark/bm_app_factorial.rb b/benchmark/bm_app_factorial.rb
new file mode 100644
index 0000000000..45f471dfdb
--- /dev/null
+++ b/benchmark/bm_app_factorial.rb
@@ -0,0 +1,11 @@
+def fact(n)
+ if(n > 1)
+ n * fact(n-1)
+ else
+ 1
+ end
+end
+
+100.times {
+ fact(5000)
+}
diff --git a/benchmark/bm_app_fib.rb b/benchmark/bm_app_fib.rb
new file mode 100644
index 0000000000..34a7b2e725
--- /dev/null
+++ b/benchmark/bm_app_fib.rb
@@ -0,0 +1,10 @@
+def fib n
+ if n < 3
+ 1
+ else
+ fib(n-1) + fib(n-2)
+ end
+end
+
+fib(34)
+
diff --git a/benchmark/bm_app_mandelbrot.rb b/benchmark/bm_app_mandelbrot.rb
new file mode 100644
index 0000000000..801b75e8e2
--- /dev/null
+++ b/benchmark/bm_app_mandelbrot.rb
@@ -0,0 +1,23 @@
+require 'complex'
+
+def mandelbrot? z
+ i = 0
+ while i<100
+ i += 1
+ z = z * z
+ return false if z.abs > 2
+ end
+ true
+end
+
+ary = []
+
+(0..1000).each{|dx|
+ (0..1000).each{|dy|
+ x = dx / 50.0
+ y = dy / 50.0
+ c = Complex(x, y)
+ ary << c if mandelbrot?(c)
+ }
+}
+
diff --git a/benchmark/bm_app_pentomino.rb b/benchmark/bm_app_pentomino.rb
new file mode 100644
index 0000000000..59c63f358e
--- /dev/null
+++ b/benchmark/bm_app_pentomino.rb
@@ -0,0 +1,259 @@
+#!/usr/local/bin/ruby
+# This program is contributed by Shin Nishiyama
+
+
+# modified by K.Sasada
+
+NP = 5
+ROW = 8 + NP
+COL = 8
+
+$p = []
+$b = []
+$no = 0
+
+def piece(n, a, nb)
+ nb.each{|x|
+ a[n] = x
+ if n == NP-1
+ $p << [a.sort]
+ else
+ nbc=nb.dup
+ [-ROW, -1, 1, ROW].each{|d|
+ if x+d > 0 and not a.include?(x+d) and not nbc.include?(x+d)
+ nbc << x+d
+ end
+ }
+ nbc.delete x
+ piece(n+1,a[0..n],nbc)
+ end
+ }
+end
+
+def kikaku(a)
+ a.collect {|x| x - a[0]}
+end
+def ud(a)
+ kikaku(a.collect {|x| ((x+NP)%ROW)-ROW*((x+NP)/ROW) }.sort)
+end
+def rl(a)
+ kikaku(a.collect {|x| ROW*((x+NP)/ROW)+ROW-((x+NP)%ROW)}.sort)
+end
+def xy(a)
+ kikaku(a.collect {|x| ROW*((x+NP)%ROW) + (x+NP)/ROW }.sort)
+end
+
+def mkpieces
+ piece(0,[],[0])
+ $p.each do |a|
+ a0 = a[0]
+ a[1] = ud(a0)
+ a[2] = rl(a0)
+ a[3] = ud(rl(a0))
+ a[4] = xy(a0)
+ a[5] = ud(xy(a0))
+ a[6] = rl(xy(a0))
+ a[7] = ud(rl(xy(a0)))
+ a.sort!
+ a.uniq!
+ end
+ $p.uniq!.sort! {|x,y| x[0] <=> y[0] }
+end
+
+def mkboard
+ (0...ROW*COL).each{|i|
+ if i % ROW >= ROW-NP
+ $b[i] = -2
+ else
+ $b[i] = -1
+ end
+ $b[3*ROW+3]=$b[3*ROW+4]=$b[4*ROW+3]=$b[4*ROW+4]=-2
+ }
+end
+
+def pboard
+ return # skip print
+ print "No. #$no\n"
+ (0...COL).each{|i|
+ print "|"
+ (0...ROW-NP).each{|j|
+ x = $b[i*ROW+j]
+ if x < 0
+ print "..|"
+ else
+ printf "%2d|",x+1
+ end
+ }
+ print "\n"
+ }
+ print "\n"
+end
+
+$pnum=[]
+def setpiece(a,pos)
+ if a.length == $p.length then
+ $no += 1
+ pboard
+ return
+ end
+ while $b[pos] != -1
+ pos += 1
+ end
+ ($pnum - a).each do |i|
+ $p[i].each do |x|
+ f = 0
+ x.each{|s|
+ if $b[pos+s] != -1
+ f=1
+ break
+ end
+ }
+ if f == 0 then
+ x.each{|s|
+ $b[pos+s] = i
+ }
+ a << i
+ setpiece(a.dup, pos)
+ a.pop
+ x.each{|s|
+ $b[pos+s] = -1
+ }
+ end
+ end
+ end
+end
+
+mkpieces
+mkboard
+$p[4] = [$p[4][0]]
+$pnum = (0...$p.length).to_a
+setpiece([],0)
+
+
+__END__
+
+# original
+
+NP = 5
+ROW = 8 + NP
+COL = 8
+
+$p = []
+$b = []
+$no = 0
+
+def piece(n,a,nb)
+ for x in nb
+ a[n] = x
+ if n == NP-1
+ $p << [a.sort]
+ else
+ nbc=nb.dup
+ for d in [-ROW, -1, 1, ROW]
+ if x+d > 0 and not a.include?(x+d) and not nbc.include?(x+d)
+ nbc << x+d
+ end
+ end
+ nbc.delete x
+ piece(n+1,a[0..n],nbc)
+ end
+ end
+end
+
+def kikaku(a)
+ a.collect {|x| x - a[0]}
+end
+def ud(a)
+ kikaku(a.collect {|x| ((x+NP)%ROW)-ROW*((x+NP)/ROW) }.sort)
+end
+def rl(a)
+ kikaku(a.collect {|x| ROW*((x+NP)/ROW)+ROW-((x+NP)%ROW)}.sort)
+end
+def xy(a)
+ kikaku(a.collect {|x| ROW*((x+NP)%ROW) + (x+NP)/ROW }.sort)
+end
+
+def mkpieces
+ piece(0,[],[0])
+ $p.each do |a|
+ a0 = a[0]
+ a[1] = ud(a0)
+ a[2] = rl(a0)
+ a[3] = ud(rl(a0))
+ a[4] = xy(a0)
+ a[5] = ud(xy(a0))
+ a[6] = rl(xy(a0))
+ a[7] = ud(rl(xy(a0)))
+ a.sort!
+ a.uniq!
+ end
+ $p.uniq!.sort! {|x,y| x[0] <=> y[0] }
+end
+
+def mkboard
+ for i in 0...ROW*COL
+ if i % ROW >= ROW-NP
+ $b[i] = -2
+ else
+ $b[i] = -1
+ end
+ $b[3*ROW+3]=$b[3*ROW+4]=$b[4*ROW+3]=$b[4*ROW+4]=-2
+ end
+end
+
+def pboard
+ print "No. #$no\n"
+ for i in 0...COL
+ print "|"
+ for j in 0...ROW-NP
+ x = $b[i*ROW+j]
+ if x < 0
+ print "..|"
+ else
+ printf "%2d|",x+1
+ end
+ end
+ print "\n"
+ end
+ print "\n"
+end
+
+$pnum=[]
+def setpiece(a,pos)
+ if a.length == $p.length then
+ $no += 1
+ pboard
+ return
+ end
+ while $b[pos] != -1
+ pos += 1
+ end
+ ($pnum - a).each do |i|
+ $p[i].each do |x|
+ f = 0
+ for s in x do
+ if $b[pos+s] != -1
+ f=1
+ break
+ end
+ end
+ if f == 0 then
+ for s in x do
+ $b[pos+s] = i
+ end
+ a << i
+ setpiece(a.dup, pos)
+ a.pop
+ for s in x do
+ $b[pos+s] = -1
+ end
+ end
+ end
+ end
+end
+
+mkpieces
+mkboard
+$p[4] = [$p[4][0]]
+$pnum = (0...$p.length).to_a
+setpiece([],0)
diff --git a/benchmark/bm_app_raise.rb b/benchmark/bm_app_raise.rb
new file mode 100644
index 0000000000..5db8f95d50
--- /dev/null
+++ b/benchmark/bm_app_raise.rb
@@ -0,0 +1,8 @@
+i = 0
+while i<300000
+ i += 1
+ begin
+ raise
+ rescue
+ end
+end
diff --git a/benchmark/bm_app_strconcat.rb b/benchmark/bm_app_strconcat.rb
new file mode 100644
index 0000000000..7eed7c1aed
--- /dev/null
+++ b/benchmark/bm_app_strconcat.rb
@@ -0,0 +1,5 @@
+i = 0
+while i<2_000_000
+ "#{1+1} #{1+1} #{1+1}"
+ i += 1
+end
diff --git a/benchmark/bm_app_tak.rb b/benchmark/bm_app_tak.rb
new file mode 100644
index 0000000000..efe5380f4e
--- /dev/null
+++ b/benchmark/bm_app_tak.rb
@@ -0,0 +1,13 @@
+
+def tak x, y, z
+ unless y < x
+ z
+ else
+ tak( tak(x-1, y, z),
+ tak(y-1, z, x),
+ tak(z-1, x, y))
+ end
+end
+
+tak(18, 9, 0)
+
diff --git a/benchmark/bm_app_tarai.rb b/benchmark/bm_app_tarai.rb
new file mode 100644
index 0000000000..4c146f5ccf
--- /dev/null
+++ b/benchmark/bm_app_tarai.rb
@@ -0,0 +1,10 @@
+def tarai( x, y, z )
+ if x <= y
+ then y
+ else tarai(tarai(x-1, y, z),
+ tarai(y-1, z, x),
+ tarai(z-1, x, y))
+ end
+end
+
+tarai(12, 6, 0)
diff --git a/benchmark/bm_app_uri.rb b/benchmark/bm_app_uri.rb
new file mode 100644
index 0000000000..586edfd5dc
--- /dev/null
+++ b/benchmark/bm_app_uri.rb
@@ -0,0 +1,8 @@
+require 'uri'
+
+100_000.times{
+ uri = URI.parse('http://www.ruby-lang.org')
+ uri.scheme
+ uri.host
+ uri.port
+}
diff --git a/benchmark/bm_io_file_create.rb b/benchmark/bm_io_file_create.rb
new file mode 100644
index 0000000000..2f205c1333
--- /dev/null
+++ b/benchmark/bm_io_file_create.rb
@@ -0,0 +1,13 @@
+#
+# Create files
+#
+
+max = 200_000
+file = './tmpfile_of_bm_io_file_create'
+
+max.times{
+ f = open(file, 'w')
+ f.close#(true)
+}
+File.unlink(file)
+
diff --git a/benchmark/bm_io_file_read.rb b/benchmark/bm_io_file_read.rb
new file mode 100644
index 0000000000..b9e796ed30
--- /dev/null
+++ b/benchmark/bm_io_file_read.rb
@@ -0,0 +1,15 @@
+#
+# Seek and Read file.
+#
+
+require 'tempfile'
+
+max = 200_000
+str = "Hello world! " * 1000
+f = Tempfile.new('yarv-benchmark')
+f.write str
+
+max.times{
+ f.seek 0
+ f.read
+}
diff --git a/benchmark/bm_io_file_write.rb b/benchmark/bm_io_file_write.rb
new file mode 100644
index 0000000000..aa1be0e5fe
--- /dev/null
+++ b/benchmark/bm_io_file_write.rb
@@ -0,0 +1,14 @@
+#
+# Seek and Write file.
+#
+
+require 'tempfile'
+
+max = 200_000
+str = "Hello world! " * 1000
+f = Tempfile.new('yarv-benchmark')
+
+max.times{
+ f.seek 0
+ f.write str
+}
diff --git a/benchmark/bm_io_select.rb b/benchmark/bm_io_select.rb
new file mode 100644
index 0000000000..19248daeb1
--- /dev/null
+++ b/benchmark/bm_io_select.rb
@@ -0,0 +1,9 @@
+# IO.select performance
+
+w = [ IO.pipe[1] ];
+
+nr = 1000000
+nr.times {
+ IO.select nil, w
+}
+
diff --git a/benchmark/bm_io_select2.rb b/benchmark/bm_io_select2.rb
new file mode 100644
index 0000000000..10e37d71b2
--- /dev/null
+++ b/benchmark/bm_io_select2.rb
@@ -0,0 +1,22 @@
+# IO.select performance. worst case of single fd.
+
+ios = []
+nr = 1000000
+if defined?(Process::RLIMIT_NOFILE)
+ max = Process.getrlimit(Process::RLIMIT_NOFILE)[0]
+else
+ max = 64
+end
+puts "max fd: #{max} (results not apparent with <= 1024 max fd)"
+
+((max / 2) - 10).times do
+ ios.concat IO.pipe
+end
+
+last = [ ios[-1] ]
+puts "last IO: #{last[0].inspect}"
+
+nr.times do
+ IO.select nil, last
+end
+
diff --git a/benchmark/bm_io_select3.rb b/benchmark/bm_io_select3.rb
new file mode 100644
index 0000000000..7d0ba1f092
--- /dev/null
+++ b/benchmark/bm_io_select3.rb
@@ -0,0 +1,21 @@
+# IO.select performance. a lot of fd
+
+ios = []
+nr = 100
+if defined?(Process::RLIMIT_NOFILE)
+ max = Process.getrlimit(Process::RLIMIT_NOFILE)[0]
+else
+ max = 64
+end
+puts "max fd: #{max} (results not apparent with <= 1024 max fd)"
+
+(max - 10).times do
+ r, w = IO.pipe
+ r.close
+ ios.push w
+end
+
+nr.times do
+ IO.select nil, ios
+end
+
diff --git a/benchmark/bm_loop_for.rb b/benchmark/bm_loop_for.rb
new file mode 100644
index 0000000000..0fc4cc1511
--- /dev/null
+++ b/benchmark/bm_loop_for.rb
@@ -0,0 +1,3 @@
+for i in 1..30_000_000
+ #
+end
diff --git a/benchmark/bm_loop_generator.rb b/benchmark/bm_loop_generator.rb
new file mode 100644
index 0000000000..d3375c744c
--- /dev/null
+++ b/benchmark/bm_loop_generator.rb
@@ -0,0 +1,14 @@
+max = 600000
+
+if defined? Fiber
+ gen = (1..max).each
+ loop do
+ gen.next
+ end
+else
+ require 'generator'
+ gen = Generator.new((0..max))
+ while gen.next?
+ gen.next
+ end
+end
diff --git a/benchmark/bm_loop_times.rb b/benchmark/bm_loop_times.rb
new file mode 100644
index 0000000000..521f72ad1a
--- /dev/null
+++ b/benchmark/bm_loop_times.rb
@@ -0,0 +1 @@
+30_000_000.times{|e|}
diff --git a/benchmark/bm_loop_whileloop.rb b/benchmark/bm_loop_whileloop.rb
new file mode 100644
index 0000000000..0072822c06
--- /dev/null
+++ b/benchmark/bm_loop_whileloop.rb
@@ -0,0 +1,4 @@
+i = 0
+while i<30_000_000 # benchmark loop 1
+ i += 1
+end
diff --git a/benchmark/bm_loop_whileloop2.rb b/benchmark/bm_loop_whileloop2.rb
new file mode 100644
index 0000000000..47d02dffc4
--- /dev/null
+++ b/benchmark/bm_loop_whileloop2.rb
@@ -0,0 +1,4 @@
+i = 0
+while i< 6_000_000 # benchmark loop 2
+ i += 1
+end
diff --git a/benchmark/bm_so_ackermann.rb b/benchmark/bm_so_ackermann.rb
new file mode 100644
index 0000000000..7db5be9050
--- /dev/null
+++ b/benchmark/bm_so_ackermann.rb
@@ -0,0 +1,19 @@
+#!/usr/bin/ruby
+# -*- mode: ruby -*-
+# $Id: ackermann-ruby.code,v 1.4 2004/11/13 07:40:41 bfulgham Exp $
+# http://www.bagley.org/~doug/shootout/
+
+def ack(m, n)
+ if m == 0 then
+ n + 1
+ elsif n == 0 then
+ ack(m - 1, 1)
+ else
+ ack(m - 1, ack(m, n - 1))
+ end
+end
+
+NUM = 9
+ack(3, NUM)
+
+
diff --git a/benchmark/bm_so_array.rb b/benchmark/bm_so_array.rb
new file mode 100644
index 0000000000..2b8fce8f99
--- /dev/null
+++ b/benchmark/bm_so_array.rb
@@ -0,0 +1,23 @@
+#!/usr/bin/ruby
+# -*- mode: ruby -*-
+# $Id: ary-ruby.code,v 1.4 2004/11/13 07:41:27 bfulgham Exp $
+# http://www.bagley.org/~doug/shootout/
+# with help from Paul Brannan and Mark Hubbart
+
+n = 9000 # Integer(ARGV.shift || 1)
+
+x = Array.new(n)
+y = Array.new(n, 0)
+
+n.times{|bi|
+ x[bi] = bi + 1
+}
+
+(0 .. 999).each do |e|
+ (n-1).step(0,-1) do |bi|
+ y[bi] += x.at(bi)
+ end
+end
+# puts "#{y.first} #{y.last}"
+
+
diff --git a/benchmark/bm_so_binary_trees.rb b/benchmark/bm_so_binary_trees.rb
new file mode 100644
index 0000000000..6a26465578
--- /dev/null
+++ b/benchmark/bm_so_binary_trees.rb
@@ -0,0 +1,57 @@
+# The Computer Language Shootout Benchmarks
+# http://shootout.alioth.debian.org
+#
+# contributed by Jesse Millikan
+
+# disable output
+def STDOUT.write_ *args
+end
+
+def item_check(tree)
+ if tree[0] == nil
+ tree[1]
+ else
+ tree[1] + item_check(tree[0]) - item_check(tree[2])
+ end
+end
+
+def bottom_up_tree(item, depth)
+ if depth > 0
+ item_item = 2 * item
+ depth -= 1
+ [bottom_up_tree(item_item - 1, depth), item, bottom_up_tree(item_item, depth)]
+ else
+ [nil, item, nil]
+ end
+end
+
+max_depth = 12 # 16 # ARGV[0].to_i
+min_depth = 4
+
+max_depth = min_depth + 2 if min_depth + 2 > max_depth
+
+stretch_depth = max_depth + 1
+stretch_tree = bottom_up_tree(0, stretch_depth)
+
+puts "stretch tree of depth #{stretch_depth}\t check: #{item_check(stretch_tree)}"
+stretch_tree = nil
+
+long_lived_tree = bottom_up_tree(0, max_depth)
+
+min_depth.step(max_depth + 1, 2) do |depth|
+ iterations = 2**(max_depth - depth + min_depth)
+
+ check = 0
+
+ for i in 1..iterations
+ temp_tree = bottom_up_tree(i, depth)
+ check += item_check(temp_tree)
+
+ temp_tree = bottom_up_tree(-i, depth)
+ check += item_check(temp_tree)
+ end
+
+ puts "#{iterations * 2}\t trees of depth #{depth}\t check: #{check}"
+end
+
+puts "long lived tree of depth #{max_depth}\t check: #{item_check(long_lived_tree)}"
diff --git a/benchmark/bm_so_concatenate.rb b/benchmark/bm_so_concatenate.rb
new file mode 100644
index 0000000000..873214de7c
--- /dev/null
+++ b/benchmark/bm_so_concatenate.rb
@@ -0,0 +1,18 @@
+#!/usr/bin/ruby
+# -*- mode: ruby -*-
+# $Id: strcat-ruby.code,v 1.4 2004/11/13 07:43:28 bfulgham Exp $
+# http://www.bagley.org/~doug/shootout/
+# based on code from Aristarkh A Zagorodnikov and Dat Nguyen
+
+STUFF = "hello\n"
+i = 0
+while i<10
+ i += 1
+ hello = ''
+ 4_000_000.times do |e|
+ hello << STUFF
+ end
+end
+# puts hello.length
+
+
diff --git a/benchmark/bm_so_count_words.rb b/benchmark/bm_so_count_words.rb
new file mode 100644
index 0000000000..65f6337a4a
--- /dev/null
+++ b/benchmark/bm_so_count_words.rb
@@ -0,0 +1,19 @@
+#!/usr/bin/ruby
+# -*- mode: ruby -*-
+# $Id: wc-ruby.code,v 1.4 2004/11/13 07:43:32 bfulgham Exp $
+# http://www.bagley.org/~doug/shootout/
+# with help from Paul Brannan
+
+input = open(File.join(File.dirname($0), 'wc.input'), 'rb')
+
+nl = nw = nc = 0
+while true
+ tmp = input.read(4096) or break
+ data = tmp << (input.gets || "")
+ nc += data.length
+ nl += data.count("\n")
+ ((data.strip! || data).tr!("\n", " ") || data).squeeze!
+ nw += data.count(" ") + 1
+end
+# STDERR.puts "#{nl} #{nw} #{nc}"
+
diff --git a/benchmark/bm_so_exception.rb b/benchmark/bm_so_exception.rb
new file mode 100644
index 0000000000..deb003a594
--- /dev/null
+++ b/benchmark/bm_so_exception.rb
@@ -0,0 +1,61 @@
+#!/usr/bin/ruby
+# -*- mode: ruby -*-
+# $Id: except-ruby.code,v 1.4 2004/11/13 07:41:33 bfulgham Exp $
+# http://www.bagley.org/~doug/shootout/
+
+$HI = 0
+$LO = 0
+NUM = 250000 # Integer(ARGV[0] || 1)
+
+
+class Lo_Exception < Exception
+ def initialize(num)
+ @value = num
+ end
+end
+
+class Hi_Exception < Exception
+ def initialize(num)
+ @value = num
+ end
+end
+
+def some_function(num)
+ begin
+ hi_function(num)
+ rescue
+ print "We shouldn't get here, exception is: #{$!.type}\n"
+ end
+end
+
+def hi_function(num)
+ begin
+ lo_function(num)
+ rescue Hi_Exception
+ $HI = $HI + 1
+ end
+end
+
+def lo_function(num)
+ begin
+ blowup(num)
+ rescue Lo_Exception
+ $LO = $LO + 1
+ end
+end
+
+def blowup(num)
+ if num % 2 == 0
+ raise Lo_Exception.new(num)
+ else
+ raise Hi_Exception.new(num)
+ end
+end
+
+
+i = 1
+max = NUM+1
+while i < max
+ i += 1
+ some_function(i+1)
+end
diff --git a/benchmark/bm_so_fannkuch.rb b/benchmark/bm_so_fannkuch.rb
new file mode 100644
index 0000000000..bac5ecd44c
--- /dev/null
+++ b/benchmark/bm_so_fannkuch.rb
@@ -0,0 +1,45 @@
+# The Computer Language Shootout
+# http://shootout.alioth.debian.org/
+# Contributed by Sokolov Yura
+# Modified by Ryan Williams
+
+def fannkuch(n)
+ maxFlips, m, r, check = 0, n-1, n, 0
+ count = (1..n).to_a
+ perm = (1..n).to_a
+
+ while true
+ if check < 30
+ puts "#{perm}"
+ check += 1
+ end
+
+ while r != 1
+ count[r-1] = r
+ r -= 1
+ end
+
+ if perm[0] != 1 and perm[m] != n
+ perml = perm.clone #.dup
+ flips = 0
+ while (k = perml.first ) != 1
+ perml = perml.slice!(0, k).reverse + perml
+ flips += 1
+ end
+ maxFlips = flips if flips > maxFlips
+ end
+ while true
+ if r==n then return maxFlips end
+ perm.insert r,perm.shift
+ break if (count[r] -= 1) > 0
+ r += 1
+ end
+ end
+end
+
+def puts *args
+end
+
+N = 9 # (ARGV[0] || 1).to_i
+puts "Pfannkuchen(#{N}) = #{fannkuch(N)}"
+
diff --git a/benchmark/bm_so_fasta.rb b/benchmark/bm_so_fasta.rb
new file mode 100644
index 0000000000..3f759ba7ae
--- /dev/null
+++ b/benchmark/bm_so_fasta.rb
@@ -0,0 +1,81 @@
+# The Computer Language Shootout
+# http://shootout.alioth.debian.org/
+# Contributed by Sokolov Yura
+
+$last = 42.0
+def gen_random (max,im=139968,ia=3877,ic=29573)
+ (max * ($last = ($last * ia + ic) % im)) / im
+end
+
+alu =
+ "GGCCGGGCGCGGTGGCTCACGCCTGTAATCCCAGCACTTTGG"+
+ "GAGGCCGAGGCGGGCGGATCACCTGAGGTCAGGAGTTCGAGA"+
+ "CCAGCCTGGCCAACATGGTGAAACCCCGTCTCTACTAAAAAT"+
+ "ACAAAAATTAGCCGGGCGTGGTGGCGCGCGCCTGTAATCCCA"+
+ "GCTACTCGGGAGGCTGAGGCAGGAGAATCGCTTGAACCCGGG"+
+ "AGGCGGAGGTTGCAGTGAGCCGAGATCGCGCCACTGCACTCC"+
+ "AGCCTGGGCGACAGAGCGAGACTCCGTCTCAAAAA"
+
+iub = [
+ ["a", 0.27],
+ ["c", 0.12],
+ ["g", 0.12],
+ ["t", 0.27],
+
+ ["B", 0.02],
+ ["D", 0.02],
+ ["H", 0.02],
+ ["K", 0.02],
+ ["M", 0.02],
+ ["N", 0.02],
+ ["R", 0.02],
+ ["S", 0.02],
+ ["V", 0.02],
+ ["W", 0.02],
+ ["Y", 0.02],
+]
+homosapiens = [
+ ["a", 0.3029549426680],
+ ["c", 0.1979883004921],
+ ["g", 0.1975473066391],
+ ["t", 0.3015094502008],
+]
+
+def make_repeat_fasta(id, desc, src, n)
+ puts ">#{id} #{desc}"
+ v = nil
+ width = 60
+ l = src.length
+ s = src * ((n / l) + 1)
+ s.slice!(n, l)
+ puts(s.scan(/.{1,#{width}}/).join("\n"))
+end
+
+def make_random_fasta(id, desc, table, n)
+ puts ">#{id} #{desc}"
+ rand, v = nil,nil
+ width = 60
+ chunk = 1 * width
+ prob = 0.0
+ table.each{|v| v[1]= (prob += v[1])}
+ for i in 1..(n/width)
+ puts((1..width).collect{
+ rand = gen_random(1.0)
+ table.find{|v| v[1]>rand}[0]
+ }.join)
+ end
+ if n%width != 0
+ puts((1..(n%width)).collect{
+ rand = gen_random(1.0)
+ table.find{|v| v[1]>rand}[0]
+ }.join)
+ end
+end
+
+
+n = (ARGV[0] or 250_000).to_i
+
+make_repeat_fasta('ONE', 'Homo sapiens alu', alu, n*2)
+make_random_fasta('TWO', 'IUB ambiguity codes', iub, n*3)
+make_random_fasta('THREE', 'Homo sapiens frequency', homosapiens, n*5)
+
diff --git a/benchmark/bm_so_k_nucleotide.rb b/benchmark/bm_so_k_nucleotide.rb
new file mode 100644
index 0000000000..dadab3e79c
--- /dev/null
+++ b/benchmark/bm_so_k_nucleotide.rb
@@ -0,0 +1,48 @@
+# The Computer Language Shootout
+# http://shootout.alioth.debian.org
+#
+# contributed by jose fco. gonzalez
+# modified by Sokolov Yura
+
+seq = String.new
+
+def frecuency( seq,length )
+ n, table = seq.length - length + 1, Hash.new(0)
+ f, i = nil, nil
+ (0 ... length).each do |f|
+ (f ... n).step(length) do |i|
+ table[seq[i,length]] += 1
+ end
+ end
+ [n,table]
+
+end
+
+def sort_by_freq( seq,length )
+ n,table = frecuency( seq,length )
+ a, b, v = nil, nil, nil
+ table.sort{|a,b| b[1] <=> a[1]}.each do |v|
+ puts "%s %.3f" % [v[0].upcase,((v[1]*100).to_f/n)]
+ end
+ puts
+end
+
+def find_seq( seq,s )
+ n,table = frecuency( seq,s.length )
+ puts "#{table[s].to_s}\t#{s.upcase}"
+end
+
+input = open(File.join(File.dirname($0), 'fasta.output.100000'), 'rb')
+
+line = input.gets while line !~ /^>THREE/
+line = input.gets
+
+while (line !~ /^>/) & line do
+ seq << line.chomp
+ line = input.gets
+end
+
+[1,2].each {|i| sort_by_freq( seq,i ) }
+
+%w(ggt ggta ggtatt ggtattttaatt ggtattttaatttatagt).each{|s| find_seq( seq,s) }
+
diff --git a/benchmark/bm_so_lists.rb b/benchmark/bm_so_lists.rb
new file mode 100644
index 0000000000..e8f4a2a5f7
--- /dev/null
+++ b/benchmark/bm_so_lists.rb
@@ -0,0 +1,47 @@
+#from http://www.bagley.org/~doug/shootout/bench/lists/lists.ruby
+
+NUM = 300
+SIZE = 10000
+
+def test_lists()
+ # create a list of integers (Li1) from 1 to SIZE
+ li1 = (1..SIZE).to_a
+ # copy the list to li2 (not by individual items)
+ li2 = li1.dup
+ # remove each individual item from left side of li2 and
+ # append to right side of li3 (preserving order)
+ li3 = Array.new
+ while (not li2.empty?)
+ li3.push(li2.shift)
+ end
+ # li2 must now be empty
+ # remove each individual item from right side of li3 and
+ # append to right side of li2 (reversing list)
+ while (not li3.empty?)
+ li2.push(li3.pop)
+ end
+ # li3 must now be empty
+ # reverse li1 in place
+ li1.reverse!
+ # check that first item is now SIZE
+ if li1[0] != SIZE then
+ p "not SIZE"
+ 0
+ else
+ # compare li1 and li2 for equality
+ if li1 != li2 then
+ return(0)
+ else
+ # return the length of the list
+ li1.length
+ end
+ end
+end
+
+i = 0
+while i<NUM
+ i += 1
+ result = test_lists()
+end
+
+result
diff --git a/benchmark/bm_so_mandelbrot.rb b/benchmark/bm_so_mandelbrot.rb
new file mode 100644
index 0000000000..76331c64b8
--- /dev/null
+++ b/benchmark/bm_so_mandelbrot.rb
@@ -0,0 +1,57 @@
+# The Computer Language Benchmarks Game
+# http://shootout.alioth.debian.org/
+#
+# contributed by Karl von Laudermann
+# modified by Jeremy Echols
+
+size = 600 # ARGV[0].to_i
+
+puts "P4\n#{size} #{size}"
+
+ITER = 49 # Iterations - 1 for easy for..in looping
+LIMIT_SQUARED = 4.0 # Presquared limit
+
+byte_acc = 0
+bit_num = 0
+
+count_size = size - 1 # Precomputed size for easy for..in looping
+
+# For..in loops are faster than .upto, .downto, .times, etc.
+for y in 0..count_size
+ for x in 0..count_size
+ zr = 0.0
+ zi = 0.0
+ cr = (2.0*x/size)-1.5
+ ci = (2.0*y/size)-1.0
+ escape = false
+
+ # To make use of the for..in code, we use a dummy variable,
+ # like one would in C
+ for dummy in 0..ITER
+ tr = zr*zr - zi*zi + cr
+ ti = 2*zr*zi + ci
+ zr, zi = tr, ti
+
+ if (zr*zr+zi*zi) > LIMIT_SQUARED
+ escape = true
+ break
+ end
+ end
+
+ byte_acc = (byte_acc << 1) | (escape ? 0b0 : 0b1)
+ bit_num += 1
+
+ # Code is very similar for these cases, but using separate blocks
+ # ensures we skip the shifting when it's unnecessary, which is most cases.
+ if (bit_num == 8)
+ print byte_acc.chr
+ byte_acc = 0
+ bit_num = 0
+ elsif (x == count_size)
+ byte_acc <<= (8 - bit_num)
+ print byte_acc.chr
+ byte_acc = 0
+ bit_num = 0
+ end
+ end
+end
diff --git a/benchmark/bm_so_matrix.rb b/benchmark/bm_so_matrix.rb
new file mode 100644
index 0000000000..e2c5c8e559
--- /dev/null
+++ b/benchmark/bm_so_matrix.rb
@@ -0,0 +1,48 @@
+#!/usr/bin/ruby
+# -*- mode: ruby -*-
+# $Id: matrix-ruby.code,v 1.4 2004/11/13 07:42:14 bfulgham Exp $
+# http://www.bagley.org/~doug/shootout/
+
+n = 60 #Integer(ARGV.shift || 1)
+
+size = 40
+
+def mkmatrix(rows, cols)
+ count = 1
+ mx = Array.new(rows)
+ (0 .. (rows - 1)).each do |bi|
+ row = Array.new(cols, 0)
+ (0 .. (cols - 1)).each do |j|
+ row[j] = count
+ count += 1
+ end
+ mx[bi] = row
+ end
+ mx
+end
+
+def mmult(rows, cols, m1, m2)
+ m3 = Array.new(rows)
+ (0 .. (rows - 1)).each do |bi|
+ row = Array.new(cols, 0)
+ (0 .. (cols - 1)).each do |j|
+ val = 0
+ (0 .. (cols - 1)).each do |k|
+ val += m1.at(bi).at(k) * m2.at(k).at(j)
+ end
+ row[j] = val
+ end
+ m3[bi] = row
+ end
+ m3
+end
+
+m1 = mkmatrix(size, size)
+m2 = mkmatrix(size, size)
+mm = Array.new
+n.times do
+ mm = mmult(size, size, m1, m2)
+end
+# puts "#{mm[0][0]} #{mm[2][3]} #{mm[3][2]} #{mm[4][4]}"
+
+
diff --git a/benchmark/bm_so_meteor_contest.rb b/benchmark/bm_so_meteor_contest.rb
new file mode 100644
index 0000000000..99cf6a91cc
--- /dev/null
+++ b/benchmark/bm_so_meteor_contest.rb
@@ -0,0 +1,564 @@
+#!/usr/bin/env ruby
+#
+# The Computer Language Shootout
+# http://shootout.alioth.debian.org
+# contributed by Kevin Barnes (Ruby novice)
+
+# PROGRAM: the main body is at the bottom.
+# 1) read about the problem here: http://www-128.ibm.com/developerworks/java/library/j-javaopt/
+# 2) see how I represent a board as a bitmask by reading the blank_board comments
+# 3) read as your mental paths take you
+
+def print *args
+end
+
+# class to represent all information about a particular rotation of a particular piece
+class Rotation
+ # an array (by location) containing a bit mask for how the piece maps at the given location.
+ # if the rotation is invalid at that location the mask will contain false
+ attr_reader :start_masks
+
+ # maps a direction to a relative location. these differ depending on whether it is an even or
+ # odd row being mapped from
+ @@rotation_even_adder = { :west => -1, :east => 1, :nw => -7, :ne => -6, :sw => 5, :se => 6 }
+ @@rotation_odd_adder = { :west => -1, :east => 1, :nw => -6, :ne => -5, :sw => 6, :se => 7 }
+
+ def initialize( directions )
+ @even_offsets, @odd_offsets = normalize_offsets( get_values( directions ))
+
+ @even_mask = mask_for_offsets( @even_offsets)
+ @odd_mask = mask_for_offsets( @odd_offsets)
+
+ @start_masks = Array.new(60)
+
+ # create the rotational masks by placing the base mask at the location and seeing if
+ # 1) it overlaps the boundries and 2) it produces a prunable board. if either of these
+ # is true the piece cannot be placed
+ 0.upto(59) do | offset |
+ mask = is_even(offset) ? (@even_mask << offset) : (@odd_mask << offset)
+ if (blank_board & mask == 0 && !prunable(blank_board | mask, 0, true)) then
+ imask = compute_required( mask, offset)
+ @start_masks[offset] = [ mask, imask, imask | mask ]
+ else
+ @start_masks[offset] = false
+ end
+ end
+ end
+
+ def compute_required( mask, offset )
+ board = blank_board
+ 0.upto(offset) { | i | board |= 1 << i }
+ board |= mask
+ return 0 if (!prunable(board | mask, offset))
+ board = flood_fill(board,58)
+ count = 0
+ imask = 0
+ 0.upto(59) do | i |
+ if (board[i] == 0) then
+ imask |= (1 << i)
+ count += 1
+ end
+ end
+ (count > 0 && count < 5) ? imask : 0
+ end
+
+ def flood_fill( board, location)
+ return board if (board[location] == 1)
+ board |= 1 << location
+ row, col = location.divmod(6)
+ board = flood_fill( board, location - 1) if (col > 0)
+ board = flood_fill( board, location + 1) if (col < 4)
+ if (row % 2 == 0) then
+ board = flood_fill( board, location - 7) if (col > 0 && row > 0)
+ board = flood_fill( board, location - 6) if (row > 0)
+ board = flood_fill( board, location + 6) if (row < 9)
+ board = flood_fill( board, location + 5) if (col > 0 && row < 9)
+ else
+ board = flood_fill( board, location - 5) if (col < 4 && row > 0)
+ board = flood_fill( board, location - 6) if (row > 0)
+ board = flood_fill( board, location + 6) if (row < 9)
+ board = flood_fill( board, location + 7) if (col < 4 && row < 9)
+ end
+ board
+ end
+
+ # given a location, produces a list of relative locations covered by the piece at this rotation
+ def offsets( location)
+ if is_even( location) then
+ @even_offsets.collect { | value | value + location }
+ else
+ @odd_offsets.collect { | value | value + location }
+ end
+ end
+
+ # returns a set of offsets relative to the top-left most piece of the rotation (by even or odd rows)
+ # this is hard to explain. imagine we have this partial board:
+ # 0 0 0 0 0 x [positions 0-5]
+ # 0 0 1 1 0 x [positions 6-11]
+ # 0 0 1 0 0 x [positions 12-17]
+ # 0 1 0 0 0 x [positions 18-23]
+ # 0 1 0 0 0 x [positions 24-29]
+ # 0 0 0 0 0 x [positions 30-35]
+ # ...
+ # The top-left of the piece is at position 8, the
+ # board would be passed as a set of positions (values array) containing [8,9,14,19,25] not necessarily in that
+ # sorted order. Since that array starts on an odd row, the offsets for an odd row are: [0,1,6,11,17] obtained
+ # by subtracting 8 from everything. Now imagine the piece shifted up and to the right so it's on an even row:
+ # 0 0 0 1 1 x [positions 0-5]
+ # 0 0 1 0 0 x [positions 6-11]
+ # 0 0 1 0 0 x [positions 12-17]
+ # 0 1 0 0 0 x [positions 18-23]
+ # 0 0 0 0 0 x [positions 24-29]
+ # 0 0 0 0 0 x [positions 30-35]
+ # ...
+ # Now the positions are [3,4,8,14,19] which after subtracting the lowest value (3) gives [0,1,5,11,16] thus, the
+ # offsets for this particular piece are (in even, odd order) [0,1,5,11,16],[0,1,6,11,17] which is what
+ # this function would return
+ def normalize_offsets( values)
+ min = values.min
+ even_min = is_even(min)
+ other_min = even_min ? min + 6 : min + 7
+ other_values = values.collect do | value |
+ if is_even(value) then
+ value + 6 - other_min
+ else
+ value + 7 - other_min
+ end
+ end
+ values.collect! { | value | value - min }
+
+ if even_min then
+ [values, other_values]
+ else
+ [other_values, values]
+ end
+ end
+
+ # produce a bitmask representation of an array of offset locations
+ def mask_for_offsets( offsets )
+ mask = 0
+ offsets.each { | value | mask = mask + ( 1 << value ) }
+ mask
+ end
+
+ # finds a "safe" position that a position as described by a list of directions can be placed
+ # without falling off any edge of the board. the values returned a location to place the first piece
+ # at so it will fit after making the described moves
+ def start_adjust( directions )
+ south = east = 0;
+ directions.each do | direction |
+ east += 1 if ( direction == :sw || direction == :nw || direction == :west )
+ south += 1 if ( direction == :nw || direction == :ne )
+ end
+ south * 6 + east
+ end
+
+ # given a set of directions places the piece (as defined by a set of directions) on the board at
+ # a location that will not take it off the edge
+ def get_values ( directions )
+ start = start_adjust(directions)
+ values = [ start ]
+ directions.each do | direction |
+ if (start % 12 >= 6) then
+ start += @@rotation_odd_adder[direction]
+ else
+ start += @@rotation_even_adder[direction]
+ end
+ values += [ start ]
+ end
+
+ # some moves take you back to an existing location, we'll strip duplicates
+ values.uniq
+ end
+end
+
+# describes a piece and caches information about its rotations to as to be efficient for iteration
+# ATTRIBUTES:
+# rotations -- all the rotations of the piece
+# type -- a numeic "name" of the piece
+# masks -- an array by location of all legal rotational masks (a n inner array) for that location
+# placed -- the mask that this piece was last placed at (not a location, but the actual mask used)
+class Piece
+ attr_reader :rotations, :type, :masks
+ attr_accessor :placed
+
+ # transform hashes that change one direction into another when you either flip or rotate a set of directions
+ @@flip_converter = { :west => :west, :east => :east, :nw => :sw, :ne => :se, :sw => :nw, :se => :ne }
+ @@rotate_converter = { :west => :nw, :east => :se, :nw => :ne, :ne => :east, :sw => :west, :se => :sw }
+
+ def initialize( directions, type )
+ @type = type
+ @rotations = Array.new();
+ @map = {}
+
+ generate_rotations( directions )
+ directions.collect! { | value | @@flip_converter[value] }
+ generate_rotations( directions )
+
+ # creates the masks AND a map that returns [location, rotation] for any given mask
+ # this is used when a board is found and we want to draw it, otherwise the map is unused
+ @masks = Array.new();
+ 0.upto(59) do | i |
+ even = true
+ @masks[i] = @rotations.collect do | rotation |
+ mask = rotation.start_masks[i]
+ @map[mask[0]] = [ i, rotation ] if (mask)
+ mask || nil
+ end
+ @masks[i].compact!
+ end
+ end
+
+ # rotates a set of directions through all six angles and adds a Rotation to the list for each one
+ def generate_rotations( directions )
+ 6.times do
+ rotations.push( Rotation.new(directions))
+ directions.collect! { | value | @@rotate_converter[value] }
+ end
+ end
+
+ # given a board string, adds this piece to the board at whatever location/rotation
+ # important: the outbound board string is 5 wide, the normal location notation is six wide (padded)
+ def fill_string( board_string)
+ location, rotation = @map[@placed]
+ rotation.offsets(location).each do | offset |
+ row, col = offset.divmod(6)
+ board_string[ row*5 + col, 1 ] = @type.to_s
+ end
+ end
+end
+
+# a blank bit board having this form:
+#
+# 0 0 0 0 0 1
+# 0 0 0 0 0 1
+# 0 0 0 0 0 1
+# 0 0 0 0 0 1
+# 0 0 0 0 0 1
+# 0 0 0 0 0 1
+# 0 0 0 0 0 1
+# 0 0 0 0 0 1
+# 0 0 0 0 0 1
+# 0 0 0 0 0 1
+# 1 1 1 1 1 1
+#
+# where left lest significant bit is the top left and the most significant is the lower right
+# the actual board only consists of the 0 places, the 1 places are blockers to keep things from running
+# off the edges or bottom
+def blank_board
+ 0b111111100000100000100000100000100000100000100000100000100000100000
+end
+
+def full_board
+ 0b111111111111111111111111111111111111111111111111111111111111111111
+end
+
+# determines if a location (bit position) is in an even row
+def is_even( location)
+ (location % 12) < 6
+end
+
+# support function that create three utility maps:
+# $converter -- for each row an array that maps a five bit row (via array mapping)
+# to the a a five bit representation of the bits below it
+# $bit_count -- maps a five bit row (via array mapping) to the number of 1s in the row
+# @@new_regions -- maps a five bit row (via array mapping) to an array of "region" arrays
+# a region array has three values the first is a mask of bits in the region,
+# the second is the count of those bits and the third is identical to the first
+# examples:
+# 0b10010 => [ 0b01100, 2, 0b01100 ], [ 0b00001, 1, 0b00001]
+# 0b01010 => [ 0b10000, 1, 0b10000 ], [ 0b00100, 1, 0b00100 ], [ 0b00001, 1, 0b00001]
+# 0b10001 => [ 0b01110, 3, 0b01110 ]
+def create_collector_support
+ odd_map = [0b11, 0b110, 0b1100, 0b11000, 0b10000]
+ even_map = [0b1, 0b11, 0b110, 0b1100, 0b11000]
+
+ all_odds = Array.new(0b100000)
+ all_evens = Array.new(0b100000)
+ bit_counts = Array.new(0b100000)
+ new_regions = Array.new(0b100000)
+ 0.upto(0b11111) do | i |
+ bit_count = odd = even = 0
+ 0.upto(4) do | bit |
+ if (i[bit] == 1) then
+ bit_count += 1
+ odd |= odd_map[bit]
+ even |= even_map[bit]
+ end
+ end
+ all_odds[i] = odd
+ all_evens[i] = even
+ bit_counts[i] = bit_count
+ new_regions[i] = create_regions( i)
+ end
+
+ $converter = []
+ 10.times { | row | $converter.push((row % 2 == 0) ? all_evens : all_odds) }
+ $bit_counts = bit_counts
+ $regions = new_regions.collect { | set | set.collect { | value | [ value, bit_counts[value], value] } }
+end
+
+# determines if a board is punable, meaning that there is no possibility that it
+# can be filled up with pieces. A board is prunable if there is a grouping of unfilled spaces
+# that are not a multiple of five. The following board is an example of a prunable board:
+# 0 0 1 0 0
+# 0 1 0 0 0
+# 1 1 0 0 0
+# 0 1 0 0 0
+# 0 0 0 0 0
+# ...
+#
+# This board is prunable because the top left corner is only 3 bits in area, no piece will ever fit it
+# parameters:
+# board -- an initial bit board (6 bit padded rows, see blank_board for format)
+# location -- starting location, everything above and to the left is already full
+# slotting -- set to true only when testing initial pieces, when filling normally
+# additional assumptions are possible
+#
+# Algorithm:
+# The algorithm starts at the top row (as determined by location) and iterates a row at a time
+# maintainng counts of active open areas (kept in the collector array) each collector contains
+# three values at the start of an iteration:
+# 0: mask of bits that would be adjacent to the collector in this row
+# 1: the number of bits collected so far
+# 2: a scratch space starting as zero, but used during the computation to represent
+# the empty bits in the new row that are adjacent (position 0)
+# The exact procedure is described in-code
+def prunable( board, location, slotting = false)
+ collectors = []
+ # loop accross the rows
+ (location / 6).to_i.upto(9) do | row_on |
+ # obtain a set of regions representing the bits of the curent row.
+ regions = $regions[(board >> (row_on * 6)) & 0b11111]
+ converter = $converter[row_on]
+
+ # track the number of collectors at the start of the cycle so that
+ # we don't compute against newly created collectors, only existing collectors
+ initial_collector_count = collectors.length
+
+ # loop against the regions. For each region of the row
+ # we will see if it connects to one or more existing collectors.
+ # if it connects to 1 collector, the bits from the region are added to the
+ # bits of the collector and the mask is placed in collector[2]
+ # If the region overlaps more than one collector then all the collectors
+ # it overlaps with are merged into the first one (the others are set to nil in the array)
+ # if NO collectors are found then the region is copied as a new collector
+ regions.each do | region |
+ collector_found = nil
+ region_mask = region[2]
+ initial_collector_count.times do | collector_num |
+ collector = collectors[collector_num]
+ if (collector) then
+ collector_mask = collector[0]
+ if (collector_mask & region_mask != 0) then
+ if (collector_found) then
+ collector_found[0] |= collector_mask
+ collector_found[1] += collector[1]
+ collector_found[2] |= collector[2]
+ collectors[collector_num] = nil
+ else
+ collector_found = collector
+ collector[1] += region[1]
+ collector[2] |= region_mask
+ end
+ end
+ end
+ end
+ if (collector_found == nil) then
+ collectors.push(Array.new(region))
+ end
+ end
+
+ # check the existing collectors, if any collector overlapped no bits in the region its [2] value will
+ # be zero. The size of any such reaason is tested if it is not a muliple of five true is returned since
+ # the board is prunable. if it is a multiple of five it is removed.
+ # Collector that are still active have a new adjacent value [0] set based n the matched bits
+ # and have [2] cleared out for the next cycle.
+ collectors.length.times do | collector_num |
+ collector = collectors[collector_num]
+ if (collector) then
+ if (collector[2] == 0) then
+ return true if (collector[1] % 5 != 0)
+ collectors[collector_num] = nil
+ else
+ # if a collector matches all bits in the row then we can return unprunable early for the
+ # follwing reasons:
+ # 1) there can be no more unavailable bits bince we fill from the top left downward
+ # 2) all previous regions have been closed or joined so only this region can fail
+ # 3) this region must be good since there can never be only 1 region that is nuot
+ # a multiple of five
+ # this rule only applies when filling normally, so we ignore the rule if we are "slotting"
+ # in pieces to see what configurations work for them (the only other time this algorithm is used).
+ return false if (collector[2] == 0b11111 && !slotting)
+ collector[0] = converter[collector[2]]
+ collector[2] = 0
+ end
+ end
+ end
+
+ # get rid of all the empty converters for the next round
+ collectors.compact!
+ end
+ return false if (collectors.length <= 1) # 1 collector or less and the region is fine
+ collectors.any? { | collector | (collector[1] % 5) != 0 } # more than 1 and we test them all for bad size
+end
+
+# creates a region given a row mask. see prunable for what a "region" is
+def create_regions( value )
+ regions = []
+ cur_region = 0
+ 5.times do | bit |
+ if (value[bit] == 0) then
+ cur_region |= 1 << bit
+ else
+ if (cur_region != 0 ) then
+ regions.push( cur_region)
+ cur_region = 0;
+ end
+ end
+ end
+ regions.push(cur_region) if (cur_region != 0)
+ regions
+end
+
+# find up to the counted number of solutions (or all solutions) and prints the final result
+def find_all
+ find_top( 1)
+ find_top( 0)
+ print_results
+end
+
+# show the board
+def print_results
+ print "#{@boards_found} solutions found\n\n"
+ print_full_board( @min_board)
+ print "\n"
+ print_full_board( @max_board)
+ print "\n"
+end
+
+# finds solutions. This special version of the main function is only used for the top level
+# the reason for it is basically to force a particular ordering on how the rotations are tested for
+# the first piece. It is called twice, first looking for placements of the odd rotations and then
+# looking for placements of the even locations.
+#
+# WHY?
+# Since any found solution has an inverse we want to maximize finding solutions that are not already found
+# as an inverse. The inverse will ALWAYS be 3 one of the piece configurations that is exactly 3 rotations away
+# (an odd number). Checking even vs odd then produces a higher probability of finding more pieces earlier
+# in the cycle. We still need to keep checking all the permutations, but our probability of finding one will
+# diminsh over time. Since we are TOLD how many to search for this lets us exit before checking all pieces
+# this bennifit is very great when seeking small numbers of solutions and is 0 when looking for more than the
+# maximum number
+def find_top( rotation_skip)
+ board = blank_board
+ (@pieces.length-1).times do
+ piece = @pieces.shift
+ piece.masks[0].each do | mask, imask, cmask |
+ if ((rotation_skip += 1) % 2 == 0) then
+ piece.placed = mask
+ find( 1, 1, board | mask)
+ end
+ end
+ @pieces.push(piece)
+ end
+ piece = @pieces.shift
+ @pieces.push(piece)
+end
+
+# the normail find routine, iterates through the available pieces, checks all rotations at the current location
+# and adds any boards found. depth is acheived via recursion. the overall approach is described
+# here: http://www-128.ibm.com/developerworks/java/library/j-javaopt/
+# parameters:
+# start_location -- where to start looking for place for the next piece at
+# placed -- number of pieces placed
+# board -- current state of the board
+#
+# see in-code comments
+def find( start_location, placed, board)
+ # find the next location to place a piece by looking for an empty bit
+ while board[start_location] == 1
+ start_location += 1
+ end
+
+ @pieces.length.times do
+ piece = @pieces.shift
+ piece.masks[start_location].each do | mask, imask, cmask |
+ if ( board & cmask == imask) then
+ piece.placed = mask
+ if (placed == 9) then
+ add_board
+ else
+ find( start_location + 1, placed + 1, board | mask)
+ end
+ end
+ end
+ @pieces.push(piece)
+ end
+end
+
+# print the board
+def print_full_board( board_string)
+ 10.times do | row |
+ print " " if (row % 2 == 1)
+ 5.times do | col |
+ print "#{board_string[row*5 + col,1]} "
+ end
+ print "\n"
+ end
+end
+
+# when a board is found we "draw it" into a string and then flip that string, adding both to
+# the list (hash) of solutions if they are unique.
+def add_board
+ board_string = "99999999999999999999999999999999999999999999999999"
+ @all_pieces.each { | piece | piece.fill_string( board_string ) }
+ save( board_string)
+ save( board_string.reverse)
+end
+
+# adds a board string to the list (if new) and updates the current best/worst board
+def save( board_string)
+ if (@all_boards[board_string] == nil) then
+ @min_board = board_string if (board_string < @min_board)
+ @max_board = board_string if (board_string > @max_board)
+ @all_boards.store(board_string,true)
+ @boards_found += 1
+
+ # the exit motif is a time saver. Ideally the function should return, but those tests
+ # take noticable time (performance).
+ if (@boards_found == @stop_count) then
+ print_results
+ exit(0)
+ end
+ end
+end
+
+
+##
+## MAIN BODY :)
+##
+create_collector_support
+@pieces = [
+ Piece.new( [ :nw, :ne, :east, :east ], 2),
+ Piece.new( [ :ne, :se, :east, :ne ], 7),
+ Piece.new( [ :ne, :east, :ne, :nw ], 1),
+ Piece.new( [ :east, :sw, :sw, :se ], 6),
+ Piece.new( [ :east, :ne, :se, :ne ], 5),
+ Piece.new( [ :east, :east, :east, :se ], 0),
+ Piece.new( [ :ne, :nw, :se, :east, :se ], 4),
+ Piece.new( [ :se, :se, :se, :west ], 9),
+ Piece.new( [ :se, :se, :east, :se ], 8),
+ Piece.new( [ :east, :east, :sw, :se ], 3)
+ ];
+
+@all_pieces = Array.new( @pieces)
+
+@min_board = "99999999999999999999999999999999999999999999999999"
+@max_board = "00000000000000000000000000000000000000000000000000"
+@stop_count = ARGV[0].to_i || 2089
+@all_boards = {}
+@boards_found = 0
+
+find_all ######## DO IT!!!
+
diff --git a/benchmark/bm_so_nbody.rb b/benchmark/bm_so_nbody.rb
new file mode 100644
index 0000000000..d6c5bb9e61
--- /dev/null
+++ b/benchmark/bm_so_nbody.rb