From: matz@... (Yukihiro Matsumoto) Date: 2001-08-30T03:08:59+09:00 Subject: [ruby-talk:20548] Re: (1) ASCII Code, (2) ()-operator Hi, In message "[ruby-talk:20539] (1) ASCII Code, (2) ()-operator" on 01/08/30, "Schaefer, F." writes: |I've two questions to ask: | |1) how do I compare an integer against let's say '\n' or ' ' | | something like | | if value == ' ' or value == '\t' or value == '\n' | | I can do it for 'a' by saying ?a ... but how about special | characters and whitespace ? ?\s for space ?\t for tab ?\n for newline |2) The function and subscription operators: how can I overload | them. I'm using ruby 1.6.2. Am I out of date ? Sorry, you can't. Proc and Method imitate it by call or []. class Function def call(*args) ... end def [](*args) ... end end f = Function::new f.call(1,2,3) f[1,2,3] matz.