[#13161] hacking on the "heap" implementation in gc.c — Lloyd Hilaiel <lloyd@...>

Hi all,

16 messages 2007/11/01

[#13182] Thinking of dropping YAML from 1.8 — Urabe Shyouhei <shyouhei@...>

Hello all.

14 messages 2007/11/03

[#13315] primary encoding and source encoding — David Flanagan <david@...>

I've got a couple of questions about the handling of primary encoding.

29 messages 2007/11/08
[#13331] Re: primary encoding and source encoding — Yukihiro Matsumoto <matz@...> 2007/11/09

Hi,

[#13368] method names in 1.9 — "David A. Black" <dblack@...>

Hi --

61 messages 2007/11/10
[#13369] Re: method names in 1.9 — Yukihiro Matsumoto <matz@...> 2007/11/10

Hi,

[#13388] Re: method names in 1.9 — Charles Oliver Nutter <charles.nutter@...> 2007/11/11

Yukihiro Matsumoto wrote:

[#13403] Re: method names in 1.9 — "Austin Ziegler" <halostatue@...> 2007/11/11

On 11/11/07, Charles Oliver Nutter <charles.nutter@sun.com> wrote:

[#13410] Re: method names in 1.9 — David Flanagan <david@...> 2007/11/11

Austin Ziegler wrote:

[#13413] Re: method names in 1.9 — Charles Oliver Nutter <charles.nutter@...> 2007/11/11

David Flanagan wrote:

[#13423] Re: method names in 1.9 — Jordi <mumismo@...> 2007/11/12

Summing it up:

[#13386] Re: method names in 1.9 — Trans <transfire@...> 2007/11/11

[#13391] Re: method names in 1.9 — Matthew Boeh <mboeh@...> 2007/11/11

On Sun, Nov 11, 2007 at 05:50:18PM +0900, Trans wrote:

[#13457] mingw rename — "Roger Pack" <rogerpack2005@...>

Currently for different windows' builds, the names for RUBY_PLATFORM

13 messages 2007/11/13

[#13485] Proposal: Array#walker — Wolfgang Nádasi-Donner <ed.odanow@...>

Good morning all together!

23 messages 2007/11/14
[#13486] Re: Proposal: Array#walker — Wolfgang Nádasi-Donner <ed.odanow@...> 2007/11/14

A nicer version may be...

[#13488] Re: Proposal: Array#walker — Trans <transfire@...> 2007/11/14

[#13495] Re: Proposal: Array#walker — Trans <transfire@...> 2007/11/14

[#13498] state of threads in 1.9 — Jordi <mumismo@...>

Are Threads mapped to threads on the underlying operating system in

30 messages 2007/11/14
[#13519] Re: state of threads in 1.9 — "Bill Kelly" <billk@...> 2007/11/14

[#13526] Re: state of threads in 1.9 — Eric Hodel <drbrain@...7.net> 2007/11/14

On Nov 14, 2007, at 11:18 , Bill Kelly wrote:

[#13528] test/unit and miniunit — Ryan Davis <ryand-ruby@...>

When is the 1.9 freeze?

17 messages 2007/11/14

[#13564] Thoughts about Array#compact!, Array#flatten!, Array#reject!, String#strip!, String#capitalize!, String#gsub!, etc. — Wolfgang Nádasi-Donner <ed.odanow@...>

Good evening all together!

53 messages 2007/11/15
[#13575] Re: Thoughts about Array#compact!, Array#flatten!, Array#reject!, String#strip!, String#capitalize!, String#gsub!, etc. — "Nikolai Weibull" <now@...> 2007/11/15

On Nov 15, 2007 8:14 PM, Wolfgang N=E1dasi-Donner <ed.odanow@wonado.de> wro=

[#13578] Re: Thoughts about Array#compact!, Array#flatten!, Array#reject!, String#strip!, String#capitalize!, String#gsub!, etc. — Michael Neumann <mneumann@...> 2007/11/16

Nikolai Weibull schrieb:

[#13598] wondering about #tap (was: Re: Thoughts about Array#compact!, Array#flatten!, Array#reject!, String#strip!, String#capitalize!, String#gsub!, etc.) — "David A. Black" <dblack@...> 2007/11/16

Hi --

[#13605] Re: wondering about #tap (was: Re: Thoughts about Array#compact!, Array#flatten!, Array#reject!, String#strip!, String#capitalize!, String#gsub!, etc.) — Trans <transfire@...> 2007/11/16

[#13612] Re: wondering about #tap (was: Re: Thoughts about Array#compact!, Array#flatten!, Array#reject!, String#strip!, String#capitalize!, String#gsub!, etc.) — "David A. Black" <dblack@...> 2007/11/16

Hi --

[#13624] Re: wondering about #tap (was: Re: Thoughts about Array#compact!, Array#flatten!, Array#reject!, String#strip!, String#capitalize!, String#gsub!, etc.) — "Nikolai Weibull" <now@...> 2007/11/16

On Nov 16, 2007 12:40 PM, David A. Black <dblack@rubypal.com> wrote:

[#13632] Re: wondering about #tap — David Flanagan <david@...> 2007/11/16

David A. Black wrote:

[#13634] Re: wondering about #tap — "David A. Black" <dblack@...> 2007/11/16

Hi --

[#13636] Re: wondering about #tap — "Rick DeNatale" <rick.denatale@...> 2007/11/16

On Nov 16, 2007 12:40 PM, David A. Black <dblack@rubypal.com> wrote:

[#13637] Re: wondering about #tap — murphy <murphy@...> 2007/11/16

Rick DeNatale wrote:

[#13640] Re: wondering about #tap — Wolfgang Nádasi-Donner <ed.odanow@...> 2007/11/16

murphy schrieb:

[#13614] Suggestion for native thread tests — "Eust痃uio Rangel" <eustaquiorangel@...>

Hi!

12 messages 2007/11/16

[#13685] Problems with \M-x in utf-8 encoded strings — Wolfgang Nádasi-Donner <ed.odanow@...>

Hi!

11 messages 2007/11/18

[#13741] retry semantics changed — Dave Thomas <dave@...>

In 1.8, I could write:

46 messages 2007/11/23
[#13742] Re: retry semantics changed — "Brian Mitchell" <binary42@...> 2007/11/23

On Nov 23, 2007 12:06 PM, Dave Thomas <dave@pragprog.com> wrote:

[#13743] Re: retry semantics changed — Dave Thomas <dave@...> 2007/11/23

[#13746] Re: retry semantics changed — Yukihiro Matsumoto <matz@...> 2007/11/23

Hi,

[#13747] Re: retry semantics changed — Dave Thomas <dave@...> 2007/11/23

[#13748] Re: retry semantics changed — Yukihiro Matsumoto <matz@...> 2007/11/23

Hi,

[#13749] Re: retry semantics changed — Dave Thomas <dave@...> 2007/11/23

Re: method names in 1.9

From: Matthew Boeh <mboeh@...>
Date: 2007-11-12 04:24:32 UTC
List: ruby-core #13426
On Mon, Nov 12, 2007 at 11:00:55AM +0900, Jordi wrote:
> Summing it up:
>=20
> - Surprising or not, sending messages is not the same that calling
> methods in Ruby (there is  a real difference, see method_missing email
> of Matthew in this thread).
> - Honoring visibility is not the same that don't honoring it (obviously)
>=20
> So, we can have potentially 4 operations in Ruby 1.8.x:
>=20
> 1.- Call method honoring visibility
> 2.- Call method not honoring visibility
> 3.- Send message honoring visibility
> 4.- Send message not honoring visibility
>=20
> In Ruby 1.8.x ,  1 is implemented with "." and 4 is implemented with
> "send". AFAIK, 2 and 3 are not implemented.
> IMHO they don't need to!
> The difference between sending a message and calling a method is so
> subtle (in real Ruby implemented world) that most of the times can be
> used like the honoring/not honoring pair of the same operation.
>=20
> My personal opinion is make "." behave like "send" respect to
> method_missing. In other words, move "." from 1 to 3. Then kill the
> "call method" concept in Ruby. As I think that concept __is not
> intended to exist__ in the language anyway.
>=20
> Also I'd rename "send" for something more like "respond" as the object
> is not sending but receiving, but that is much more of a personal
> taste. :P
>=20
> --
> Jordi
>=20

I'm not sure I follow you here. It seems to me that the 'dot' is #3; in fac=
t,=20
it's the only real way to send a message that will fall back to method_miss=
ing=20
AND honor visibility. Here's the example:

  class Z
   public
    def pub() 'pub' end=20
   protected=20
    def prot() 'prot' end=20
   private
    def priv() 'priv' end
    def method_missing(msg, *args); "method_missing: #{msg}"; end
  end

  # PUBLIC METHODS
  test.pub
  # =3D=3D> "pub"
  test.send(:pub)
  # =3D=3D> "pub"
  test.method(:pub).call
  # =3D=3D> "pub"

  # PROTECTED METHODS
  test.prot
  # =3D=3D> "method_missing: prot"
  test.send(:prot)
  # =3D=3D> "prot"
  test.method(:prot).call
  # =3D=3D> "prot"

  # PRIVATE METHODS
  test.priv
  # =3D=3D> "method_missing: priv"
  test.send(:priv)
  # =3D=3D> "priv"
  test.method(:priv).call
  # =3D=3D> "priv"

  # METHODS THAT DON'T EXIST
  test.doesnt_exist
  # =3D=3D> "method_missing: doesnt_exist"
  test.send(:doesnt_exist)
  # =3D=3D> "method_missing: doesnt_exist"
  test.method(:doesnt_exist).call
  #! #<NameError: (eval):1:in `method': undefined method `doesnt_exist' for=
 class `Z'>

--
Matthew Boeh

Attachments (2)

ruby-messages.rb (752 Bytes, text/x-ruby)
class Z
 public
  def pub() 'pub' end
 protected
  def prot() 'prot' end
 private
  def priv() 'priv' end
  def method_missing(msg, *args); "method_missing: #{msg}"; end
end
def try_out(test, expr)
  begin
    puts expr
    puts "# ==> #{eval(expr).inspect}"
  rescue => e
    puts "#! #{e.inspect}"
  end
end
test = Z.new
try_out(test, "test.pub")
try_out(test, "test.send(:pub)")
try_out(test, "test.method(:pub).call")
try_out(test, "test.prot")
try_out(test, "test.send(:prot)")
try_out(test, "test.method(:prot).call")
try_out(test, "test.priv")
try_out(test, "test.send(:priv)")
try_out(test, "test.method(:priv).call")
try_out(test, "test.doesnt_exist")
try_out(test, "test.send(:doesnt_exist)")
try_out(test, "test.method(:doesnt_exist).call")
signature.asc (189 Bytes, application/pgp-signature)

In This Thread