Skip to content

Commit

Permalink
Tag for 1.8.7.
Browse files Browse the repository at this point in the history
git-svn-id: http://svn.ruby-lang.org/repos/ruby/tags/v1_8_7@16730 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
  • Loading branch information
knu committed May 31, 2008
1 parent 5b792fe commit 6305529
Show file tree
Hide file tree
Showing 54 changed files with 630 additions and 315 deletions.
111 changes: 111 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,114 @@
Sat May 31 23:53:35 2008 Akinori MUSHA <knu@iDaemons.org>

* .: Release as Ruby 1.8.7.

Sat May 31 23:33:34 2008 Akinori MUSHA <knu@iDaemons.org>

* README, README.ja: Add a note about default C flags.

Sat May 31 22:11:15 2008 Kazuhiro NISHIYAMA <zn@mbf.nifty.com>

* version.c (ruby_description, ruby_copyright): backported from
1.9. bug#19002, [ruby-dev:34883]

* error.c (report_bug): uses ruby_description.

Sat May 31 20:56:04 2008 Akinori MUSHA <knu@iDaemons.org>

* array.c (rb_ary_delete_if): should return enumerator if no block
is given. [ruby-dev:34901]

Sat May 31 18:28:17 2008 Nobuyoshi Nakada <nobu@ruby-lang.org>

* suppress warnings with -Wwrite-string.

Sat May 31 15:58:08 2008 Nobuyoshi Nakada <nobu@ruby-lang.org>

* Makefile.in, configure.in (warnflags): defaulted to -Wall
-Wno-parentheses with gcc. [ruby-dev:34810]

Fri May 30 05:28:18 2008 NAKAMURA Usaku <usa@ruby-lang.org>

* enum.c (count_i, count_iter_i, count_all_i): add prototypes for VC.

Fri May 30 04:32:07 2008 Akinori MUSHA <knu@iDaemons.org>

* enum.c (count_i, count_iter_i): Sync with trunk.
enum.c (enum_count, count_all_i, Init_Enumerable),
array.c (rb_ary_count): Sync with trunk. If no argument or
block is given, count the number of all elements.

Fri May 30 03:12:18 2008 Akinori MUSHA <knu@iDaemons.org>

* ext/openssl/ossl_bn.c (ossl_bn_s_rand, ossl_bn_s_pseudo_rand):
Int should be enough here.

Fri May 30 02:35:00 2008 Akinori MUSHA <knu@iDaemons.org>

* ext/openssl/ossl_bn.c (ossl_bn_s_rand, ossl_bn_s_pseudo_rand),
ext/openssl/ossl_pkey_dh.c (ossl_dh_s_generate)
(ossl_dh_initialize),
ext/openssl/ossl_pkey_dsa.c (ossl_dsa_s_generate),
ext/openssl/ossl_rand.c (ossl_rand_bytes)
(ossl_rand_pseudo_bytes, ossl_rand_egd_bytes),
ext/openssl/ossl_x509store.c (ossl_x509stctx_set_error): Do not
use FIX2INT() without checking the value type. Use NUM2INT()
instead; found by akr in [ruby-dev:34890].

Thu May 29 20:07:45 2008 Akinori MUSHA <knu@iDaemons.org>

* configure.in, win32/Makefile.sub, mkconfig.rb, instruby.rb,
ruby.c, lib/mkmf.rb, README.EXT, README.EXT.ja: Backport the
vendor_ruby directory support.

Thu May 29 17:52:31 2008 Nobuyoshi Nakada <nobu@ruby-lang.org>

* ext/zlib/extconf.rb: search zlib1, and regard mswin32 later than VC6
as WIN32. [ruby-core:16984]

Wed May 28 17:54:29 2008 Akinori MUSHA <knu@iDaemons.org>

* string.c (rb_str_start_with): Remove an unused variable.
(rb_str_upto_m): Fix a prototype.

Wed May 28 17:48:28 2008 Akinori MUSHA <knu@iDaemons.org>

* range.c (range_step): Fix brokenness when a non-integer numeric
value is specified as step. [rubyspec]
(range_step): Make use of String#step internally if a string (or
string-alike) range is given.

