This doesn’t look right…
vor-lord:scan_plan/scan_plan> ruby -e ‘def next(); end; next()’
-e:1: [BUG] Segmentation fault
ruby 1.8.0 (2003-08-04) [i386-linux]
Aborted
I thought I could create a method with a name that matched a reserved word
as long as I was careful how it was called (like Object#class). At the
least I would’ve expected that I would get an error telling me not to
define a method called “next”. But a segmentation fault seems to be the
wrong result no matter what…
It crashes on HPUX also, however on my old 1.7.3 version it gives me the
unexpected next error.
···
–
---------------------------------------------- | --------------------------
Brett Williams | (970) 288-0475
Actually:
rpav@central:~% ruby -e ‘next()’
-e:1: [BUG] Segmentation fault
ruby 1.8.0 (2003-08-04) [i686-linux]
Weird.
···
On Wed, 29 Oct 2003 08:31:32 +0900 “Brett H. Williams” brett_williams@agilent.com wrote:
This doesn’t look right…
vor-lord:scan_plan/scan_plan> ruby -e ‘def next(); end; next()’
-e:1: [BUG] Segmentation fault
ruby 1.8.0 (2003-08-04) [i386-linux]
–
Ryan Pavlik rpav@mephle.com
“Maybe it’s the unfocused, blind, murderous rage.” - 8BT
Hi,
This doesn’t look right…
vor-lord:scan_plan/scan_plan> ruby -e ‘def next(); end; next()’
-e:1: [BUG] Segmentation fault
ruby 1.8.0 (2003-08-04) [i386-linux]
Aborted
This patch should work. Thank you.
matz.
diff -p -u -1 -r1.298 -r1.299
— parse.y 28 Oct 2003 02:27:02 -0000 1.298
+++ parse.y 29 Oct 2003 02:30:05 -0000 1.299
@@ -5368,3 +5368,3 @@ ret_args(node)
}
- if (nd_type(node) == NODE_SPLAT) {
- if (node && nd_type(node) == NODE_SPLAT) {
node = NEW_SVALUE(node);
···
In message “Crash in ruby 1.8.0” on 03/10/29, “Brett H. Williams” brett_williams@agilent.com writes:
It crashes on break() and return() too.
–=20
Zachary P. Landau kapheine@hypa.net
GPG: gpg --recv-key 0x24E5AD99 | http://kapheine.hypa.net/kapheine.asc
···
On Wed, Oct 29, 2003 at 08:50:02AM +0900, Ryan Pavlik wrote:
On Wed, 29 Oct 2003 08:31:32 +0900 > “Brett H. Williams” brett_williams@agilent.com wrote:
=20
This doesn’t look right…
=20
vor-lord:scan_plan/scan_plan> ruby -e ‘def next(); end; next()’
-e:1: [BUG] Segmentation fault
ruby 1.8.0 (2003-08-04) [i386-linux]
=20
Actually:
=20
rpav@central:~% ruby -e ‘next()’=20
-e:1: [BUG] Segmentation fault
ruby 1.8.0 (2003-08-04) [i686-linux]
Hi all,
I’m pretty new to Ruby, and I came across the Ruby bindings
(http://pablotron.org/software/mb-ruby/) to the musicbrainz project
(musicbrainz.org).
I’d like to use Ruby to generate acoustic fingerprints when fed an MP3
file. Reading over the API, I see this method that looks like it will
do what I want:
/*
- Pass raw PCM data to generate a signature.
···
-
- Note: MusicBrainz::TRM#pcm_data must be called before this
function.
-
- Returns true if enough data has been sent to generate a signature,
- and false if more data is needed.
-
- Example:
- trm.generate_signature buf, BUFSIZ
-
*/
static VALUE mb_trm_gen_sig(VALUE self, VALUE buf) {
However, I’m not sure how I’d go about passing raw PCM data to Ruby.
Any suggestions? I posted this on comp.lang.ruby too (although it
hasn’t shown up yet), I hope no one’s offended about the double post if
you frequent both places.
Thanks alot!
In article 20031029005857.GA7569@localhost,
“Zachary P. Landau” kapheine@hypa.net writes:
It crashes on break() and return() too.
% ./ruby -e ‘() and 1’
-e:1: [BUG] Segmentation fault
ruby 1.8.1 (2003-10-28) [i686-linux]
% ./ruby -e ‘() or 1’
-e:1: [BUG] Segmentation fault
ruby 1.8.1 (2003-10-28) [i686-linux]
% ./ruby -e ‘() && 1’
-e:1: [BUG] Segmentation fault
ruby 1.8.1 (2003-10-28) [i686-linux]
% ./ruby -e ‘() || 1’
-e:1: [BUG] Segmentation fault
ruby 1.8.1 (2003-10-28) [i686-linux]
% ./ruby -e ‘case 1 when (); end’
-e:1: [BUG] Segmentation fault
ruby 1.8.1 (2003-10-28) [i686-linux]
···
–
Tanaka Akira