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

197 Коммитов

Автор SHA1 Сообщение Дата
matz 6a640106d2 * lib/irb/ruby-lex.rb (RubyLex::getc): should not push nil into
reading buffer (@readed).  reported in
  <http://jarp.does.notwork.org/diary/200608c.html#200608311>.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10815 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-09-01 00:37:09 +00:00
matz a1a07fbfa1 * sample/test.rb: update test suites.
* test/ruby/test_assignment.rb (TestAssignment::test_yield): ditto.

* test/ruby/test_iterator.rb (TestIterator::test_itertest): ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10504 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-07-10 08:37:37 +00:00
matz ba5a0701e4 * eval.c (rb_call): should not set prot_tag->blkid since it would
never catch breaks at this level.  [ruby-dev:28922]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10466 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-07-04 06:16:49 +00:00
matz 3b989706df * io.c (pipe_open): backout unnecessary fix on 2006-06-26.
[ruby-dev:28865]

* eval.c (rb_yield_0): exact argument number check now done only
  for lambda Proc.

* eval.c (rb_yield_0): add check for number of arguments, if
  there's one lambda block parameter.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10411 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-06-27 14:02:26 +00:00
matz 2ca2a4a43b * parse.y (block_param): do not use multiple assignment for a sole
block parameter.  [ruby-dev:28710]

* eval.c (rb_yield_0): pass a raw yielded value to a sole block
  parameter if a value is passed by yield.

* eval.c (proc_invoke): args may not be an array.

* eval.c (rb_proc_yield): pass original value without wrapping
  it in an array.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10356 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-06-21 08:08:36 +00:00
matz 3be20019c1 * eval.c (proc_invoke): intercept break and return from lambda
Proc objects.  [ruby-dev:28742]

* eval.c (proc_invoke): remove unnecessary YIELD_PROC_CALL flag.

* eval.c (YIELD_EXACT_ARGS): renamed from YIELD_LAMBDA_CALL, which
  is no longer related to the behavior turned on by this flag.

* eval.c (return_jump): no need to care about PROT_YIELD.

* eval.c (break_jump): no jump to toplevel PROT_TREAD tag.

* eval.c (rb_yield_0): fix confusion between lambda (which is a
  property of a proc) and pcall (which depends on whether it's
  called via yield or call).

* eval.c (rb_thread_yield): no need to specify YIELD_LAMBDA_CALL.

* eval.c (rb_block_pass): update blkid in prot_tag.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10338 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-06-20 06:09:04 +00:00
matz 9612bd51f4 * sample/test.rb (proc_return3): return within non lambda block
should terminate surrounding method.  [ruby-dev:28741]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10324 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-06-19 08:19:18 +00:00
matz 9b383bd6cf * sprintf.c (rb_str_format): allow %c to print one character
string (e.g. ?x).

* lib/tempfile.rb (Tempfile::make_tmpname): put dot between
  basename and pid.  [ruby-talk:196272]
* parse.y (do_block): remove -> style block.

* parse.y (parser_yylex): remove tLAMBDA_ARG.

* eval.c (rb_call0): binding for the return event hook should have
  consistent scope.  [ruby-core:07928]

* eval.c (proc_invoke): return behavior should depend whether it
  is surrounded by a lambda or a mere block.

* eval.c (formal_assign): handles post splat arguments.

* eval.c (rb_call0): ditto.

* st.c (strhash): use FNV-1a hash.

* parse.y (parser_yylex): removed experimental ';;' terminator.

* eval.c (rb_node_arity): should be aware of post splat arguments.

* eval.c (rb_proc_arity): ditto.

* parse.y (f_args): syntax rule enhanced to support arguments
  after the splat.

* parse.y (block_param): ditto for block parameters.

* parse.y (f_post_arg): mandatory formal arguments after the splat
  argument.

* parse.y (new_args_gen): generate nodes for mandatory formal
  arguments after the splat argument.

* eval.c (rb_eval): dispatch mandatory formal arguments after the
  splat argument.

* parse.y (args): allow more than one splat in the argument list.

* parse.y (method_call): allow aref [] to accept all kind of
  method argument, including assocs, splat, and block argument.

* eval.c (SETUP_ARGS0): prepare block argument as well.

* lib/mathn.rb (Integer): remove Integer#gcd2. [ruby-core:07931]

* eval.c (error_line): print receivers true/false/nil specially.

* eval.c (rb_proc_yield): handles parameters in yield semantics.

* eval.c (nil_yield): gives LocalJumpError to denote no block
  error.

* io.c (rb_io_getc): now takes one-character string.

* string.c (rb_str_hash): use FNV-1a hash from Fowler/Noll/Vo
  hashing algorithm.

* string.c (rb_str_aref): str[0] now returns 1 character string,
  instead of a fixnum.	[Ruby2]

* parse.y (parser_yylex): ?c now returns 1 character string,
  instead of a fixnum.	[Ruby2]

* string.c (rb_str_aset): no longer support fixnum insertion.

* eval.c (umethod_bind): should not update original class.
  [ruby-dev:28636]

* eval.c (ev_const_get): should support constant access from
  within instance_eval().  [ruby-dev:28327]