* string.c (rb_str_upto_m, Init_String): Add an optional second
argument to specify if the last value should be included.

Wed May 28 16:53:39 2008 Akinori MUSHA <knu@iDaemons.org>

* array.c (rb_ary_slice_bang): Call rb_ary_modify_check() at the
beginning. [rubyspec]

Wed May 28 16:12:44 2008 Akinori MUSHA <knu@iDaemons.org>

* lib/webrick/httpservlet/cgihandler.rb (WEBrick::HTTPServlet::CGIHandler#do_GET):
Set the HTTP status code to 302 if a Location header field is
present and the status code is not valid as a client
redirection. cf. RFC 3875 6.2.3, 6.2.4.

Wed May 28 15:18:16 2008 Nobuyoshi Nakada <nobu@ruby-lang.org>

* lib/singleton.rb (SingletonClassMethods): _load should be public.

Wed May 28 12:52:41 2008 Nobuyoshi Nakada <nobu@ruby-lang.org>

* marshal.c (w_object, marshal_dump, r_object0, marshal_load): search
private methods too. [ruby-dev:34671]

* object.c (convert_type): ditto.

Tue May 27 23:26:49 2008 Yukihiro Matsumoto <matz@ruby-lang.org>

* error.c (rb_bug): description from rb_bug() should include
patchlevel. [ruby-dev:34826]

Tue May 27 20:19:22 2008 Akinori MUSHA <knu@iDaemons.org>

* array.c (rb_ary_slice_bang): Return an empty array instead of
Expand Down
32 changes: 31 additions & 1 deletion NEWS
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,31 @@ with all sufficient information, see the ChangeLog file.

== Changes since the 1.8.6 release

=== Configuration changes

* default C flags

Some C compiler flags may be added by default depending on your
environment. Specify optflags=.. and warnflags=.. as necessary to
override them.

* vendor_ruby directory

A new library directory named `vendor_ruby' is introduced in
addition to `site_ruby'. The idea is to separate libraries
installed by the package system (`vendor') from manually (`site')
installed libraries preventing the former from getting overwritten
by the latter, while preserving the user option to override vendor
libraries with site libraries. (`site_ruby' takes precedence over
`vendor_ruby')

If you are a package maintainer, make each library package configure
the library passing the `--vendor' option to `extconf.rb' so that
the library files will get installed under `vendor_ruby'.

You can change the directory locations using configure options such
as `--with-sitedir=DIR' and `--with-vendordir=DIR'.

=== Library updates (outstanding ones only)

* new library
Expand Down Expand Up @@ -241,11 +266,16 @@ with all sufficient information, see the ChangeLog file.

* String#each_byte
* String#each
* String#each_lines
* String#each_line
* String#gsub(pattern)

Return an enumerator if no block is given.

* String#upto

An optional second argument is added to specify if the last value
should be included.

* StopIteration

New exception class that causes Kernel#loop to stop iteration when
Expand Down
4 changes: 4 additions & 0 deletions README
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,10 @@ This is what you need to do to compile and install Ruby:

2. Run ./configure, which will generate config.h and Makefile.

Some C compiler flags may be added by default depending on your
environment. Specify optflags=.. and warnflags=.. as necessary
to override them.

3. Edit defines.h if you need. Usually this step will not be needed.

4. Remove comment mark(#) before the module names from ext/Setup (or
Expand Down
5 changes: 5 additions & 0 deletions README.EXT
Original file line number Diff line number Diff line change
Expand Up @@ -662,6 +662,11 @@ Try generating the Makefile by:

ruby extconf.rb

If the library should be installed under vendor_ruby directory
instead of site_ruby directory, use --vendor option as follows.

ruby extconf.rb --vendor

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.
Expand Down
6 changes: 6 additions & 0 deletions README.EXT.ja
Original file line number Diff line number Diff line change
Expand Up @@ -765,6 +765,12 @@ Makefile

�Ȥ��Ƥ���������

site_ruby �ǥ��쥯�ȥ�Ǥʤ���
vendor_ruby �ǥ��쥯�ȥ�˥��󥹥ȡ��뤹����ˤ�
�ʲ��Τ褦�� --vendor ���ץ�����ä��Ƥ���������

ruby extconf.rb --vendor

�ǥ��쥯�ȥ��ext�ʲ����Ѱդ������ˤ�Ruby���Τ�make�λ���
��ưŪ��Makefile����������ޤ��Τǡ����Υ��ƥåפ����פǤ���

Expand Down
4 changes: 4 additions & 0 deletions README.ja
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,10 @@ Ruby

2. configure��¹Ԥ���Makefile�ʤɤ���������

�Ķ��ˤ�äƤϥǥե���Ȥ�C����ѥ����ѥ��ץ�����դ�
�ޤ���configure���ץ����� optflags=.. warnflags=.. ��
�Ǿ�񤭤Ǥ��ޤ���

3. (ɬ�פʤ��)defines.h���Խ�����

¿ʬ��ɬ��̵���Ȼפ��ޤ���
Expand Down
17 changes: 13 additions & 4 deletions array.c
Original file line number Diff line number Diff line change
Expand Up @@ -2080,6 +2080,7 @@ rb_ary_slice_bang(argc, argv, ary)
VALUE arg1, arg2;
long pos, len, orig_len;

rb_ary_modify_check(ary);
if (rb_scan_args(argc, argv, "11", &arg1, &arg2) == 2) {
pos = NUM2LONG(arg1);
len = NUM2LONG(arg2);
Expand Down Expand Up @@ -2184,6 +2185,7 @@ static VALUE
rb_ary_delete_if(ary)
VALUE ary;
{
RETURN_ENUMERATOR(ary, 0, 0);
rb_ary_reject_bang(ary);
return ary;
}
Expand Down Expand Up @@ -3063,27 +3065,34 @@ rb_ary_nitems(ary)

/*
* call-seq:
* array.count -> int
* array.count(obj) -> int
* array.count { |item| block } -> int
*
* Returns the number of elements which equals to <i>obj</i>.
* If a block is given, counts tthe number of elements yielding a true value.
* Returns the number of elements. If an argument is given, counts
* the number of elements which equals to <i>obj</i>. If a block is
* given, counts the number of elements yielding 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_count(int argc, VALUE *argv, VALUE ary)
rb_ary_count(argc, argv, ary)
int argc;
VALUE *argv;
VALUE ary;
{
long n = 0;

if (argc == 0) {
VALUE *p, *pend;

RETURN_ENUMERATOR(ary, 0, 0);
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++;
Expand Down
4 changes: 4 additions & 0 deletions bcc32/Makefile.sub
Original file line number Diff line number Diff line change
Expand Up @@ -294,9 +294,12 @@ $(CONFIG_H): $(MKFILES) $(srcdir)/bcc32/Makefile.sub
\#define RUBY_LIB "/lib/ruby/$(MAJOR).$(MINOR)"
\#define RUBY_SITE_LIB "/lib/ruby/site_ruby"
\#define RUBY_SITE_LIB2 "/lib/ruby/site_ruby/$(MAJOR).$(MINOR)"
\#define RUBY_VENDOR_LIB "/lib/ruby/vendor_ruby"
\#define RUBY_VENDOR_LIB2 "/lib/ruby/vendor_ruby/$(MAJOR).$(MINOR)"
\#define RUBY_PLATFORM "$(ARCH)-$(OS)"
\#define RUBY_ARCHLIB "/lib/ruby/$(MAJOR).$(MINOR)/$(ARCH)-$(OS)"
\#define RUBY_SITE_ARCHLIB "/lib/ruby/site_ruby/$(MAJOR).$(MINOR)/$(ARCH)-$(OS)"
\#define RUBY_VENDOR_ARCHLIB "/lib/ruby/vendor_ruby/$(MAJOR).$(MINOR)/$(ARCH)-$(OS)"
|
@exit > $@

Expand Down Expand Up @@ -409,6 +412,7 @@ 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,@configure_args@,--enable-shared $(configure_args),;t t
s,@configure_input@,$$configure_input,;t t
s,@srcdir@,$(srcdir),;t t
Expand Down
22 changes: 22 additions & 0 deletions configure.in
Original file line number Diff line number Diff line change
Expand Up @@ -1710,9 +1710,28 @@ AC_DEFINE_UNQUOTED(RUBY_LIB, "${RUBY_LIB_PATH}")
AC_DEFINE_UNQUOTED(RUBY_SITE_LIB, "${RUBY_SITE_LIB_PATH}")
AC_DEFINE_UNQUOTED(RUBY_SITE_LIB2, "${RUBY_SITE_LIB_PATH2}")

AC_ARG_WITH(vendordir,
[ --with-vendordir=DIR vendor libraries in DIR [PREFIX/lib/ruby/vendor_ruby]],
[vendordir=$withval],
[vendordir='${prefix}/lib/ruby/vendor_ruby'])
VENDOR_DIR=`eval echo \\"${vendordir}\\"`
case "$target_os" in
cygwin*|mingw*|*djgpp*|os2-emx*)
RUBY_VENDOR_LIB_PATH="`expr "$VENDOR_DIR" : "$prefix\(/.*\)"`" ||
RUBY_VENDOR_LIB_PATH="$VENDOR_DIR";;
*)
RUBY_VENDOR_LIB_PATH="$VENDOR_DIR";;
esac
RUBY_VENDOR_LIB_PATH2="${RUBY_VENDOR_LIB_PATH}/${MAJOR}.${MINOR}"

AC_DEFINE_UNQUOTED(RUBY_LIB, "${RUBY_LIB_PATH}")
AC_DEFINE_UNQUOTED(RUBY_VENDOR_LIB, "${RUBY_VENDOR_LIB_PATH}")
AC_DEFINE_UNQUOTED(RUBY_VENDOR_LIB2, "${RUBY_VENDOR_LIB_PATH2}")

AC_SUBST(arch)dnl
AC_SUBST(sitearch)dnl
AC_SUBST(sitedir)dnl
AC_SUBST(vendordir)dnl

configure_args=$ac_configure_args
AC_SUBST(configure_args)dnl
Expand All @@ -1725,6 +1744,8 @@ if test "$fat_binary" != no ; then

AC_DEFINE_UNQUOTED(RUBY_SITE_THIN_ARCHLIB,
"${RUBY_SITE_LIB_PATH}/" __ARCHITECTURE__ "-${target_os}")
AC_DEFINE_UNQUOTED(RUBY_VENDOR_THIN_ARCHLIB,
"${RUBY_VENDOR_LIB_PATH}/" __ARCHITECTURE__ "-${target_os}")
AC_DEFINE_UNQUOTED(RUBY_PLATFORM, __ARCHITECTURE__ "-${target_os}")
else
arch="${target_cpu}-${target_os}"
Expand All @@ -1738,6 +1759,7 @@ esac

AC_DEFINE_UNQUOTED(RUBY_ARCHLIB, "${RUBY_LIB_PATH}/${arch}")
AC_DEFINE_UNQUOTED(RUBY_SITE_ARCHLIB, "${RUBY_SITE_LIB_PATH2}/${sitearch}")
AC_DEFINE_UNQUOTED(RUBY_VENDOR_ARCHLIB, "${RUBY_VENDOR_LIB_PATH2}/${sitearch}")

AC_ARG_WITH(search-path,
[ --with-search-path=DIR specify the additional search path],
Expand Down
2 changes: 1 addition & 1 deletion dir.c
Original file line number Diff line number Diff line change
Expand Up @@ -475,7 +475,7 @@ dir_inspect(dir)

Data_Get_Struct(dir, struct dir_data, dirp);
if (dirp->path) {
char *c = rb_obj_classname(dir);
const char *c = rb_obj_classname(dir);
int len = strlen(c) + strlen(dirp->path) + 4;
VALUE s = rb_str_new(0, len);
snprintf(RSTRING_PTR(s), len+1, "#<%s:%s>", c, dirp->path);
Expand Down
Loading

0 comments on commit 6305529

Please sign in to comment.