[#10830] New kill_thread function in eval.c conflict with a BeOS system function — <noreply@...>
Bugs item #9736, was opened at 01/04/2007 16:20
[#10834] Hefty patch for mkmf.rb — <noreply@...>
Patches item #9762, was opened at 2007-04-02 09:55
[#10853] Why limit class def to a constant or colon node? — Charles Oliver Nutter <charles.nutter@...>
Is there a historical reason why I can't do something like these:
Hi,
On 4/3/07, Charles Oliver Nutter <charles.nutter@sun.com> wrote:
[#10867] defined? operator changed in ruby 1.9: bug or feature? — David Flanagan <david@...>
The behavior of the defined? operator is different in current ruby 1.9
Hi,
[#10875] Ruby shouldn't process shebang! — "Kirill A. Shutemov" <k.shutemov@...>
> echo -e '#!test\nputs "test passed"' | ruby=20
On 4/5/07, Kirill A. Shutemov <k.shutemov@gmail.com> wrote:
[#10884] Ruby 1.9/1.8 compatibility: String#lines — murphy <murphy@...>
It seems the most important change in 1.9, in terms of compatibility, is
[#10907] install (/bin/install) path hardcoded at build — <noreply@...>
Bugs item #10004, was opened at 2007-04-10 13:21
[#10909] Turning off verbose output for mkmf — Daniel Berger <Daniel.Berger@...>
Hi all,
[#10923] block_given? => true in main(). — "Adam Bozanich" <adam.boz@...>
Hi all.
[#10933] Cannot build with extra library path if previous version already installed — <noreply@...>
Bugs item #10140, was opened at 2007-04-16 17:32
Hi,
On 4/16/07, nobu@ruby-lang.org <nobu@ruby-lang.org> wrote:
Hi,
On 4/19/07, Nobuyoshi Nakada <nobu@ruby-lang.org> wrote:> Hi,>> At Wed, 18 Apr 2007 20:21:44 +0900,> Michal Suchanek wrote in [ruby-core:10960]:> > Yes. And this should also apply to extensions. The mkmf tests are now> > fine but the extension is linked with -L/sw/lib before -L../..>> Indeed.>>> Index: configure.in> ===================================================================> --- configure.in (revision 12191)> +++ configure.in (working copy)> @@ -1385,5 +1385,4 @@ if test "$enable_rpath" = yes; then> fi>> -LDFLAGS="-L. $LDFLAGS"> AC_SUBST(ARCHFILE)>This would break the previous fix so I did not even try to apply this ^
Hi,
[#10944] IRHG - "Three Stuffing" — Charles Thornton <ceo@...>
Can a japanese speaker give a translation
[#10947] backwards compatibility for 'raise Interrupt' — Ryan Davis <ryand-ruby@...>
** BEFORE:
Hi,
Hi,
[#10968] IRHG - Manuscript Hunt — Charles Thornton <ceo@...>
Does anyone know of a Text Copy (Not PDF) of this manuscript:
[#10981] ruby 1.9 crash on cygwin — "Anton Ivanov" <Anton.Ivanov@...>
Hi,
[#11003] miniruby loads extensions from already installed ruby — <noreply@...>
Bugs item #10303, was opened at 2007-04-23 10:44
Hi,
On 23/04/07, Nobuyoshi Nakada <nobu@ruby-lang.org> wrote:
Hi,
On 26/04/07, Nobuyoshi Nakada <nobu@ruby-lang.org> wrote:
Hi,
[#11012] Ruby 1.9: multiple splats on rvalues in parallel assignment — David Flanagan <david@...>
This has got to be a bug...
[#11025] gsub with backslash characters in replacement string — "Adam Bozanich" <adam.boz@...>
Hello, spotted this one the other day:
Hi,
On 4/26/07, Yukihiro Matsumoto <matz@ruby-lang.org> wrote:
On 4/26/07, Adam Bozanich <adam.boz@gmail.com> wrote:
On 4/26/07, Marte Raphael Y. Soliza <myrtactle@gmail.com > wrote:
[#11029] Proc#arity regression or bug in RDoc — Mauricio Fernandez <mfp@...>
On Thu, Apr 26, 2007 at 06:55:46PM +0900, Mauricio Fernandez wrote:
Re: [ ruby-Patches-9762 ] Hefty patch for mkmf.rb
noreply@rubyforge.org wrote:
> Patches item #9762, was opened at 2007-04-02 09:55
> You can respond by visiting:
> http://rubyforge.org/tracker/?func=detail&atid=1700&aid=9762&group_id=426
<snip>
Oops, forgot RubyForge doesn't forward the attachments. Here's the
patch, inline:
--- mkmf.orig Wed Feb 28 06:23:42 2007
+++ mkmf.rb Mon Apr 2 10:48:21 2007
@@ -63,6 +63,8 @@
$solaris = /solaris/ =~ RUBY_PLATFORM
$dest_prefix_pattern = (File::PATH_SEPARATOR == ';' ?
/\A([[:alpha:]]:)?/ : /\A/)
+# :stopdoc:
+
def config_string(key, config = CONFIG)
s = config[key] and !s.empty? and block_given? ? yield(s) : s
end
@@ -129,11 +131,13 @@
CONFTEST_C = "conftest.c"
class String
+ # Wraps a string in escaped quotes if it contains whitespace.
def quote
/\s/ =~ self ? "\"#{self}\"" : self
end
end
class Array
+ # Wraps all strings in escaped quotes if they contain whitespace.
def quote
map {|s| s.quote}
end
@@ -165,6 +169,12 @@
end
end
+# This is a custom logging module. It generates an mkmf.log file when you
+# run your extconf.rb script. This can be useful for debugging unexpected
+# failures.
+#
+# This module and its associated methods are meant for internal use only.
+#
module Logging
@log = nil
@logfile = 'mkmf.log'
@@ -461,6 +471,10 @@
log_src(src)
end
+# This is used internally by the have_macro? method.
+#
+# Internal use only.
+#
def macro_defined?(macro, src, opt = "", &b)
src = src.sub(/[^\n]\z/, "\\&\n")
try_compile(src + <<"SRC", opt, &b)
@@ -523,7 +537,7 @@
install_files(mfile, [["lib/**/*.rb", dest, "lib"]], nil, srcdir)
end
-def append_library(libs, lib)
+def append_library(libs, lib) # :no-doc:
format(LIBARG, lib) + " " + libs
end
@@ -534,6 +548,11 @@
end
end
+# This emits a string to stdout that allows users to see the results of the
+# various have* and find* methods as they are tested.
+#
+# Internal use only.
+#
def checking_for(m, fmt = nil)
f = caller[0][/in `(.*)'$/, 1] and f << ": " #` for vim
m = "checking #{/\Acheck/ =~ f ? '' : 'for '}#{m}... "
@@ -563,6 +582,8 @@
end
end
+# :startdoc:
+
# Returns whether or not +macro+ is defined either in the common header
# files or within any +headers+ you provide.
#
@@ -582,7 +603,7 @@
# If +headers+ are provided, it will include those header files as the
# header files it looks in when searching for +func+.
#
-# Real name of the library to be linked can be altered by
+# The real name of the library to be linked can be altered by
# '--with-FOOlib' configuration option.
#
def have_library(lib, func = nil, headers = nil, &b)
@@ -722,7 +743,7 @@
# If found, a macro is passed as a preprocessor constant to the
compiler using
# the member name, in uppercase, prepended with 'HAVE_ST_'.
#
-# For example, if have_struct_member('foo', 'bar') returned true, then the
+# For example, if have_struct_member('struct foo', 'bar') returned
true, then the
# HAVE_ST_BAR preprocessor macro would be passed to the compiler.
#
def have_struct_member(type, member, headers = nil, &b)
@@ -797,6 +818,13 @@
end
end
+# :stopdoc:
+
+# Used internally by the what_type? method to determine if +type+ is a
scalar
+# pointer.
+#
+# Internal use only.
+#
def scalar_ptr_type?(type, member = nil, headers = nil, &b)
try_compile(<<"SRC", &b) # pointer
#{COMMON_HEADERS}
@@ -808,6 +836,11 @@
SRC
end
+# Used internally by the what_type? method to determine if +type+ is a
scalar
+# pointer.
+#
+# Internal use only.
+#
def scalar_type?(type, member = nil, headers = nil, &b)
try_compile(<<"SRC", &b) # pointer
#{COMMON_HEADERS}
@@ -851,6 +884,10 @@
end
end
+# This method is used internally by the find_executable method.
+#
+# Internal use only.
+#
def find_executable0(bin, path = nil)
ext = config_string('EXEEXT')
if File.expand_path(bin) == bin
@@ -871,6 +908,17 @@
nil
end
+# :startdoc:
+
+# Searches for the executable +bin+ on +path+. The default path is your
+# PATH environment variable. If that isn't defined, it will resort to
+# searching /usr/local/bin, /usr/ucb, /usr/bin and /bin.
+#
+# If found, it will return the full path, including the executable name,
+# of where it was found.
+#
+# Note that this method does not actually affect the generated Makefile.
+#
def find_executable(bin, path = nil)
checking_for checking_message(bin, path) do
find_executable0(bin, path)
@@ -877,6 +925,8 @@
end
end
+# :stopdoc:
+
def arg_config(config, *defaults, &block)
$arg_config << [config, *defaults]
defaults << nil if !block and defaults.empty?
@@ -883,6 +933,20 @@
$configure_args.fetch(config.tr('_', '-'), *defaults, &block)
end
+# :startdoc:
+
+# Tests for the presence of a --with-<tt>config</tt> or
--without-<tt>config</tt>
+# option. Returns true if the with option is given, false if the without
+# option is given, and the default value otherwise.
+#
+# This can be useful for adding custom definitions, such as debug
information.
+#
+# Example:
+#
+# if with_config("debug")
+# $defs.push("-DOSSL_DEBUG") unless $defs.include? "-DOSSL_DEBUG"
+# end
+#
def with_config(config, *defaults)
config = config.sub(/^--with[-_]/, '')
val = arg_config("--with-"+config) do
@@ -904,6 +968,18 @@
end
end
+# Tests for the presence of an --enable-<tt>config</tt> or
+# --disable-<tt>config</tt> option. Returns true if the enable option
is given,
+# false if the disable option is given, and the default value otherwise.
+#
+# This can be useful for adding custom definitions, such as debug
information.
+#
+# Example:
+#
+# if enable_config("debug")
+# $defs.push("-DOSSL_DEBUG") unless $defs.include? "-DOSSL_DEBUG"
+# end
+#
def enable_config(config, *defaults)
if arg_config("--enable-"+config)
true
@@ -916,6 +992,32 @@
end
end
+# Generates a header file consisting of the various macro definitions
generated
+# by other methods such as have_func and have_header. These are then
wrapped in
+# a custom #ifndef based on the +header+ file name, which defaults to
+# 'extconf.h'.
+#
+# For example:
+#
+# # extconf.rb
+# require 'mkmf'
+# have_func('realpath')
+# have_header('sys/utime.h')
+# create_header
+# create_makefile('foo')
+#
+# The above script would generate the following extconf.h file:
+#
+# #ifndef EXTCONF_H
+# #define EXTCONF_H
+# #define HAVE_REALPATH 1
+# #define HAVE_SYS_UTIME_H 1
+# #endif
+#
+# Given that the create_header method generates a file based on definitions
+# set earlier in your extconf.rb file, you will probably want to make this
+# one of the last methods you call in your script.
+#
def create_header(header = "extconf.h")
message "creating %s\n", header
sym = header.tr("a-z./\055", "A-Z___")
@@ -983,6 +1085,13 @@
[idir, ldir]
end
+# :stopdoc:
+
+# Handles meta information about installed libraries. Uses your platform's
+# pkg-config program if it has one.
+#
+# Internal use only.
+#
def pkg_config(pkg)
if pkgconfig = with_config("#{pkg}-config") and
find_executable0(pkgconfig)
# iff package specific config command is given
@@ -1020,6 +1129,10 @@
/\A\$[\(\{]/ =~ dir ? dir : "$(DESTDIR)"+dir
end
+# Converts forward slashes to backslashes. Aimed at MS Windows.
+#
+# Internal use only.
+#
def winsep(s)
s.tr('/', '\\')
end
@@ -1122,6 +1235,7 @@
RULES
end
+# :startdoc:
# Generates the Makefile for your extension, passing along any options and
# preprocessor constants that you may have generated through other
methods.
@@ -1140,6 +1254,10 @@
# load the file within a Ruby program later, that directory structure will
# have to be followed, e.g. "require 'test/foo'".
#
+# The +srcprefix+ argument can be used to override the default source
+# directory, i.e. the current directory . It is included as part of the
VPATH
+# and added to the list of INCFLAGS.
+#
def create_makefile(target, srcprefix = nil)
$target = target
libpath = $DEFLIBPATH|$LIBPATH
@@ -1406,6 +1524,8 @@
mfile.close if mfile
end
+# :stopdoc:
+
def init_mkmf(config = CONFIG)
$makefile_created = false
$arg_config = []
@@ -1455,6 +1575,11 @@
Provided configuration options:
MESSAGE
+# Returns whether or not the Makefile was successfully generated. If not,
+# the script will abort with an error message.
+#
+# Internal use only.
+#
def mkmf_failed(path)
unless $makefile_created or File.exist?("Makefile")
opts = $arg_config.collect {|t, n| "\t#{t}#{n ? "=#{n}" : ""}\n"}
@@ -1462,6 +1587,8 @@
end
end
+# :startdoc:
+
init_mkmf
$make = with_config("make-prog", ENV["MAKE"] || "make")