Граф коммитов

12858 Коммитов

Автор SHA1 Сообщение Дата
shyouhei 6f88631baa * include/ruby/st.h (struct st_table): type of bit-field
'num_entries' is a GCC extension


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@17764 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-07-01 07:59:21 +00:00
shyouhei a739f59359 * include/ruby/ruby.h (rb_intern): prefix __extnsion__ for
braced-groups within expressions.

  	* include/ruby/intern.h (rb_usascii_str_new2): ditto.

	* include/ruby/intern.h (rb_tainted_str_new2): ditto.

	* include/ruby/intern.h (rb_str_new2): ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@17763 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-07-01 07:56:51 +00:00
nobu c274c6fabf * lib/rubygems/ext/builder.rb (Gem::Ext::Builder.make),
(Gem::Ext::Builder.run): EXIT_SUCCESS may be 0 or may not.

* test/rubygems/test_gem_ext_rake_builder.rb (build_rake_in): override
  Gem.ruby and ENV["rake"].

* runruby.rb: bin/rake does not exist in archdir where architecture
  depend script (i.e. rbconfig.rb) exists.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@17758 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-07-01 06:01:15 +00:00
nobu d3b61c079e * common.mk: folded longer rules
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@17757 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-07-01 04:20:49 +00:00
nobu 365f1cd57e * array.c (rb_ary_fill): check if beg is too big.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@17756 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-07-01 04:19:47 +00:00
ko1 eb33f91cb7 * compile.c, insns.def, vm.c, vm_core.h: remove some insns
(undef, alias, definemethod).
  Call RubyVM::FrozenCore's singleton method instead.
  Add "putiseq" and "putspecialobject" instructions.
* id.c, id.h: add ids for above.
* tool/parse.rb: "VM" no longer exists.  Use RubyVM instead.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@17755 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-07-01 03:05:58 +00:00
drbrain 5c8ab4d9c2 RubyGems patches by Yusuke ENDOH [ruby-core:17442], [ruby-core:17444].
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@17754 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-06-30 18:46:21 +00:00
nobu fd77e489f2 * lib/cgi.rb (CGI::QueryExtension.read_multipart): blanks inside
double quotes are allowed.  [ruby-list:45140]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@17753 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-06-30 16:07:19 +00:00
akr 5f8e0b6633 * numeric.c (num_coerce): call rb_Float(x) first. don't depend on
evaluation order of function arguments.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@17750 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-06-30 16:03:41 +00:00
svn 4c4357c698 2008-07-01
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@17749 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-06-30 15:49:17 +00:00
nobu 01a025d2d7 * gc.c (rb_newobj): abort GC phase before rb_bug.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@17748 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-06-30 15:49:13 +00:00
mame 3ac2c3472a * test/openssl/test_ssl.rb (start_server): shutdown TCPServer before
close.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@17747 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-06-30 14:15:48 +00:00
akr 895c7cb3c4 add an assertion.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@17746 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-06-30 14:05:20 +00:00
nobu 1971a0c853 * common.mk (RUBY_H_INCLUDES): common headers which are included with
ruby.h together.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@17745 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-06-30 14:01:53 +00:00
mame 32c8d5c411 * test/ruby/test_settracefunc.rb (test_raise): reveal an exception
hided by rescue modifier.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@17744 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-06-30 13:58:35 +00:00
mame 4b60da90f9 * test/ruby/test_array.rb (test_aset): access with too big index
raises not ArgumentError but IndexError now.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@17743 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-06-30 13:50:18 +00:00
akr cac79cc388 add a test for [ruby-dev:34619].
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@17742 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-06-30 13:50:13 +00:00
nobu fce76df67c * lib/test/unit/collector/dir.rb (recursive_collect): r15662 reverted.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@17740 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-06-30 13:30:39 +00:00
mame 9e3e19cd1f * ext/stringio/stringio.c (strio_getline): fix for nil and "" as
separator.  [ruby-dev:34591]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@17739 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-06-30 13:30:11 +00:00
mame c93f203e53 * io.c (argf_each_line): pass args to each_line. [ruby-dev:34958]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@17738 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-06-30 13:22:10 +00:00
nobu ac388541c4 * gc.c (chain_finalized_object): should not delete from finalizer
table until run.

* gc.c (rb_gc_call_finalizer_at_exit): deferred_final_list may be
  empty first.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@17737 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-06-30 13:12:49 +00:00
nobu d0f211f394 * gc.c (gc_finalize_deferred): allow object allocation in finalizers.
* gc.c (rb_gc_call_finalizer_at_exit): ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@17732 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-06-30 09:57:07 +00:00
nobu dd0b79b3c3 * ChangeLog: fixed format.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@17731 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-06-30 09:56:45 +00:00
usa eedb3dc3a3 * gc.c (rb_newobj): prohibit call of rb_newobj() during gc when
USE_VALUE_CACHE is not defined (normal case).



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@17730 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-06-30 05:42:34 +00:00
matz 244e32db0d * ext/syslog/syslog.c (syslog_write): syslog operations should be
protected from $SAFE level 4.  a patch from Keita Yamaguchi
  <keita.yamaguchi at gmail.com>.

* ext/syslog/syslog.c (mSyslog_close): ditto.

* ext/syslog/syslog.c (mSyslog_set_mask): ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@17726 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-06-30 01:30:32 +00:00
mame 7edda76f15 * test/net/http/test_http.rb (_test_request__file): specify encoding
explicitly.

