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

6790 Коммитов

Автор SHA1 Сообщение Дата
matz e439bc27dc * parse.y (f_larglist): allow optional arguments even when
parentheses are omitted.  based on Nobu's patch from
  http://www.rubyist.net/~nobu/t/20050805.html

* parse.y (parser_yylex): update & maintain lpar_beg for detect
  lambda parameters.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8971 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-08-12 08:13:28 +00:00
matz ec14c2c9b9 * numeric.c (fix_equal, fix_cmp, fix_gt, fix_ge, fix_lt, fix_le):
reduce coercing when a method knows about a operand type.
  [ruby-dev:26789]

* lib/delegate.rb: simplifies Delegator classes; SimpleDelegator
  now uses method_missing for all methods.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8970 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-08-12 07:17:36 +00:00
matz d3de1ac85b 2005-08-12
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8969 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-08-12 07:17:23 +00:00
nobu c06b78ca92 * ext/stringio/stringio.c: keep holding string after closed.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8968 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-08-11 14:29:46 +00:00
kou cc88d93a0e added ML number. [ruby-list:41018]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8967 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-08-11 04:21:37 +00:00
kou c51f645b44 * lib/rss/1.0.rb (RSS::RDF::Channel#setup_maker_attributes):
removed self.

* lib/rss/maker/base.rb (RSS::Maker::ItemsBase#<=>): use #date
  instead of @date.
  (RSS::Maker::Base::self.def_array_element): added #size.

* lib/rss/maker/1.0.rb
  (RSS::Maker::RSS10::Channel#to_rss,
   RSS::Maker::RSS10::Items::Item#to_rss): cleared dc_dates set
  upped by using #date.

* lib/rss/maker/dublincore.rb
  (RSS::Maker::ChannelBase, RSS::Maker::ItemsBase::ItemBase):
  fixed opposite alias.

* test/rss/test_setup_maker_1.0.rb
  (RSS::TestSetupMaker10::test_setup_maker_items_sort): added some
  tests for RSS::Maker::ItemsBase#do_sort.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8966 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-08-11 04:08:05 +00:00
nobu fcf9d14561 2005-08-11
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8965 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-08-10 22:57:40 +00:00
nobu 90ac1484f1 * test/ruby/test_iterator.rb (test_block_passing): yield in method
argument behaves differently.  [ruby-dev:26274]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8964 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-08-10 22:57:38 +00:00
matz 160055b474 * bignum.c (rb_big_mul0): multiply two numbers (x, y) without
normalizing the result.  x should be a big number.
  [ruby-dev:26778]

* bignum.c (rb_big_pow): use rb_big_mul0() instead of
  rb_big_mul().

* array.c (rb_ary_or, rb_ary_and, rb_ary_plus, rb_ary_diff):
  revert the change on 2005-08-03.  Set operation on other item
  should have in separate methods.

* parse.y (shadowing_lvar_gen): warn when arguments shadows
  external local variables.

* parse.y (f_opt): optional arguments should not clobber external
  local variables.

* parse.y (f_rest_arg): rest arguments should not clobber external
  local variables.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8963 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-08-10 01:39:24 +00:00
nagai 5a0361f84c * ext/tk/lib/tk.rb: fix bug on handling __ruby2val_optkeys().
* ext/tk/lib/tk/itemconfig.rb: fix bug on handling
  __item_ruby2val_optkeys().
* ext/tk/lib/tk/canvas.rb: didn't check __item_ruby2val_optkeys().
* ext/tk/lib/tkextlib/blt/component.rb: ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8961 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-08-10 01:32:44 +00:00
nagai 599a478ad5 2005-08-10
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8960 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-08-10 01:32:38 +00:00
nobu 0c624c4bf2 * eval.c (formal_assign): let default values override
arguments to zsuper.  fixed: [ruby-dev:26743]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8959 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-08-09 12:53:38 +00:00
nagai c1566b7490 * ext/tk/tcltklib.c: remove dangerous 'rb_jump_tag's.
* ext/tk/lib/tk.rb: add __val2ruby_optkeys and __ruby2val_optkeys to
  help to convert option values between ruby and tcl.
* ext/tk/lib/tk/itemconfig.rb: add __item_val2ruby_optkeys and
  __item_ruby2val_optkeys to help to convert option values between
  ruby and tcl.
* ext/tk/lib/tk/radiobutton.rb: use __ruby2val_optkeys for 'variable'
  option (for the reason of backward compatibility).
* ext/tk/lib/tk/composite.rb: clarify the arguments of super().
* ext/tk/lib/tk/spinbox.rb: ditto.
* ext/tk/lib/tk/text.rb: ditto.
* ext/tk/lib/tk/validation.rb: ditto.
* ext/tk/lib/tkextlib/*: support to treat tkvariable-type
  configure options.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8958 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-08-09 06:16:29 +00:00
nobu 09d57b8e0c * parse.y (f_block_arg), eval.c (rb_yield_0): deal with dynamic
variable lambda arguments.  [ruby-core:05540]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8955 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-08-08 23:24:29 +00:00
nobu 81579af43e 2005-08-09
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8954 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-08-08 23:24:25 +00:00
ocean e84219391f * ext/tk/tcltklib.c: restored some DUMPs
* ext/tk/tcltklib.c (ip_ruby_cmd): moved rb_ary_new2 because this
  raises exception if argc < 3.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8952 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-08-08 16:18:29 +00:00
nobu 779f4383aa * eval.c (assign): deal with new block argument.
fixed: [ruby-core:05536]

* eval.c (rb_node_arity): follow change of NODE_ARGS.
  fixed: [ruby-dev:26761]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8951 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-08-08 13:14:08 +00:00
ocean 875d51ffc9 * test/ruby/test_fnmatch.rb: separated from test_file.rb.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8950 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-08-08 12:30:12 +00:00
nahi f613a10f5e * test/ruby/test_method.rb: added. [ruby-dev:26761]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8946 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-08-08 11:43:56 +00:00
matz 0b1038f514 * parse.y (f_larglist): mistake in syntax rule. [ruby-core:05535]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8945 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-08-08 01:21:48 +00:00
gotoyuzo ec46711668 * ext/openssl/ossl.c (ossl_raise): should use ERR_peek_last_error
to get last error on the current thread. And should report
  if errors are on the stack while OpenSSL.debug is true.

* ext/openssl/ossl.c (ossl_get_errors): new method for debugging
  this library.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8944 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-08-07 20:21:40 +00:00
gotoyuzo b1e29f011d * lib/webrick/httpproxy.rb (HTTPProxyServer#intialize),
lib/webrick/httpserver.rb (HTTPServer#intialize),
  lib/webrick/httpservlet/cgihandler.rb (CGIHandler#initialize),
  lib/webrick/httpservlet/erbhandler.rb (ERBHandler#initialize),
  lib/webrick/httpservlet/filehandler.rb(DefaultFileHandler#initialize):
  super (called with no arguments) takes default value of optional
  arguments. [ruby-dev:26743]

* lib/webrick/httputils.rb: add a media-type "text/html" for .xhtml.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8943 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-08-07 20:16:15 +00:00
gotoyuzo 170c40a5cf 2005-08-08
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8942 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-08-07 20:16:11 +00:00
nahi 873f007ad3 * test/ruby/test_super.rb: added optional arg tests. [ruby-dev:26743]
the tests expects 1.8 behavior at this time.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8941 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-08-07 14:57:19 +00:00
nahi 0c36fe42a2 2005-08-07
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8940 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-08-07 14:57:16 +00:00
ocean 8eb3323a69 * ext/tk/tcltklib.c: combined tcl_protect and tcl_check_result.
[ruby-dev:26753]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8936 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-08-06 16:27:12 +00:00
ocean 58d86a2035 * ext/tk/lib/{tk.rb,tk/itemconfig.rb}: configure creates
TkVariable if key name is 'variable' or 'textvariable'
  by default. [ruby-dev:26749]

* ext/tk/lib/tk/{label,radiobutton}.rb: removed its own
  {variable,textvariable} function.

* ext/tk/lib/tk/variable.rb: retains backward conpatibility.

(written by Hidetoshi NAGAI)


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8933 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-08-06 03:44:00 +00:00
ocean 3c3f54c7a3 2005-08-06
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8932 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-08-06 03:43:55 +00:00
akr 16457d4b96 add exclude_end? method to DuckRange.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8931 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-08-05 23:56:02 +00:00
ocean d9498f743b * ext/tk/tcltklib.c: rectoring - tcl_protect.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8930 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-08-05 11:22:51 +00:00
ocean 993ad912a2 * ext/tk/tcltklib.c: refactoring - extracted status check as function.
(tcl_check_result) ... previous commit is actually "extracted protect call"


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8927 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-08-05 09:20:13 +00:00
ocean a39d6b1f80 * ext/tk/tcltklib.c: refactoring - extracted status check as function. (tcl_protect)
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8925 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-08-05 08:12:53 +00:00
ocean 74d91a4c31 * ext/tk/tcltklib.c: fixed memory leak when tk_funcall raised
exception. (copies argv into heap in tk_funcall instead of
  caller)


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8922 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-08-05 03:51:50 +00:00
usa 107e177cb8 * lib/mkmf.rb (create_makefile): need to convert path separetor
before invoking install command.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8921 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-08-05 03:43:34 +00:00
matz aa2de9e3e0 * eval.c (return_jump): fix "can't across thread" error message
when no thread associated.
  http://www.namikilab.tuat.ac.jp/~sasada/diary/200507.html#d31


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8920 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-08-05 00:50:46 +00:00
ocean 6c8633ab99 * ext/tk/tcltklib.c: refactoring - extract ruby string <->
tcl object conversion as get_str_from_obj and get_obj_from_str.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8918 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-08-04 15:26:05 +00:00
nobu 7c2dad9c1f * extmk.rb (extmake): needs to be wrapped in an Array.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8917 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-08-04 15:20:10 +00:00
nobu 710b99a16b * eval.c (formal_assign): returns position of rest arguments variable.
* parse.y (f_rest_arg): use anonymous variable for rest arguments.
  fixed: [ruby-dev:26647]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8915 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-08-04 15:18:38 +00:00
nobu c9a8baddbc 2005-08-05
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8914 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-08-04 15:09:06 +00:00
nobu c83d6db61b * enumerator.c (Init_Enumerator): provided features should have
extensions.

* eval.c (rb_feature_p): returns type of the feature instead of
  extension.

* eval.c (search_required): ruby library should be prior to statically
  linked extentions.  fixed: [ruby-dev:26711]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8913 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-08-04 15:09:03 +00:00
matz 4fd5436b32 * numeric.c (Init_Numeric): do not share implementation among
Fixnum#/ and Fixnum#div.  [ruby-core:05531]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8912 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-08-04 11:29:51 +00:00
nagai c9ec812897 * ext/tk/tcltklib.c: cannot compile for Tcl7.6/Tk4.2.
* ext/tk/tcltklib.c: add nativethread consistency check.
* ext/tk/stubs.c: ditto.
* ext/tk/lib/tk.rb: forgot to define TclTkIp.encoding and encoding=
  when Tcl is 7.6 or 8.0.
* ext/tk/lib/tk/wm.rb: support to make some methods as options of
  root or toplevel widget. [ruby-talk:150336]
* ext/tk/lib/tk/root.rb: ditto.
* ext/tk/lib/tk/toplevel.rb: ditto.
* ext/tk/lib/tkextlib/SUPPRT_STATUS: update RELEASE_DATE


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8911 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-08-04 09:41:57 +00:00
akr b08e8d937f add a test for duck-type range.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8909 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-08-04 05:19:44 +00:00
ocean 85eadbbf8c reverted. [ruby-dev:26726]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8908 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-08-04 05:04:53 +00:00
ocean a6c074a47a just fixed indentation.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8907 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-08-04 04:54:08 +00:00
ocean 7b1bdb68e9 * ext/tk/sample/tkextlib/tile/demo.rb: followed previous changes.
* ext/tk/lib/tkextlib/tile/t*.rb: aliased class names starting with 'T'
  to non 'T' ones. (ie. Tk::Tile::TButton -> Tk::Tile::Button)
  [ruby-dev:26724]

* ext/tk/lib/tkextlib/tile.rb: ditto. (autoload support)

(Written by Hidetoshi NAGAI)


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8906 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-08-04 04:48:13 +00:00
matz 53b4c2b87a * numeric.c (fix_div): should not convert the result into
integer.  [ruby-core:05524]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8905 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-08-04 04:31:33 +00:00
ocean a767a76ad1 * ext/tk/sample/tkextlib/tile/demo.rb: fixed: Tk::Tile::TProgressbar is
supported on tile 0.6 or later, not tile 0.5.

* ext/tk/sample/tkextlib/tile/demo.rb: updated scales demo to use
  Tk::Tile::TProgressbar for tile 0.6 or later.

* ext/tk/sample/tkextlib/tile/demo.rb: set some TkVariable default values.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8904 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-08-04 04:16:27 +00:00
nobu b7f6c8989a * ext/extmk.rb (extmake): should not modify $mflags for each
extentions.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8903 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-08-03 23:04:16 +00:00
nobu a51e80459c * common.mk, Makefile.in, {bcc32,win32,wince}/Makefile.sub: integrated
macro definitions.

* bcc32/Makefile.sub: LIBRUBY_SO should use DLDOBJS, not EXTOBJS.

* {win32,wince}/Makefile.sub: separate config.h for compiler versions.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8902 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-08-03 15:27:13 +00:00