* time.c (time_timeval): should round for usec floating
  number.  [ruby-core:07896]

* time.c (time_add): ditto.

* dir.c (sys_warning): should not call a vararg function
  rb_sys_warning() indirectly.	[ruby-core:07886]

* numeric.c (flo_divmod): the first element of Float#divmod should
  be an integer. [ruby-dev:28589]

* test/ruby/test_float.rb: add tests for divmod, div, modulo and remainder.

* re.c (rb_reg_initialize): should not allow modifying literal
  regexps.  frozen check moved from rb_reg_initialize_m as well.

* re.c (rb_reg_initialize): should not modify untainted objects in
  safe levels higher than 3.

* re.c (rb_memcmp): type change from char* to const void*.

* dir.c (dir_close): should not close untainted dir stream.

* dir.c (GetDIR): add tainted/frozen check for each dir operation.

* lib/rdoc/parsers/parse_rb.rb (RDoc::RubyParser::parse_symbol_arg):
  typo fixed.  a patch from Florian Gross <florg at florg.net>.

* eval.c (EXEC_EVENT_HOOK): trace_func may remove itself from
  event_hooks.	no guarantee for arbitrary hook deletion.
  [ruby-dev:28632]

* util.c (ruby_strtod): differ addition to minimize error.
  [ruby-dev:28619]

* util.c (ruby_strtod): should not raise ERANGE when the input
  string does not have any digits.  [ruby-dev:28629]

* eval.c (proc_invoke): should restore old ruby_frame->block.
  thanks to ts <decoux at moulon.inra.fr>.  [ruby-core:07833]
  also fix [ruby-dev:28614] as well.

* signal.c (trap): sig should be less then NSIG.  Coverity found
  this bug.  a patch from Kevin Tew <tewk at tewk.com>.
  [ruby-core:07823]

* math.c (math_log2): add new method inspired by
  [ruby-talk:191237].

* math.c (math_log): add optional base argument to Math::log().
  [ruby-talk:191308]

* ext/syck/emitter.c (syck_scan_scalar): avoid accessing
  uninitialized array element.	a patch from Pat Eyler
  <rubypate at gmail.com>.  [ruby-core:07809]

* array.c (rb_ary_fill): initialize local variables first.  a
  patch from Pat Eyler <rubypate at gmail.com>.	 [ruby-core:07810]

* ext/syck/yaml2byte.c (syck_yaml2byte_handler): need to free
  type_tag.  a patch from Pat Eyler <rubypate at gmail.com>.
  [ruby-core:07808]

* ext/socket/socket.c (make_hostent_internal): accept ai_family
  check from Sam Roberts <sroberts at uniserve.com>.
  [ruby-core:07691]

* util.c (ruby_strtod): should not cut off 18 digits for no
  reason.  [ruby-core:07796]

* array.c (rb_ary_fill): internalize local variable "beg" to
  pacify Coverity.  [ruby-core:07770]

* pack.c (pack_unpack): now supports CRLF newlines.  a patch from
  <tommy at tmtm.org>.	[ruby-dev:28601]

* applied code clean-up patch from Stefan Huehner
  <stefan at huehner.org>.  [ruby-core:07764]

* lib/jcode.rb (String::tr_s): should have translated non
  squeezing character sequence (i.e. a character) as well.  thanks
  to Hiroshi Ichikawa <gimite at gimite.ddo.jp> [ruby-list:42090]

* ext/socket/socket.c: document update patch from Sam Roberts
  <sroberts at uniserve.com>.  [ruby-core:07701]

* lib/mathn.rb (Integer): need not to remove gcd2.  a patch from
  NARUSE, Yui <naruse at airemix.com>.	[ruby-dev:28570]

* parse.y (arg): too much NEW_LIST()

* eval.c (SETUP_ARGS0): remove unnecessary access to nd_alen.

* eval.c (rb_eval): use ARGSCAT for NODE_OP_ASGN1.
  [ruby-dev:28585]

* parse.y (arg): use NODE_ARGSCAT for placeholder.

* lib/getoptlong.rb (GetoptLong::get): RDoc update patch from
  mathew <meta at pobox.com>.  [ruby-core:07738]

* variable.c (rb_const_set): raise error when no target klass is
  supplied.  [ruby-dev:28582]

* prec.c (prec_prec_f): documentation patch from
  <gerardo.santana at gmail.com>.  [ruby-core:07689]

* bignum.c (rb_big_pow): second operand may be too big even if
  it's a Fixnum.  [ruby-talk:187984]

* README.EXT: update symbol description.  [ruby-talk:188104]

* COPYING: explicitly note GPLv2.  [ruby-talk:187922]

* parse.y: remove some obsolete syntax rules (unparenthesized
  method calls in argument list).

* eval.c (rb_call0): insecure calling should be checked for non
  NODE_SCOPE method invocations too.

* eval.c (rb_alias): should preserve the current safe level as
  well as method definition.

* process.c (rb_f_sleep): remove RDoc description about SIGALRM
  which is not valid on the current implementation. [ruby-dev:28464]

 Thu Mar 23 21:40:47 2006  K.Kosako  <sndgk393 AT ybb.ne.jp>