* test/net/http/utils.rb: ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@17725 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-06-29 18:02:24 +00:00
naruse 04d83114a6 * encoding.c (rb_utf8_encindex): defined.
* include/ruby/encoding.h (rb_utf8_encindex): ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@17724 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-06-29 17:33:01 +00:00
ko1 9ebf6473eb * vm.c, vm_core.h,vm_core.h, vm_dump.c, iseq.c: rename class name
VM -> RubyVM, and rename rb_cVM -> rb_cRubyVM.
  "VM" is too short name for class.
* test/ruby/test_method.rb, test/ruby/test_settracefunc.rb: ditto.
* include/ruby/ruby.h: rb_cRubyVM, rb_cEnv, rb_cISeq should not be
  exposed.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@17723 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-06-29 17:26:16 +00:00
ko1 002fb8f747 * process.c (Init_process): fix to avoid a warning.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@17722 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-06-29 17:13:37 +00:00
svn 2b2683b732 2008-06-30
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@17721 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-06-29 16:53:53 +00:00
mame 7fef733b9d * test/ruby/test_parse.rb: remove tests for open_args.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@17720 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-06-29 16:53:49 +00:00
akr 2950c7a919 * string.c (rb_str_format_m): make tmp volatile to avoid possible GC
problem.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@17719 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-06-29 14:03:38 +00:00
kou 39a241cec6 follow up the previous commit.
* lib/rss/parser.rb: merge documents from ruby_1_8.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@17676 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-06-29 09:05:21 +00:00
kou 8ee383397d * lib/rss/parser.rb, lib/rss/utils.rb: merge documents from ruby_1_8.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@17675 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-06-29 09:02:32 +00:00
kou 1695dd0f02 * lib/rss/parser.rb (RSS::ListenerMixin#known_class): define to
work with ruby 1.8.x too.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@17674 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-06-29 08:44:53 +00:00
kou 94031b9628 * lib/rss/maker/base.rb (RSS::Maker::RSSBase#to_feed): raise
exception not return nil if RSS::Maker.make can't get required information.
* test/rss/rss-assertions.rb: follow the above change.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@17673 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-06-29 08:42:46 +00:00
kou 7556f66e9c * lib/rss/maker/base.rb (RSS::Maker::RSSBase#make): require block.
* test/rss/test_maker_{0.9,1.0,2.0}.rb: follow the above change.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@17672 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-06-29 08:38:11 +00:00
kou f6c7804c16 * lib/rss/maker/base.rb, lib/rss/maker/itunes.rb: don't use
instance_eval to initialize variables. (speed up)


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@17671 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-06-29 08:34:40 +00:00
kou b9f895e9c8 * lib/rss/rss.rb, test/rss/test_version.rb (RSS::VERSION): 0.2.4 -> 0.2.5.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@17670 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-06-29 08:32:10 +00:00
mame 7d2829e9d8 * dir.rb: fix resource leak.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@17645 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-06-29 02:36:51 +00:00
nobu 285fb00195 * lib/tmpdir.rb (@@systmpdir): prior LOCAL_APPDATA if possible, and
should be clean.  based on a patch from arton <artonx AT
  yahoo.co.jp> at [ruby-dev:35269]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@17643 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-06-29 00:43:12 +00:00
suke e47ebfe518 * ext/win32ole/win32ole.c (date2time_str): fix the overflow in
some situation. [ruby-bugs-20793]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@17641 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-06-28 23:00:58 +00:00
akr 214bb567f2 fix typos.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@17640 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-06-28 17:10:53 +00:00
svn 980d7e0cd0 2008-06-29
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@17639 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-06-28 16:53:59 +00:00
akr ff27b33044 fix test_status_kill for coredump message in Process::Status#inspect.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@17638 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-06-28 16:53:56 +00:00
akr 340cd503a7 * include/ruby/ruby.h (struct RRegexp): new field usecnt. replace
str and len by src.

* gc.c (gc_mark_children): mark src field of regexp.
  (obj_free): don't free str field.

* re.c (REG_BUSY): removed.
  (rb_reg_initialize): prohibit re-initialize regexp.
  (rb_reg_search): use usecnt to prevent freeing regexp currently
  using.  this prevents SEGV by:
    r = /\A((a.)*(a.)*)*b/
    r =~ "ab" + "\xc2\xa1".force_encoding("euc-jp")
    t = Thread.new { r =~ "ab"*8 + "\xc2\xa1".force_encoding("utf-8")}
    sleep 0.2
    r =~ "ab"*8 + "\xc2\xa1".force_encoding("euc-jp")



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@17635 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-06-28 12:25:45 +00:00
nobu 4c766e1713 * include/ruby/intern.h (rb_str_new2, rb_tainted_str_new2,
rb_usascii_str_new2): use inline versions only for constant
  literals.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@17634 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-06-28 12:15:55 +00:00
nobu 54b64e2096 * include/ruby/intern.h (rb_str_new2, rb_tainted_str_new2,
rb_usascii_str_new2): use inline versions for gcc 4 or lator.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@17633 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-06-28 11:50:38 +00:00
akr 1318dff1a8 add a test for [ruby-dev:34958].
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@17622 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-06-28 05:15:25 +00:00
akr c8ab5d2dd9 * test/rubygems/test_gem.rb (test_self_path_APPLE_GEM_HOME): don't use
fixed /tmp/apple_gem_home directory.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@17621 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-06-28 04:13:08 +00:00