394-614

199-435 subjects 633-867

[MemLeak] in file.c
0394 [m.rokos@sh c] no comments are needed...
0396 [matz@ru y- a] Thank you.
0401 [m.rokos@sh c] commited in CVS now.

CVS version and win32 naming
0395 [rich@in oe h] Having just checked out the latest from CVS, the version bumped to
0399 [matz@ru y- a] That's due to "clone" framework (how clone and dup are implemented) is
0400 [rich@in oe h] Thanks Matz,

[Opt] GC: Array marking
0410 [m.rokos@sh c] I hope that this could be more faster (by few calls), without
0429 [m.rokos@sh c] because no reply was posted, I hope it's OK to commit.

[CVS] Add rb_check_frozen into intern.h
0412 [m.rokos@sh c] ===================================================================

Should we check alloca ret val?
0413 [m.rokos@sh c] I went through ALLOCA_N use and it seems that the ret val of
0414 [nobu.nokada@] If alloca() were failed, it doesn't always return NULL.
+ 0415 [decoux@mo lo] See [ruby-talk:48890] alloca() failed with segfault
| 0416 [nobu.nokada@] I read it and posted [ruby-core:00414].  In this case, I guess
| 0417 [decoux@mo lo] and if someone use a *very big* regexp ? r_bytes2() is also used for
| 0419 [matz@ru y- a] I've just fixed this by removing allocate at all.
+ 0432 [kjana@dm la ] Yes, at least there are platforms clearly describing alloca()ing

New list: ruby-modules - for module developers...
0420 [sean@ch tt n] Howdy folks.  I've put together a new list for ruby developers at

Allocate crash loop hole.
0421 [chr_news@gm ] Ruby's current (admittedly pointless) ability to instantiate
0424 [chr_news@gm ] Never mind .. I run this script with in RDE and picked

Set.rb patch
0423 [chr_news@gm ] ...
0425 [matz@ru y- a] ...
0426 [knu@iD em ns] I'd appreciate your patch, but next time would you please separate
+ 0427 [knu@iD em ns] D'oh, I was confused.  I meant (a.hash == b.hash => a.eql?(b)) i.e.
| 0431 [chr_news@gm ] Boy, do I know this feeling;-)
+ 0430 [chr_news@gm ] Akinori MUSHA

[CVS] Fix rb_digest_base_become
0428 [m.rokos@sh c] I don't know what's the practice when I want commit something to
0433 [knu@iD em ns] peer review, and wait for at least three whole days (72h) for a
0434 [matz@ru y- a] I did.  All blame should be mine.  And yes, = should be ==.

[Bug] Just noticed... (irb)
0436 [m.rokos@sh c] does anybody tried to run 'irb'?

Re: [Bug] Just noticed... (irb) [Fixed]
0437 [m.rokos@sh c] Fixed by matz.
0438 [matz@ru y- a] In fact, it's done by our hero, Nobu again.  Yey.

[RFC] mkmf.rb: dependencies
0439 [m.rokos@sh c] I'd like to add to mkmf rule for generating dependencies.
0440 [nobu.nokada@] "depend" file is often used to contain other rules, test and so
0447 [m.rokos@sh c] It's not.

Patch to add a Module#const_missing method
0441 [JanArne.Pete] ...
+ 0442 [sean@ch tt n] This is some cool voodoo.  Could someone w/ src access commit this?
+ 0443 [matz@ru y- a] Thank you for the patch.  But we have to discuss whether we need this
| + 0445 [ndrsbngtssn@] Jan Arne has already implemented it in JRuby, where we needed to create
| | 0450 [matz@ru y- a] Understood.  How about more general aproach like "attr_missing" or
| | 0452 [Dave@Pr gm t] I wonder if there's any reasonable case where you'd want a single
| + 0446 [nobu.nokada@] Already we have autoload, and it can be considered a special
|   0448 [JanArne.Pete] The problem with autload is that you have to register the name of the
|   0493 [gotoken@no w] I thought this problem again last night.  Then I got believed that
|   0494 [matz@ru y- a] No (2), because M::M cannot be a method call.
+ 0474 [kosako@so ne] From Jan Arne Petersen <1031269845.4392.11.camel@janarne.petersen.net>