* eval.c (method_missing): should support argument splat in
  super.  a bug in combination of super, splat and
  method_missing.  [ruby-talk:185438]

* configure.in: Solaris SunPro compiler -rapth patch from
  <kuwa at labs.fujitsu.com>.  [ruby-dev:28443]

* configure.in: remove enable_rpath=no for Solaris.
  [ruby-dev:28440]

* ext/win32ole/win32ole.c (ole_val2olevariantdata): change behavior
  of converting  OLE Variant object with VT_ARRAY|VT_UI1 and Ruby
  String object.

* ruby.1: a clarification patch from David Lutterkort
  <dlutter at redhat.com>.  [ruby-core:7508]

* lib/rdoc/ri/ri_paths.rb (RI::Paths): adding paths from rubygems
  directories.	a patch from Eric Hodel <drbrain at segment7.net>.
  [ruby-core:07423]

* eval.c (rb_clear_cache_by_class): clearing wrong cache.

* ext/extmk.rb: use :remove_destination to install extension libraries
  to avoid SEGV.  [ruby-dev:28417]

* eval.c (rb_thread_fd_writable): should not re-schedule output
  from KILLED thread (must be error printing).

* array.c (rb_ary_flatten_bang): allow specifying recursion
  level.  [ruby-talk:182170]

* array.c (rb_ary_flatten): ditto.

* gc.c (add_heap): a heap_slots may overflow.  a patch from Stefan
  Weil <weil at mail.berlios.de>.

* eval.c (rb_call): use separate cache for fcall/vcall
  invocation.

* eval.c (rb_eval): NODE_FCALL, NODE_VCALL can call local
  functions.

* eval.c (rb_mod_local): a new method to specify newly added
  visibility "local".

* eval.c (search_method): search for local methods which are
  visible only from the current class.

* class.c (rb_class_local_methods): a method to list local methods.

* object.c (Init_Object): add BasicObject class as a top level
  BlankSlate class.

* ruby.h (SYM2ID): should not cast to signed long.
  [ruby-core:07414]

* class.c (rb_include_module): allow module duplication.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10235 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-06-09 21:20:17 +00:00
gotoyuzo 55ef220fe0 * ext/openssl/extconf.rb: add check for OBJ_NAME_do_all_sorted.
* ext/openssl/ossl_cipher.c (ossl_s_ciphers): new method
  OpenSSL::Cipher.ciphers. it returns all the cipher names.

* ext/openssl/ossl_cipher.c (ossl_cipher_init): refine warning message.

* ext/openssl/lib/openssl/cipher.rb: reimplement without eval() and
  add constants AES128, AES192, AES256. [ruby-dev:28610]

* ext/openssl/lib/openssl/digest.rb: reimplement without eval().

* test/openssl/test_cipher.rb, test_digest: fix about reimplemented               features.

* sample/openssl/cipher.rb: rewrite all.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10137 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-05-08 00:12:00 +00:00
matz de3bff164c * eval.c (rb_mod_define_method): should save safe_level in the
proc object.  [ruby-dev:28146]

* test/drb/drbtest.rb (DRbService::self.ext_service): increase
  timeout limit.  a patch from Kazuhiro NISHIYAMA
  <zn at mbf.nifty.com>. [ruby-dev:28132]

* eval.c (ev_const_get): fixed a bug in constant reference during
  instance_eval.  [yarv-dev:707]

* eval.c (ev_const_defined): ditto.

* lib/yaml.rb (YAML::add_domain_type): typo fixed.  a patch from
  Joel VanderWerf <vjoel at path.berkeley.edu>.
  [ruby-talk:165285] [ruby-core:6995]

* ext/digest/sha2/sha2.c (ULL): support AIX C.  a patch from
  Kailden <kailden at gmail.com>.  [ruby-core:06984]

* ext/syck/rubyext.c (rb_syck_compile): avoid potential memory
  leak.

* ext/syck/rubyext.c (syck_set_ivars): avoid potential memory
  leak by explicit symbol allocation.

* lib/delegate.rb (Delegator::method_missing): should delegate
  block as well.

* lib/cgi.rb (CGI::QueryExtension::MorphingBody): fix criteria to
  use Tempfile.  A fix from Zev Blut <rubyzbibd at ubit.com>.
  [ruby-core:06076]

* string.c: remove global functions work on $_.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@9757 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-12-29 12:05:16 +00:00
kou 4ef7ec62ca * lib/rss/maker/taxonomy.rb: implemented taxonomy module for RSS
Maker.
* lib/rss/taxonomy.rb: supported RSS Maker.
* lib/rss/maker.rb: added taxonomy module support.

* lib/rss/rss.rb: adjusted to other element API.
* lib/rss/1.0.rb: adjusted to other element API but backward
  compatibility is reserved.
* lib/rss/0.9.rb: ditto.

* test/rss/test_maker_taxo.rb: added test case for taxonomy module
  for RSS Maker.
* test/rss/test_setup_maker_1.0.rb: added tests for taxo:topic.

