Ruby-dev summary 28606-28636

Hi all,

This is a summary of ruby-dev ML in these days.

[ruby-dev:28606] ";;" causes syntax error

  Shyouhei Urabe reported that ";;" causes syntax error:

    ~ % ruby-1.8 -ve ';;'
    ruby 1.8.4 (2006-02-12) [x86_64-linux]

    ~ % ruby -ve ';;'
    ruby 1.9.0 (2006-02-14) [x86_64-linux]
    -e:1: syntax error, unexpected kEND

  This is because ";;" is equivalent to "end" in Ruby 1.9.
  Matz noted that he is going to remove ";;" syntax.

[ruby-dev:28627] ossl_cipher.c:124: warning: control reaches end of non-void function

  Akira Tanaka claimed that openssl extension uses too many -DHAVE_XX
  options on command line, such as:

    gcc -fPIC -Wall -Wno-parentheses -g -O2 -DRUBY_GC_STRESS
    -I. -I../.. -I../../../../ruby -I../../../../ruby/ext/openssl
    -DHAVE_UNISTD_H -DHAVE_SYS_TIME_H -DHAVE_ASSERT_H
    -DHAVE_OPENSSL_SSL_H -DHAVE_OPENSSL_CONF_API_H
    -DHAVE_ERR_PEEK_LAST_ERROR -DHAVE_BN_MOD_ADD -DHAVE_BN_MOD_SQR
    -DHAVE_BN_MOD_SUB -DHAVE_BN_PSEUDO_RAND_RANGE -DHAVE_BN_RAND_RANGE
    -DHAVE_CONF_GET1_DEFAULT_CONFIG_FILE
    -DHAVE_EVP_CIPHER_CTX_SET_PADDING -DHAVE_EVP_CIPHERFINAL_EX
    -DHAVE_EVP_CIPHERINIT_EX -DHAVE_EVP_DIGESTFINAL_EX
    -DHAVE_EVP_DIGESTINIT_EX -DHAVE_EVP_MD_CTX_CLEANUP
    -DHAVE_EVP_MD_CTX_CREATE -DHAVE_EVP_MD_CTX_DESTROY
    -DHAVE_EVP_MD_CTX_INIT -DHAVE_HMAC_CTX_CLEANUP -DHAVE_HMAC_CTX_INIT
    -DHAVE_PEM_DEF_CALLBACK -DHAVE_X509V3_SET_NCONF
    -DHAVE_X509V3_EXT_NCONF_NID -DHAVE_X509_CRL_ADD0_REVOKED
    -DHAVE_X509_CRL_SET_ISSUER_NAME -DHAVE_X509_CRL_SET_VERSION
    -DHAVE_X509_CRL_SORT -DHAVE_OBJ_NAME_DO_ALL_SORTED
    -DHAVE_OPENSSL_CLEANSE -DHAVE_VA_ARGS_MACRO -DHAVE_OPENSSL_ENGINE_H
    -DHAVE_ENGINE_ADD -DHAVE_ENGINE_LOAD_BU! ILTIN_ENGINES
    -DHAVE_ENGINE_GET_DIGEST -DHAVE_ENGINE_GET_CIPHER
    -DHAVE_ENGINE_CLEANUP -DHAVE_OPENSSL_OCSP_H -DHAVE_ST_FLAGS
    -DHAVE_ST_ENGINE -DHAVE_ST_SINGLE -c
    ../../../../ruby/ext/openssl/ossl_cipher.c

  This is because macros given by command line options precede
  any other macro definition. Nobuyoshi Nakada posted a patch
  to write any HAVE_XXX macros in to the header file.

[ruby-dev:28633] load_to(file, mod)

  Hidetoshi Nagai requested a new method Kernel#load_to, which loads
  a ruby script on the specified module. For example:

    # x.rb
    C = "OK"

    # main.rb
    module M
    end
    load_to "./x.rb", M
    p M::C # => "OK"

  Minero Aoki answered that #load_to is almost equivalent to
  mod.module_eval(File.read("./x.rb")).

-- Minero Aoki
ruby-dev summary index: http://i.loveruby.net/en/ruby-dev-summary.html