ruby-dev summary 21833-21882

Ask a Question related to Ruby, Design and Development.

  1. #1

    Default ruby-dev summary 21833-21882

    Hello,

    This is a summary of ruby-dev mailing list last week.


    [ruby-dev:21809] lib/test/unit/ui/tk/testrunner.rb

    A new GUI interface for lib/test/unit using Tk extensions
    has been developed by Kazuhiro NISHIYAMA, with help of
    U.Nakamura, Nobu Nakada and Hidetoshi NAGAI. The TK
    interface almost works well so far if you apply a patch
    for pthread by NAGAI(See an article below). Let's try it out.


    [ruby-dev:21819] error message of Array.new(9,0) {|x|x+1}

    Take_tk reported a strange error message from Array.new:

    Array.new(9,0){|x|x+1}
    #=> wrong number of arguments (ArgumentError)

    The Array.new takes only 4 styles of arguments, an another array,
    size of array, size and a default value, or size and a block to
    generate default values. The example above mixes 2 argument
    styles at once, but the error message is a little bit difficult
    to understand.

    Proper English message for this error is wanted. Fell free to
    post your idea.


    [ruby-dev:21833] pthread trouble on tcltklib (Re: ruby-tk hangs
    when exception is raised)

    Hidetoshi NAGAI commited a patch to make pthread to work well with
    Ruby's thread together. The patch will solve problems in extension
    libraries using pthreads, Tcl/Tk extension for example. You can
    try it by adding "--with-pthread-ext" to configure options. The
    options is disabled by default.
    Nagai said the patch works, but it is just preliminary. Testing
    with other extensions using pthread and sending bug reports are
    welcome.


    [ruby-dev:21846] StringIO#path

    In 1.8.0, StringIO#path behaved the same as StringIO#inspect.
    This behavior was to provide polymorphic #path operation for
    applications uses not only File objects but also similar IO
    subclasses. By suggestions that StringIO and other IO subclasses
    (such as sockets) doesn't always have an applicable path, and a
    comment that using #path with File#rename and #open may occur
    unexpected behavior, Nobu Nakada has changed StringIO#path to
    return nil.


    [ruby-dev:21876] get_last_error or getLastError by DL::Importable

    Take_tk found a difference of imported method name between Ruby/DL
    and Apollo. For instance, When you import GetLastError() from
    kernel32.dll on Windows, Ruby/DL converts its name to "getLastError".
    Meanwhile, Apollo converts it to "get_last_error".

    Takaaki Tateishi, who is the maintainer of Ruby/DL, said that the
    behavior can be changed but he also received a request from who
    wants to use imported method name as-is, "GetLastError" in this case.

    They started talking about how Ruby/DL treat this and how to implement
    it.


    Kazuo Saito <ksaito@uranus.dti.ne.jp>


    Kazuo Saito Guest

  2. Similar Questions and Discussions

    1. ruby-dev summary 21608-21636
      Hello all, This is a summary of ruby-dev mailing list last week. builtin mutex and once eval Nobu Nakada posted a patch to make...
    2. [ANN] ruby-dev summary index
      Hi all, I made the index page of ruby-dev summary: http://i.loveruby.net/en/ruby-dev-summary.html This page is going to be updated on every...
    3. ruby-dev summary 21403-21530
      Hi all, This is a summary of ruby-dev ML in these days. return value of #warn In current 1.8, #warn returns its argument. U.Nakamura...
    4. ruby-dev summary 21295-21366
      Hi all, This is a summary of ruby-dev ML in these days. test and sample directory NAKAMURA Hiroshi suggested to locate tests and examples...
    5. ruby-dev summary #20316-20338
      i, In message "Re: ruby-dev summary #20316-20338" on 03/07/16, ts <decoux@moulon.inra.fr> writes: | This is a problem : plruby fail its test...
  3. #2

    Default Re: ruby-dev summary 21833-21882

    Kazuo Saito [mailto:ksaito@uranus.dti.ne.jp] wrote:
    > [ruby-dev:21809] lib/test/unit/ui/tk/testrunner.rb
    >
    > A new GUI interface for lib/test/unit using Tk extensions
    > has been developed by Kazuhiro NISHIYAMA, with help of
    > U.Nakamura, Nobu Nakada and Hidetoshi NAGAI. The TK
    > interface almost works well so far if you apply a patch
    > for pthread by NAGAI(See an article below). Let's try it out.
    Thanks to those who worked on this... it's great to have others contributing
    to make Ruby's testing framework even better.


    Nathaniel

    <:((><


    Nathaniel Talbott Guest

  4. #3

    Default Re: ruby-dev summary 21833-21882

    Kazuo Saito wrote:
    > [ruby-dev:21819] error message of Array.new(9,0) {|x|x+1}
    >
    > Take_tk reported a strange error message from Array.new:
    >
    > Array.new(9,0){|x|x+1}
    > #=> wrong number of arguments (ArgumentError)
    >
    > The Array.new takes only 4 styles of arguments, an another array,
    > size of array, size and a default value, or size and a block to
    > generate default values. The example above mixes 2 argument
    > styles at once, but the error message is a little bit difficult
    > to understand.
    >
    > Proper English message for this error is wanted. Fell free to
    > post your idea.
    Hrm, well you could try "too many arguments", or be more specific and say
    "default value must either be block or value, not both".

    Ben


    Ben Giddings Guest

  5. #4

    Default Re: ruby-dev summary 21833-21882

    On Wed, Nov 12, 2003 at 12:12:37AM +0900, Kazuo Saito wrote:
    > [ruby-dev:21819] error message of Array.new(9,0) {|x|x+1}
    >
    > Array.new(9,0){|x|x+1}
    > #=> wrong number of arguments (ArgumentError)
    >
    > Proper English message for this error is wanted. Fell free to
    > post your idea.
    How about "cannot pass block and default value to Array.new"?
    > [ruby-dev:21833] pthread trouble on tcltklib (Re: ruby-tk hangs
    > when exception is raised)
    >
    > Hidetoshi NAGAI commited a patch to make pthread to work well with
    > Ruby's thread together. The patch will solve problems in extension
    > libraries using pthreads, Tcl/Tk extension for example. You can
    > try it by adding "--with-pthread-ext" to configure options. The
    > options is disabled by default.
    > Nagai said the patch works, but it is just preliminary. Testing
    > with other extensions using pthread and sending bug reports are
    > welcome.
    What exactly does this patch do? To what degree does ruby work with
    pthreads now?

    Looking at the source to the patch, it looks like Ruby now acquires a
    lock every time it wants to switch threads. What impact does this have
    on performance?

    What is the purpose of the patch to signal.c that comes with the patch?
    It almost looks unrelated...

    Paul


    Paul Brannan Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139