* test/rss/test_setup_maker_1.0.rb: added backward compatibility
  test.
* test/rss/test_setup_maker_0.9.rb: ditto.
* test/rss/test_setup_maker_2.0.rb: ditto.

* test/rss/rss-testcase.rb: added convenience method for setting
  up taxo:topic.
* test/rss/rss-assertions.rb: added assertion for taxo:topic.

* sample/rss/blend.rb: followed new API.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@9596 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-11-23 09:24:17 +00:00
matz 22f1926644 * range.c (rb_range_beg_len): should return Qfalse for non-range
object.

* pack.c (EXTEND16): [ruby-dev:27383]

* eval.c (set_trace_func): add rb_secure(4) to prevent adding
  tracing function.

* lib/delegate.rb: document update from James Edward Gray II
  <james@grayproductions.net>.  [ruby-core:05942]

* process.c (proc_daemon): should restrict execution on levels
  higher than $SAFE=2.  suggested by URABE Shyouhei
  <shyouhei@ice.uec.ac.jp>.

* lib/forwardable.rb: replaced by new implementation from
  <Daniel.Berger@qwest.com>.  [ruby-core:05899]

* file.c (path_check_0): disallow sticky world writable directory
  in PATH (and $LOAD_PATH).  [ruby-dev:27226]

* numeric.c (fix_idiv): 1.div(1.0) should return integer value.
  [ruby-dev:27235]

* lib/yaml.rb: require 'yaml/constants'.  [ruby-core:5776]

* lib/xmlrpc/client.rb (XMLRPC::Client::do_rpc): add charset
  information to content-type header.[ruby-core:5127]

* lib/xmlrpc/server.rb (CGIServer::serve): ditto.

* lib/xmlrpc/server.rb (ModRubyServer::serve): ditto.

* lib/xmlrpc/server.rb (WEBrickServlet::service): ditto.

* test/dbm/test_dbm.rb (TestDBM::test_s_open_error): remove
  test_s_open_error test to detect duplicate open.
  [ruby-dev:27202]

* eval.c (splat_value): use to_a to splat non Array object.

* object.c (nil_to_a): remove nil.to_a.  [experimental]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@9349 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-10-05 16:15:16 +00:00
aamine 4a092d08f4 * sample/ripper/colorize.rb: removed (replaced by ruby2html.rb).
* sample/ripper/ruby2html.rb: added.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@9285 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-09-23 22:59:57 +00:00
kou 1dbd5e6a3e * sample/rss/tdiary_plugin: removed. because the plugin
is imported in the tDiary plugin packages.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8850 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-07-27 13:16:32 +00:00
kou b2270e5535 * lib/rss/rss.rb: moved copyright description to lib/rss.rb.
* lib/rss.rb: added for convenience.

* sample/rss/re_read.rb: added #to_s sample.

* sample/rss/blend.rb: use 'require "rss"' instead of 'require "rss/*"'.
* sample/rss/list_description.rb: ditto.
* sample/rss/rss_recent.rb: ditto.
* sample/rss/tdiary-plugin/rss-recent.rb: ditto.

* sample/rss/tdiary-plugin/rss-recent.rb: 0.0.6 -> 0.0.7.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8820 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-07-22 06:14:48 +00:00
matz 7b7c037179 * object.c (rb_obj_pattern_match): now returns nil.
[ruby-core:05391]

* sample/svr.rb: service can be stopped by ill-behaved client; use
  tsvr.rb instead.

* missing/erf.c: original erf.c by prof. Okumura is confirmed to
  be public domain.  reverted BSD implementation.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8732 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-07-06 09:47:08 +00:00