io_write()/fwrite() and EINTR on Solaris
0444 [jos@ca no k.] I am encountering a problem similar to the one mentioned here,
0453 [nobu.nokada@] Once I made a patch for non-blocking IO, which contained
0454 [matz@ru y- a] If Jos reports it does help, please commit the patch.
0469 [jos@ca no k.] Thank you gentlemen, I will test this patch and report back to you.
0479 [jos@ca no k.] I am happy to report that with this patch my script no longer dies with the
0492 [jos@ca no k.] Unfortunately I spoke too quickly :-( I don't quite understand yet why but my
0495 [nobu.nokada@] Have you asked Sun about this issue?
0496 [jos@ca no k.] Not yet, first I want to make sure that this is indeed the issue. I will try
0564 [jos@ca no k.] It turns out that this is a Solaris issue afaIct. See
+ 0565 [jos@ca no k.] My apologies for sending a bad patch. This is the correct one. Comments
+ 0566 [nobu.nokada@] Well, your patch makes thread switch impossible while writing
  0567 [jos@ca no k.] Yes; if the fwrite() blocks, no thread switch will be possible because the
  0568 [nobu.nokada@] Agree.
  0569 [jos@ca no k.] No, but you are right, post-incrementing p unconditionally is wrong here (if I
  0570 [nobu.nokada@] Perhaps, rb_io_fwrite()?
  0571 [jos@ca no k.] Agreed, that is a better name. The refactoring is definitely a good idea and
  0572 [nobu.nokada@] Whichever you like, safe_fwrite() version or fputc() one.  I'm
  0573 [jos@ca no k.] OK, to test if the fputc() version works reliably I will modify the
  0582 [jos@ca no k.] See below for a status update on this problem.

[Clenup, fixes] ruby.h, string.c
0449 [m.rokos@sh c] homework for you, heroic nobu and others... :-)
+ 0451 [m.rokos@sh c] just resending without my comments.
| 0456 [m.rokos@sh c] this version really works. (Sorry, I wanted to send it even if
+ 0455 [matz@ru y- a] OK.

[Fix] Dir mem leak
0457 [m.rokos@sh c] magic is allocated as well, but sometimes it's not freed.
0476 [nobu.nokada@] Unfortunately, it's not enough.
0478 [matz@ru y- a] I haven't noticed that.  How hard to work on non GC environment.
0480 [nobu.nokada@] I guessed other functions could raise, i.e. ALLOC_N(), so felt
0481 [matz@ru y- a] Hmm, I miss GC environment.  ;-)

[Fix] Ruby.h
0458 [m.rokos@sh c] this was in some other change set. It's better to offer it
0470 [matz@ru y- a] OK.

[Fix, NO alloca] Parse.y
0459 [m.rokos@sh c] there are some places where we don't need to use alloca.
+ 0471 [matz@ru y- a] Why do we have to avoid alloca?
| 0475 [m.rokos@sh c] ALLOCA macro just runs alloca. No NULL check is done (and I've
+ 0487 [m.rokos@sh c] I'm just wondering if somebody looked at the patch I sent. (I
  0490 [matz@ru y- a] Surprisingly, there's no differnce.  rb_intern() registers "="
  0491 [m.rokos@sh c] Thanks for hint. Now it's clear.

[Memleak] in sprintf.c
0460 [m.rokos@sh c] problem is that buf is sometimes not freed.
0466 [nobu.nokada@] It may be better to add rb_gc_force_recycle(result) at places
0467 [m.rokos@sh c] Yes, in this case String approach is better.

[RFC] Related to [Memleak] in sprintf.c
0461 [m.rokos@sh c] sometimes we cannot use ALLOCA and we have to use ALLOC. When
0462 [decoux@mo lo] Well, probably I'm tired but
+ 0463 [m.rokos@sh c] Not really.
+ 0464 [decoux@mo lo] Yes, I've said a stupidity
  0465 [m.rokos@sh c] No problemo :-)

Re: [Cleanup, fixes] string.c
0468 [m.rokos@sh c] based on matz's recomendations I made new version.
0477 [matz@ru y- a] I meant discarding a flag, not your modification.
0482 [m.rokos@sh c] I don't want to waste your time with reworking my patches, so I

missing/vsnprintf.c: printf("%+f", -0.0)
0472 [gotoken@no w] ...
0473 [matz@ru y- a] Even when missing/vsnprintf.c is used, FLOATING_POINT is *not* defined

[Add-to-fix] String.c
0483 [m.rokos@sh c] matz, thanks for reworking my patch. I'm really sad that you've
0484 [matz@ru y- a] Not at all.  It's my joy to hack the code.  I just envied you.
0485 [m.rokos@sh c] -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
0486 [matz@ru y- a] Thank you, as always.

[Reorder] struct timeval diversion
0488 [m.rokos@sh c] because struct timeval is not defined on some platforms, it has
0489 [matz@ru y- a] OK.  Commit them, please.

[-Wall+fix?] parse.y
0497 [m.rokos@sh c] after 2 weeks I tried to compile with -Wall and found some
0498 [nobu.nokada@] I commited almost same modification just now.
0499 [m.rokos@sh c] I know - I just checked out the CVS.
0500 [nobu.nokada@] In fact, I'd noticed it and modified locally.  And I saw your
0501 [m.rokos@sh c] No - not many.

[Cleanup] Curses
0502 [m.rokos@sh c] in this cleanup: reformated #ifdefs, fixes macros, omit ; after
0504 [matz@ru y- a] Seems OK.  Commit them please.

[Cleanup] GDBM
0503 [m.rokos@sh c] leak.
+ 0505 [matz@ru y- a] Seems OK.  Commit them.  And thank you as always.
| 0506 [m.rokos@sh c] Commited all.
+ 0507 [chr_news@gm ] Talking about gdbm. For the mswin32 platform (I never

can java applications invoke ruby scripts??
0508 [javaccnews@h] I want to know if Java applications can invoke ruby scripts?? In other
+ 0509 [nobu.nokada@] Yes for former, No for latter.
| 0511 [javaccnews@h] I just downloaded jruby and looked at the samples, but I couldn't see
| + 0512 [nobu.nokada@] Can you run "jruby" from the command line?
| + 0513 [ndrsbngtssn@] If you just need to invoke Ruby scripts, with little or no exchange of
|   0556 [javaccnews@h] I have trouble to invoke Ruby scripts in Java applications
+ 0510 [knu@iD em ns] help them with that.

Class? Hm?
0514 [m.rokos@sh c] ===================================================================
0515 [matz@ru y- a] matz.

Wrtite barrier
0516 [torsten.rueg] Moi,
0517 [matz@ru y- a] Without recompiling the interpreter?  No.
0518 [torsten.rueg] Moi

Suprise
0519 [torsten.rueg] Moi,
+ 0520 [matz@ru y- a] Yes. "something" is wrong.  But I can't say any further without seeing
+ 0521 [torsten.rueg] Further investigating . . .  I take it all back.

Id question
0522 [torsten.rueg] Moi,
0523 [matz@ru y- a] Yes for Symbols, Boolean values (true, false), and Fixnums.  Strings
0524 [torsten.rueg] Moi
0525 [matz@ru y- a] rb_define_attr() just defines access methods ("name" and "name="), so

Segfault
0526 [chr_news@gm ] The following script segfaults with
0527 [chr_news@gm ] Forgot to say it also crashes with the test program

Weak references
0528 [torsten.rueg] Moi,
0529 [matz@ru y- a] How about using weakref.rb?
0530 [torsten.rueg] How embarrassing, I didn't know or look.

Re: Segfault ( (Simpler Example)
0531 [chr_news@gm ] The following simpler script crashes in the
0532 [nobu.nokada@] I could reproduce on i686-linux too.
0533 [matz@ru y- a] Oops, thank you.  Commit the fix please.

Hash suprise
0534 [torsten.rueg] Moi
0535 [matz@ru y- a] 1. You shouldn't modify hash key in place.

SEVG in bignum.c:505...
0536 [sean@ru y- a] $ ruby -e 'p [].to_s.strip.to_i'
0538 [sean@ru y- a] FWIW, I'm not sure that I have the right fix because to_f has the same
0540 [m.rokos@sh c] your patch was OK, but incomplete. This could help with the
0542 [sean@ru y- a] I'm sure there are other places where this could be applied to as
0543 [m.rokos@sh c] Of course, there could be many places with bug like this. I just

darwin shared library patch
0537 [eric@Fr eB D] In Darwin, the preferred way to build shared libraries is with two level
0539 [knu@iD em ns] The patch seems to make ENV[]= coredump.
0544 [eric@Fr eB D] I can't reproduce this on darwin 6.1. I'm also using ruby 1.6.7 but I don't
+ 0545 [belanglu@ir ] I can't reproduce it neither, I don't have a Darwin version lower than
+ 0546 [knu@iD em ns] I don't have the time at the moment but I'll investigate this later
  0547 [knu@iD em ns] OK, I figured it out.  Ruby coredumped where environ is dereferenced
  0550 [eric@Fr eB D] I see; sorry if I led you down the wrong path. Feel free to tune my patch
  0554 [knu@iD em ns] No worries.  Your patches have been slightly modified and then applied
  0559 [eric@Fr eB D] Looks great, thanks for the attention! I'll be sure to send any future

Patch for MacOS X dln.c
0541 [belanglu@ir ] ...
0548 [knu@iD em ns] [gah, I sent this to the wrong address... resending]
0553 [knu@iD em ns] [Forwarding to the list]
0555 [knu@iD em ns] The patch has been committed to both 1.7 and 1.6.  Comment part was

Re: Patch for MacOS X dln.c [off-topic]
0549 [knu@iD em ns] By the way, I wonder why this mail got successfully delivered via the
0551 [matz@ru y- a] As
0552 [belanglu@ir ] I'll explain! That's mine :-)

JRuby (was: Re: can java applications invoke ruby scripts??)
0557 [ndrsbngtssn@] Didn't work *how*?

Report: gcc-3.2.1-0pre3, libv6-2.3.1-1
0558 [m.rokos@sh c] It's simple: All I want to say is: It's workin'.

[PATCH] nodeDump 0.1.7
0560 [nobu.nokada@] Since Dave is absent, post here.
0562 [Dave@Pr gm t] Many thanks: I've applied the patch.

Win32
0561 [robert.calco] I'd like to know where to find the latest patches to Ruby that optimize

strscan, mkmf and MacOS X
0563 [raymond@pa d] I have been debugging a problem trying to install strscan on MacOS

doc/NEWS maintainer wanted
0574 [knu@iD em ns] As you might see, the doc/NEWS file has been quite stale and far from

warning messages in 1.7.3
0575 [rich@in oe h] Is is possible to only print the first occurance of a warning of a
0576 [nobu.nokada@] Not impossible, but I'm not sure it's desirable.

partition_by
0577 [flori@ni e. ] (0..9).partition_by { |x| x % 3 }
0578 [ndrsbngtssn@] We have a method just like that in JRuby, which we use a lot internally.
0579 [matz@ru y- a] I prefer "group_by" to "partition_by".  Could it be just "group",
+ 0580 [knu@iD em ns] group is also a very common noun and I'm afraid it might clash with
+ 0581 [flori@ni e. ] "group" or "group_by" is perhaps a better name, because it is shorter. I
  0583 [gnhurst@hu s] This naming issue came up before (cf. http://ruby-talk.com/13548 ).

win32 popen3
0584 [rich@in oe h] static struct ChildRecord * CreateChild(char *cmd, SECURITY_ATTRIBUTES
0585 [nobu.nokada@] Yes, it's intended but not implemented yet.

irb aborts in 1.7.3 on Solaris
0586 [jim@fr ez .o] I did not get an answer to this before, so I'll post again.
+ 0587 [nobu.nokada@] irb shouldn't use nkf.
| + 0588 [Michael.Garr] I'm also having trouble getting irb to work on Solaris.  My problem appears
| | 0590 [decoux@mo lo] I've no problem
| | 0591 [Michael.Garr] okay, now I can't build ext/readline.  I recently upgraded readline to 4.3.
| | 0592 [decoux@mo lo] nasun% grep VERSION /usr/local/include/readline/*
| | 0593 [Michael.Garr] Nevermind.  I solved that problem.  Don't ask :)  doing a make install right
| | 0597 [jim@fr ez .o] I posted a backtrace, but no comments so far.
| + 0594 [jim@fr ez .o] Sorry, not much of an extension debugger.
|   0595 [nobu.nokada@] Do you have gdb?
+ 0589 [decoux@mo lo] You have a strange configuration
  0596 [jim@fr ez .o] Ok, I just built ruby-1.6.7 and ruby-1.7.3 on the same

irb Abort on Solaris Backtrace
0598 [jim@fr ez .o] Me again, with the silly Solaris problme on 1.7.3.
0599 [decoux@mo lo] Do it crash with other extensions, like socket ?
0600 [jim@fr ez .o] Yes. On both 1.6.7 and 1.7.3 for my local builds.
+ 0601 [Michael.Garr] I tried: `ruby -r socket -e 0` and got no error.  I would really like to
| + 0604 [jim@fr ez .o] uname -a
| | 0607 [decoux@mo lo] What give
| | 0608 [jim@fr ez .o] ldd ./lib/ruby/1.7/sparc-solaris2.8/socket.so
| + 0605 [jim@fr ez .o] I found readline. It does not want to build anything.
+ 0602 [matz@ru y- a] How do you build your ruby.  I suspect the C++ compiler configuration.
  0603 [jim@fr ez .o] Got the sources from cvs.
  0606 [matz@ru y- a] Could you show us output from these operations?
  0609 [jim@fr ez .o] jfn@juno 2 /home/jfn/ruby-1.7.3/ruby > autoconf
  + 0610 [decoux@mo lo] Try to change this.
  | 0612 [jim@fr ez .o] I got it to work by static linking.
  + 0611 [matz@ru y- a] I'm afraid your linker (GNU ld) is not capable to create dynamic
    0613 [jim@fr ez .o] Thanks much for your help. I just figured out that the default
    0614 [jim@fr ez .o] After looking into this issue more, it appears that ld is used
threads.html
top