nahi eb3f829be9 * lib/{soap,wsdl,xsd}, test/{soap,wsdl,xsd}: imported soap4r/1.5.4.
== SOAP client and server ==

	  === for both client side and server side ===

	  * improved document/literal service support.
	    style(rpc,document)/use(encoding, literal) combination are all
	    supported.  for the detail about combination, see
	    test/soap/test_style.rb.

	  * let WSDLEncodedRegistry#soap2obj map SOAP/OM to Ruby according to
	    WSDL as well as obj2soap.  closes #70.

	  * let SOAP::Mapping::Object handle XML attribute for doc/lit service.
	    you can set/get XML attribute via accessor methods which as a name
	    'xmlattr_' prefixed (<foo name="bar"/> -> Foo#xmlattr_name).

	  === client side ===

	  * WSDLDriver capitalized name operation bug fixed.  from
	    1.5.3-ruby1.8.2, operation which has capitalized name (such as
	    KeywordSearchRequest in AWS) is defined as a method having
	    uncapitalized name. (converted with GenSupport.safemethodname
	    to handle operation name 'foo-bar').  it introduced serious
	    incompatibility; in the past, it was defined as a capitalized.
	    define capitalized method as well under that circumstance.

	  * added new factory interface 'WSDLDriverFactory#create_rpc_driver'
	    to create RPC::Driver, not WSDLDriver (RPC::Driver and WSDLDriver
	    are merged).  'WSDLDriverFactory#create_driver' still creates
	    WSDLDriver for compatibility but it warns that the method is
	    deprecated.  please use create_rpc_driver instead of create_driver.

	  * allow to use an URI object as an endpoint_url even with net/http,
	    not http-access2.

	  === server side ===

	  * added mod_ruby support to SOAP::CGIStub.  rename a CGI script
	    server.cgi to server.rb and let mod_ruby's RubyHandler handles the
	    script.  CGIStub detects if it's running under mod_ruby environment
	    or not.

	  * added fcgi support to SOAP::CGIStub.  see the sample at
	    sample/soap/calc/server.fcgi.  (almost same as server.cgi but has
	    fcgi handler at the bottom.)

	  * allow to return a SOAPFault object to respond customized SOAP fault.

	  * added the interface 'generate_explicit_type' for server side
	    (CGIStub, HTTPServer).  call 'self.generate_explicit_type = true'
	    if you want to return simplified XML even if it's rpc/encoded
	    service.

	  == WSDL ==

	  === WSDL definition ===

	  * improved XML Schema support such as extension, restriction,
	    simpleType, complexType + simpleContent, ref, length, import,
	    include.

	  * reduced "unknown element/attribute" warnings (warn only 1 time for
	    each QName).

	  * importing XSD file at schemaLocation with xsd:import.

	  === code generation from WSDL ===

	  * generator crashed when there's '-' in defined element/attribute
	    name.

	  * added ApacheMap WSDL definition.

	* sample/{soap,wsdl}: removed.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8500 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-05-22 13:03:38 +00:00
kou 4afc07a666 * sample/rss/tdiary_plugin/rss-recent.rb (rss_recent_cache_rss):
use the first date information of items as site date information
  if channel doesn't have date information.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8339 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-04-16 08:04:50 +00:00
kou 98d168ffc7 * sample/rss/tdiary_plugin/rss-recent.rb: supported configuration
via Web browser.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8288 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-04-09 05:47:33 +00:00
kou 21e257b26b * sample/rss/tdiary_plugin/rss-recent.rb:
new option: @options['rss-recent.use-image-link']:
  use image as link instread of text if available.

* sample/rss/tdiary_plugin/rss-recent.rb (RSS_RECENT_VERSION):
  0.0.5 -> 0.0.6.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8253 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-04-05 06:52:16 +00:00
gotoyuzo 813d4b5dd7 * sample/webrick/httpsd.rb: fix typo in comment. suggested by
Kazuhiko Shiozaki.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8106 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-03-07 12:34:20 +00:00
matz 70bbad3cfd * array.c: replace rb_protect_inspect() and rb_inspecting_p() by
rb_exec_recursive() in eval.c.

* eval.c (rb_exec_recursive): new function.

* array.c (rb_ary_join): use rb_exec_recursive().

* array.c (rb_ary_inspect, rb_ary_hash): ditto.

* file.c (rb_file_join): ditto.

* hash.c (rb_hash_inspect, rb_hash_to_s, rb_hash_hash): ditto.

* io.c (rb_io_puts): ditto.

* object.c (rb_obj_inspect): ditto

* struct.c (rb_struct_inspect): ditto.

* lib/set.rb (SortedSet::setup): a hack to shut up warning.
  [ruby-talk:132866]

* lib/time.rb (Time::strptime): add new function.  inspired by
  [ruby-talk:132815].

* lib/parsedate.rb (ParseDate::strptime): ditto.

* regparse.c: move st_*_strend() functions from st.c.  fixed some
  potential memory leaks.

* exception error messages updated.  [ruby-core:04497]

* ext/socket/socket.c (Init_socket): add bunch of Socket
  constants.  Patch from Sam Roberts <sroberts@uniserve.com>.
  [ruby-core:04409]

* array.c (rb_ary_s_create): no need for negative argc check.
  [ruby-core:04463]

* array.c (rb_ary_unshift_m): ditto.

* lib/xmlrpc/parser.rb (XMLRPC::FaultException): make it subclass
  of StandardError class, not Exception class.  [ruby-core:04429]

* parse.y (fcall_gen): lvar(arg) will be evaluated as
  lvar.call(arg) when lvar is a defined local variable. [new]

* object.c (rb_class_initialize): call inherited method before
  calling initializing block.

* eval.c (rb_thread_start_1): initialize newly pushed frame.

* lib/open3.rb (Open3::popen3): $? should not be EXIT_FAILURE.
  fixed: [ruby-core:04444]

* eval.c (is_defined): NODE_IASGN is an assignment.

* ext/readline/readline.c (Readline.readline): use rl_outstream
  and rl_instream.  [ruby-dev:25699]

* ext/etc/etc.c (Init_etc): sGroup needs HAVE_ST_GR_PASSWD check
  [ruby-dev:25675]

* misc/ruby-mode.el: [ruby-core:04415]

* lib/rdoc/generators/html_generator.rb: [ruby-core:04412]

* lib/rdoc/generators/ri_generator.rb: ditto.

* struct.c (make_struct): fixed: [ruby-core:04402]

* ext/curses/curses.c (window_color_set): [ruby-core:04393]

* ext/socket/socket.c (Init_socket): SO_REUSEPORT added.
  [ruby-talk:130092]

* object.c: [ruby-doc:818]

* parse.y (open_args): fix too verbose warnings for the space
  before argument parentheses.  [ruby-dev:25492]

* parse.y (parser_yylex): ditto.

* parse.y (parser_yylex): the first expression in the parentheses
  should not be a command.  [ruby-dev:25492]

* lib/irb/context.rb (IRB::Context::initialize): [ruby-core:04330]

* object.c (Init_Object): remove Object#type.  [ruby-core:04335]

* st.c (st_foreach): report success/failure by return value.
  [ruby-Bugs-1396]

* parse.y: forgot to initialize parser struct.  [ruby-dev:25492]

* parse.y (parser_yylex): no tLABEL on EXPR_BEG.
  [ruby-talk:127711]

* document updates - [ruby-core:04296], [ruby-core:04301],
  [ruby-core:04302], [ruby-core:04307]

* dir.c (rb_push_glob): should work for NUL delimited patterns.

* dir.c (rb_glob2): should aware of offset in the pattern.

* string.c (rb_str_new4): should propagate taintedness.

* env.h: rename member names in struct FRAME; last_func -> callee,
  orig_func -> this_func, last_class -> this_class.

* struct.c (rb_struct_set): use original method name, not callee
  name, to retrieve member slot.  [ruby-core:04268]

* time.c (time_strftime): protect from format modification from GC
  finalizers.

* object.c (Init_Object): remove rb_obj_id_obsolete()

* eval.c (rb_mod_define_method): incomplete subclass check.
  [ruby-dev:25464]

* gc.c (rb_data_object_alloc): klass may be NULL.
  [ruby-list:40498]

* bignum.c (rb_big_rand): should return positive random number.
  [ruby-dev:25401]

* bignum.c (rb_big_rand): do not use rb_big_modulo to generate
  random bignums.  [ruby-dev:25396]

* variable.c (rb_autoload): [ruby-dev:25373]

* eval.c (svalue_to_avalue): [ruby-dev:25366]

* string.c (rb_str_justify): [ruby-dev:25367]

* io.c (rb_f_select): [ruby-dev:25312]

* ext/socket/socket.c (sock_s_getservbyport): [ruby-talk:124072]

* struct.c (make_struct): [ruby-dev:25249]

* dir.c (dir_open_dir): new function.  [ruby-dev:25242]

* io.c (rb_f_open): add type check for return value from to_open.

* lib/pstore.rb (PStore#transaction): Use the empty content when a
  file is not found.  [ruby-dev:24561]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8068 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-03-04 06:47:45 +00:00
kou 813a901a5e * sample/rss/tdiary_plugin/rss-recent.rb: added site information.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8056 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-03-03 02:52:55 +00:00
gotoyuzo 36c839f233 * lib/webrick/httpproxy.rb (WEBrick::HTTPProxyServer#proxy_service):
should delete trailing LF from the result of pack("m*").

* lib/webrick/httpproxy.rb (WEBrick::HTTPProxyServer#proxy_connect):
  - should delete trailing LF from the result of pack("m*").
  - clear Request-Line not to send the sesponse by HTTPServer#run.

* lib/webrick/httputils (WEBrick::HTTPUtils.parse_qvalues):
  refine regexp (and change the name of a local variable).

* lib/webrick/server.rb (WEBrick::Daemon.start): prepared stdio
  don't allow changing its mode.

* test/webrick/*, sample/webrick/httpproxy.rb: add new files.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7743 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-01-07 11:05:22 +00:00
nahi e426b93e84 * lib/soap/*, test/soap/*, sample/soap/authheader/*: eval cleanup.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7628 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-12-21 15:08:56 +00:00
nahi d7f6ed827f * added samples for the previous soap4r's commit.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7615 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-12-20 14:00:21 +00:00
nobu 0e01d2883b * sample/optparse/subcommand.rb: a sample for sub commands like
cvs.  contributed by Minero Aoki.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7532 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-12-11 04:09:07 +00:00
matz aa92750f27 * process.c (proc_setgroups): [ruby-dev:25081]
* re.c (rb_reg_eqq): document fix.  [ruby-talk:122541]

* io.c (io_fread): take VALUE argument.

* ext/socket/socket.c (sock_connect): use rb_str_new4().
  [ruby-dev:25052]

* eval.c (rb_yield_0): [ruby-dev:25051]

* io.c (io_write): remove rb_str_locktmp().  [ruby-dev:25050]

* io.c (io_fwrite): takes VALUE string as an argument.
  [ruby-dev:25050]

* ext/socket/socket.c (sock_connect): remove rb_str_locktmp().
  [ruby-dev:25050]

* ext/socket/socket.c (udp_connect): [ruby-dev:25045]

* ext/socket/socket.c (udp_bind): ditto.

* ext/socket/socket.c (udp_send): ditto.

* ext/socket/socket.c (bsock_send): ditto.

* ext/socket/socket.c (s_recvfrom): ditto.

* hash.c (rb_hash_hash): should provide "hash" method where "eql?"
  is redefined.  [ruby-talk:122482]

* ext/socket/socket.c (bsock_setsockopt): [ruby-dev:25039]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7482 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-12-06 15:31:26 +00:00
kou 2572d5e20e * lib/rss/{0.9,1.0,2.0,trackback,xml-stylesheet}.rb: added
#setup_maker.
* test/rss/test_setup_maker_*.rb: added tests for #setup_maker.
* lib/rss/maker/base.rb(RSS::Maker::Items#max_size=): supported
  output item size limitation.
* sample/rss/blend.rb: added sample for RSS Maker.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7391 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-11-27 08:47:28 +00:00
kou b325d73c13 * sample/rss/list_description.rb: untabified.
* sample/rss/rss_recent.rb: ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7389 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-11-27 08:41:32 +00:00
matz 9d4144af09 * eval.c (rb_yield_0): lambda{}.call(1) should raise exception.
[ruby-talk:120253]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7267 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-11-14 16:00:36 +00:00
tadf c26e86fd1b synchronized with date2 3.6.1
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6961 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-09-25 23:10:36 +00:00
aamine 2c17921671 * parse.y [ripper]: on__scan event removed.
* parse.y [ripper]: event name is changed: on__XXX -> on_XXX.
* ext/ripper/eventids2.c: ditto.
* ext/ripper/ripper.rb.in: ditto.
* ext/ripper/lib/ripper.rb: sync with ripper.rb.in.
* ext/ripper/lib/ripper/tokenizer: ditto.
* ext/ripper/lib/ripper/filter: new file.
* sample/ripper/colorize.rb: new file.
* sample/ripper/strip-comment.rb: new file.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6952 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-09-22 05:22:50 +00:00
nahi df731e37a1 * added files:
* lib/soap/header/*
	  * lib/soap/rpc/httpserver.rb
	  * lib/wsdl/soap/cgiStubCreator.rb
	  * lib/wsdl/soap/classDefCreator.rb
	  * lib/wsdl/soap/classDefCreatorSupport.rb
	  * lib/wsdl/soap/clientSkeltonCreator.rb
	  * lib/wsdl/soap/driverCreator.rb
	  * lib/wsdl/soap/mappingRegistryCreator.rb
	  * lib/wsdl/soap/methodDefCreator.rb
	  * lib/wsdl/soap/servantSkeltonCreator.rb
	  * lib/wsdl/soap/standaloneServerStubCreator.rb
	  * lib/wsdl/xmlSchema/enumeration.rb
	  * lib/wsdl/xmlSchema/simpleRestriction.rb
	  * lib/wsdl/xmlSchema/simpleType.rb
	  * lib/xsd/codegen/*
	  * lib/xsd/codegen.rb
	  * sample/soap/authheader/*
	  * sample/soap/raa2.4/*
	  * sample/soap/ssl/*
	  * sample/soap/swa/*
	  * sample/soap/whois.rb
	  * sample/wsdl/raa2.4/*
	  * test/soap/header/*
	  * test/soap/ssl/*
	  * test/soap/struct/*
	  * test/soap/swa/*
	  * test/soap/wsdlDriver/*
	  * test/wsdl/multiplefault.wsdl
	  * test/wsdl/simpletype/*
	  * test/wsdl/test_multiplefault.rb

	* modified files:
	  * lib/soap/baseData.rb
	  * lib/soap/element.rb
	  * lib/soap/generator.rb
	  * lib/soap/netHttpClient.rb
	  * lib/soap/parser.rb
	  * lib/soap/property.rb
	  * lib/soap/soap.rb
	  * lib/soap/streamHandler.rb
	  * lib/soap/wsdlDriver.rb
	  * lib/soap/wsdlDriver.rb
	  * lib/soap/encodingstyle/handler.rb
	  * lib/soap/encodingstyle/literalHandler.rb
	  * lib/soap/encodingstyle/soapHandler.rb
	  * lib/soap/mapping/factory.rb
	  * lib/soap/mapping/mapping.rb
	  * lib/soap/mapping/registry.rb
	  * lib/soap/mapping/rubytypeFactory.rb
	  * lib/soap/mapping/wsdlRegistry.rb
	  * lib/soap/rpc/cgistub.rb
	  * lib/soap/rpc/driver.rb
	  * lib/soap/rpc/proxy.rb
	  * lib/soap/rpc/router.rb
	  * lib/soap/rpc/soaplet.rb
	  * lib/soap/rpc/standaloneServer.rb
	  * lib/wsdl/data.rb
	  * lib/wsdl/definitions.rb
	  * lib/wsdl/operation.rb
	  * lib/wsdl/parser.rb
	  * lib/wsdl/soap/definitions.rb
	  * lib/wsdl/xmlSchema/complexContent.rb
	  * lib/wsdl/xmlSchema/complexType.rb
	  * lib/wsdl/xmlSchema/data.rb
	  * lib/wsdl/xmlSchema/parser.rb
	  * lib/wsdl/xmlSchema/schema.rb
	  * lib/xsd/datatypes.rb
	  * lib/xsd/qname.rb
	  * sample/soap/sampleStruct/server.rb
	  * sample/wsdl/amazon/AmazonSearch.rb
	  * sample/wsdl/amazon/AmazonSearchDriver.rb
	  * test/soap/test_property.rb
	  * test/soap/calc/test_calc_cgi.rb
	  * test/wsdl/test_emptycomplextype.rb

	* summary
	  * add SOAP Header mustUnderstand support.

	  * add HTTP client SSL configuration and Cookies support (works
	    completely with http-access2).

	  * add header handler for handling sending/receiving SOAP Header.

	  * map Ruby's anonymous Struct to common SOAP Struct in SOAP Object
	    Model.  it caused error.

	  * add WSDL simpleType support to restrict lexical value space.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6565 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-07-03 13:33:20 +00:00
seki a1162d2bf8 using "DRb.thread.join" instead of "gets"
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6536 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-06-27 15:36:32 +00:00
kou ea88f84a77 * sample/rss/tdiary_plugin/rss-recent.rb: supported Hiki.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6534 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-06-27 13:40:47 +00:00
kou d9f9245ad3 * sample/rss/tdiary_plugin/rss-recent.rb: added more information.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6474 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-06-18 16:13:01 +00:00
nobu 82572952ec * eval.c (rb_yield_0, proc_invoke, proc_arity): allow passing a block
to a Proc.  [ruby-dev:23533]

* parse.y (block_par, block_var): ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6402 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-05-25 02:54:22 +00:00
kou 8dfa6fb0a8 * lib/rss/parser.rb, lib/rss/1.0.rb: accepted rdf:resource or
resource attribute in rdf:li.
* test/rss/test_parser.rb: added test for above change.
* lib/rss/dublincore.rb: reverted style.
* lib/rss/xmlparser.rb: normalized XMLParser class hierarchy.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6115 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-04-07 03:36:38 +00:00
nahi 223d1cb77b * lib/logger.rb: trim tail space of each line. no user visible change.
* lib/rss/dublincore.rb: fixed class definition mismatch.

        * sample/openssl/gen_csr.rb: fixed wrong usage text.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6030 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-03-26 16:47:16 +00:00
matz aab1ba1365 * eval.c (rb_require_safe): preserve old ruby_errinfo.
[ruby-talk:95409]

* eval.c (rb_f_raise): should not clear backtrace information if
  exception object already have one.

* parse.y (assoc_list): allow {sym: val} style Hash. [Ruby2]
  this change is done by Nobuyoshi Nakada <nobu@ruby-lang.org>.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5987 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-03-20 16:45:41 +00:00
matz 610b5d7975 * variable.c (rb_cvar_set): class variables become private to the
particular class/module. [Ruby2]

* variable.c (rb_cvar_get): ditto.

* io.c (rb_io_sync): need not to check writable. [ruby-core:02674]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5977 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-03-19 07:13:01 +00:00
matz ab6963043d * error.c (exc_initialize): calling 'to_str' each time just for
type checking is too heavy.  [ruby-core:02661]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5965 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-03-16 23:03:17 +00:00
matz 7c097dc891 * struct.c (rb_struct_s_def): Struct::new executes block with
generated struct class. [ruby-talk:02606]

* io.c (rb_io_ungetc): raise IOError instead of calling
  rb_sys_fail().  [ruby-talk:23181]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5934 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-03-10 07:05:19 +00:00
matz 54a0407425 * eval.c (method_hash): new method. [ruby-talk:93968]
* eval.c (proc_eq): do not compare dyna_vars.

* eval.c (proc_hash): new method.

* eval.c (rb_yield_0): protect break/return from within orphan (or
  lambda) Proc object.

* parse.y (yylex): should not allow symbol for invalid global
  variable (e.g. `:$-)`). [ruby-core:02518]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5879 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-03-03 04:55:35 +00:00
matz bf08067ded * eval.c (proc_invoke): no orphan block check is needed when pcall
is true.

* eval.c (localjump_destination): update localjump condition.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5845 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-02-27 13:30:00 +00:00
nahi 3fd10dc40c * sample/soap/calc/httpd.rb, sample/soap/exchange/httpd.rb,
sample/soap/sampleStruct/httpd.rb, sample/wsdl/googleSearch/httpd.rb:
          use soap/property instead of getopts for configuring DocumentRoot
          and port# of httpd.  see samplehttpd.conf below.

        * sample/soap/calc/samplehttpd.conf,
          sample/soap/exchange/samplehttpd.conf,
          sample/soap/sampleStruct/samplehttpd.conf,
          sample/wsdl/googleSearch/samplehttpd.conf: added.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5714 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-02-15 11:50:02 +00:00
seki 30ff0b6aeb import drb/sample
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5698 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-02-14 02:28:02 +00:00
kou 976226b5de * lib/rss/parser.rb (RSS::Parser): added @@default_parser. Used
XML parser became selectable.
* test/rss/test_parser.rb: added tests for RSS::Parser.default_parser.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5594 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-01-31 16:10:53 +00:00
nahi d52c3b1e94 * sample/openssl/gen_csr.rb: follow OpenSSL::X509::Name change.
ASN.1 type of subject DN elements were wrong.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5581 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-01-29 13:30:05 +00:00