[MacRuby-devel] Time.new.utc.round ?

2012-05-29 Thread Milos & Slavica
Hi, 

Is this a known issue?

>> Time.new.utc.round
NoMethodError: undefined method `round' for 2012-05-29 10:00:00 UTC:Time

Cheers!
milos
___
MacRuby-devel mailing list
[email protected]
http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel


Re: [MacRuby-devel] Time.new.utc.round ?

2012-05-29 Thread Peter W A Wood
Hi

On 29 May 2012, at 18:04, Milos & Slavica wrote:

> Hi, 
> 
> Is this a known issue?
> 
> >> Time.new.utc.round
> NoMethodError: undefined method `round' for 2012-05-29 10:00:00 UTC:Time

Ruby 1.8.7 displays the same behaviour :

home$ irb
>> Time.new.utc.round
NoMethodError: undefined method `round' for Tue May 29 10:54:04 UTC 2012:Time
from (irb):1

Regards

Peter
___
MacRuby-devel mailing list
[email protected]
http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel


Re: [MacRuby-devel] Time.new.utc.round ?

2012-05-29 Thread Robert Schaaf
Hi,

But 1.9.3 doesn't:

Traveler:~ rwschaaf$ rvm use 1.9.3
Using /Users/rwschaaf/.rvm/gems/ruby-1.9.3-p125
Traveler:~ rwschaaf$ irb
1.9.3p125 :001 > Time.new.utc.round
 => 2012-05-29 11:01:22 UTC 

Bob Schaaf

On May 29, 2012, at 6:56 AM, Peter W A Wood wrote:

> Hi
> 
> On 29 May 2012, at 18:04, Milos & Slavica wrote:
> 
>> Hi, 
>> 
>> Is this a known issue?
>> 
>> >> Time.new.utc.round
>> NoMethodError: undefined method `round' for 2012-05-29 10:00:00 UTC:Time
> 
> Ruby 1.8.7 displays the same behaviour :
> 
> home$ irb
> >> Time.new.utc.round
> NoMethodError: undefined method `round' for Tue May 29 10:54:04 UTC 2012:Time
>   from (irb):1
> 
> Regards
> 
> Peter
> ___
> MacRuby-devel mailing list
> [email protected]
> http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel

___
MacRuby-devel mailing list
[email protected]
http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel


Re: [MacRuby-devel] Time.new.utc.round ?

2012-05-29 Thread Milos & Slavica
Hi Peter,

Of course, MacRuby’s ruby 1.9.2 has

http://www.ruby-doc.org/core-1.9.2/Time.html#method-i-round

odd…

Of course, when comparing one can still do something like:

(t1 - t2).to_i <=> 0

or use NSDate#timeIntervalSince

still odd, though

milos

On 29 May 2012, at 12:56, Peter W A Wood wrote:

> Hi
> 
> On 29 May 2012, at 18:04, Milos & Slavica wrote:
> 
>> Hi, 
>> 
>> Is this a known issue?
>> 
>> >> Time.new.utc.round
>> NoMethodError: undefined method `round' for 2012-05-29 10:00:00 UTC:Time
> 
> Ruby 1.8.7 displays the same behaviour :
> 
> home$ irb
> >> Time.new.utc.round
> NoMethodError: undefined method `round' for Tue May 29 10:54:04 UTC 2012:Time
>   from (irb):1
> 
> Regards
> 
> Peter
> ___
> MacRuby-devel mailing list
> [email protected]
> http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel

___
MacRuby-devel mailing list
[email protected]
http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel


[MacRuby-devel] Compile command line app

2012-05-29 Thread Enrico Pilotto
Hi, there is a way to create a command line tool with XCode using macruby?

I've a little program that run with 'macruby main.rb', but now i want
create an executable file... There is a way to compile the macruby source?

Thanks, Enrico.





signature.asc
Description: OpenPGP digital signature
___
MacRuby-devel mailing list
[email protected]
http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel


Re: [MacRuby-devel] Compile command line app

2012-05-29 Thread Francis Chong
You can compile any ruby file with macrubyc. For anything more complex you 
probably want to check macruby_deploy.

There is an old post at: 
http://macruby.macosforge.org/blog/2009/11/17/macruby05b2.html which should 
still valid.



--  
Francis Chong
Ignition Soft


On 2012年5月29日Tuesday at 下午7:36, Enrico Pilotto wrote:

> Hi, there is a way to create a command line tool with XCode using macruby?
>  
> I've a little program that run with 'macruby main.rb', but now i want
> create an executable file... There is a way to compile the macruby source?
>  
> Thanks, Enrico.
> ___
> MacRuby-devel mailing list
> [email protected] (mailto:[email protected])
> http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel
>  
>  


___
MacRuby-devel mailing list
[email protected]
http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel


Re: [MacRuby-devel] Time.new.utc.round ?

2012-05-29 Thread Peter W A Wood
Hi Milos and Robert

Thanks for letting me know. I'm still stuck on 1.8.7, you guys are way ahead of 
me.

Regards

Peter


On 29 May 2012, at 19:04, Milos & Slavica wrote:

> Hi Peter,
> 
> Of course, MacRuby’s ruby 1.9.2 has
> 
> http://www.ruby-doc.org/core-1.9.2/Time.html#method-i-round
> 
> odd…
> 
> Of course, when comparing one can still do something like:
> 
> (t1 - t2).to_i <=> 0
> 
> or use NSDate#timeIntervalSince
> 
> still odd, though
> 
> milos
> 
> On 29 May 2012, at 12:56, Peter W A Wood wrote:
> 
>> Hi
>> 
>> On 29 May 2012, at 18:04, Milos & Slavica wrote:
>> 
>>> Hi, 
>>> 
>>> Is this a known issue?
>>> 
>>> >> Time.new.utc.round
>>> NoMethodError: undefined method `round' for 2012-05-29 10:00:00 UTC:Time
>> 
>> Ruby 1.8.7 displays the same behaviour :
>> 
>> home$ irb
>> >> Time.new.utc.round
>> NoMethodError: undefined method `round' for Tue May 29 10:54:04 UTC 2012:Time
>>  from (irb):1
>> 
>> Regards
>> 
>> Peter
>> ___
>> MacRuby-devel mailing list
>> [email protected]
>> http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel
> 
> ___
> MacRuby-devel mailing list
> [email protected]
> http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel

___
MacRuby-devel mailing list
[email protected]
http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel


Re: [MacRuby-devel] Compile command line app

2012-05-29 Thread Enrico Pilotto
Oh good!
But now i've another problem:
if I have only one file all work (macrubyc myfile.rb)
but if I have 2 files where 1 file require the other, I dont know how to
compile the 2 files...
Ive try

macrubyc -c file1.rb -o file1.o
macrubyc -c file2.rb -o file2.o
macrubyc file1.o file2.o -o exec

Now when I run the ./exec i have the error: no such file to load --
(LoadError)

There is a way?

Il 29/05/12 14:14, Francis Chong ha scritto:
> You can compile any ruby file with macrubyc. For anything more complex
> you probably want to check macruby_deploy.
> 
> There is an old post at:
> http://macruby.macosforge.org/blog/2009/11/17/macruby05b2.html which
> should still valid.
> 
> 
> 
> -- 
> Francis Chong
> Ignition Soft
> 
> On 2012年5月29日Tuesday at 下午7:36, Enrico Pilotto wrote:
> 
>> Hi, there is a way to create a command line tool with XCode using macruby?
>>
>> I've a little program that run with 'macruby main.rb', but now i want
>> create an executable file... There is a way to compile the macruby source?
>>
>> Thanks, Enrico.



signature.asc
Description: OpenPGP digital signature
___
MacRuby-devel mailing list
[email protected]
http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel


Re: [MacRuby-devel] Compile command line app

2012-05-29 Thread Matt Aimonetti
from the man file:

   When building an executable, the very first file passed to macrubyc will
be considered as the main file. Its machine code will be run once the
executable starts. Other
 machine code files will be linked into the executable, but only run
upon calls to the require method.

   $ echo "def t1; 21; end" > t1.rb
   $ echo "def t2; 21; end" > t2.rb
   $ echo "require 't1'; require 't2'; p t1+t2" > test.rb
   $ macrubyc test.rb t1.rb t2.rb -o test
   $ ./test


- Matt

On Tue, May 29, 2012 at 5:45 PM, Enrico Pilotto  wrote:

> Oh good!
> But now i've another problem:
> if I have only one file all work (macrubyc myfile.rb)
> but if I have 2 files where 1 file require the other, I dont know how to
> compile the 2 files...
> Ive try
>
> macrubyc -c file1.rb -o file1.o
> macrubyc -c file2.rb -o file2.o
> macrubyc file1.o file2.o -o exec
>
> Now when I run the ./exec i have the error: no such file to load --
> (LoadError)
>
> There is a way?
>
> Il 29/05/12 14:14, Francis Chong ha scritto:
> > You can compile any ruby file with macrubyc. For anything more complex
> > you probably want to check macruby_deploy.
> >
> > There is an old post at:
> > http://macruby.macosforge.org/blog/2009/11/17/macruby05b2.html which
> > should still valid.
> >
> >
> >
> > --
> > Francis Chong
> > Ignition Soft
> >
> > On 2012年5月29日Tuesday at 下午7:36, Enrico Pilotto wrote:
> >
> >> Hi, there is a way to create a command line tool with XCode using
> macruby?
> >>
> >> I've a little program that run with 'macruby main.rb', but now i want
> >> create an executable file... There is a way to compile the macruby
> source?
> >>
> >> Thanks, Enrico.
>
>
> ___
> MacRuby-devel mailing list
> [email protected]
> http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel
>
>
___
MacRuby-devel mailing list
[email protected]
http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel


Re: [MacRuby-devel] Time.new.utc.round ?

2012-05-29 Thread Joshua Ballanco
Yes, this seems like a bug. Would you mind filing an issue on the Github issue 
tracker? 


On Tuesday, May 29, 2012 at 2:03 PM, Robert Schaaf wrote:

> Hi,
> 
> But 1.9.3 doesn't:
> 
> Traveler:~ rwschaaf$ rvm use 1.9.3
> Using /Users/rwschaaf/.rvm/gems/ruby-1.9.3-p125
> Traveler:~ rwschaaf$ irb
> 1.9.3p125 :001 > Time.new.utc.round
>  => 2012-05-29 11:01:22 UTC 
> 
> Bob Schaaf
> 
> On May 29, 2012, at 6:56 AM, Peter W A Wood wrote:
> > Hi
> > 
> > On 29 May 2012, at 18:04, Milos & Slavica wrote:
> > > Hi, 
> > > 
> > > Is this a known issue?
> > > 
> > > >> Time.new.utc.round
> > > NoMethodError: undefined method `round' for 2012-05-29 10:00:00 UTC:Time
> > > 
> > 
> > 
> > Ruby 1.8.7 displays the same behaviour :
> > 
> > home$ irb
> > >> Time.new.utc.round
> > NoMethodError: undefined method `round' for Tue May 29 10:54:04 UTC 
> > 2012:Time
> > from (irb):1
> > 
> > 
> > Regards
> > 
> > Peter___
> > MacRuby-devel mailing list
> > [email protected] 
> > (mailto:[email protected])
> > http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel
> 
> ___
> MacRuby-devel mailing list
> [email protected] (mailto:[email protected])
> http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel
> 
> 


___
MacRuby-devel mailing list
[email protected]
http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel


Re: [MacRuby-devel] Time.new.utc.round ?

2012-05-29 Thread Milos & Slavica
Issue #94:
https://github.com/MacRuby/MacRuby/issues/94

Cheers!
milos

On 29 May 2012, at 17:58, Joshua Ballanco wrote:

> Yes, this seems like a bug. Would you mind filing an issue on the Github 
> issue tracker?
> 
> On Tuesday, May 29, 2012 at 2:03 PM, Robert Schaaf wrote:
> 
>> Hi,
>> 
>> But 1.9.3 doesn't:
>> 
>> Traveler:~ rwschaaf$ rvm use 1.9.3
>> Using /Users/rwschaaf/.rvm/gems/ruby-1.9.3-p125
>> Traveler:~ rwschaaf$ irb
>> 1.9.3p125 :001 > Time.new.utc.round
>>  => 2012-05-29 11:01:22 UTC 
>> 
>> Bob Schaaf
>> 
>> On May 29, 2012, at 6:56 AM, Peter W A Wood wrote:
>> 
>>> Hi
>>> 
>>> On 29 May 2012, at 18:04, Milos & Slavica wrote:
>>> 
 Hi, 
 
 Is this a known issue?
 
 >> Time.new.utc.round
 NoMethodError: undefined method `round' for 2012-05-29 10:00:00 UTC:Time
>>> 
>>> Ruby 1.8.7 displays the same behaviour :
>>> 
>>> home$ irb
>>> >> Time.new.utc.round
>>> NoMethodError: undefined method `round' for Tue May 29 10:54:04 UTC 
>>> 2012:Time
>>> from (irb):1
>>> 
>>> Regards
>>> 
>>> Peter
>>> ___
>>> MacRuby-devel mailing list
>>> [email protected]
>>> http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel
>> 
>> ___
>> MacRuby-devel mailing list
>> [email protected]
>> http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel
> 
> ___
> MacRuby-devel mailing list
> [email protected]
> http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel

___
MacRuby-devel mailing list
[email protected]
http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel


Re: [MacRuby-devel] Time.new.utc.round ?

2012-05-29 Thread Joshua Ballanco
Thanks!

On Tuesday, May 29, 2012 at 7:17 PM, Milos & Slavica wrote:

> Issue #94:
> https://github.com/MacRuby/MacRuby/issues/94
> 
> Cheers!
> milos
> 
> On 29 May 2012, at 17:58, Joshua Ballanco wrote:
> > Yes, this seems like a bug. Would you mind filing an issue on the Github 
> > issue tracker? 
> > 
> > 
> > On Tuesday, May 29, 2012 at 2:03 PM, Robert Schaaf wrote:
> > 
> > > Hi,
> > > 
> > > But 1.9.3 doesn't:
> > > 
> > > Traveler:~ rwschaaf$ rvm use 1.9.3
> > > Using /Users/rwschaaf/.rvm/gems/ruby-1.9.3-p125
> > > Traveler:~ rwschaaf$ irb
> > > 1.9.3p125 :001 > Time.new.utc.round
> > >  => 2012-05-29 11:01:22 UTC 
> > > 
> > > Bob Schaaf
> > > 
> > > On May 29, 2012, at 6:56 AM, Peter W A Wood wrote:
> > > > Hi
> > > > 
> > > > On 29 May 2012, at 18:04, Milos & Slavica wrote:
> > > > > Hi, 
> > > > > 
> > > > > Is this a known issue?
> > > > > 
> > > > > >> Time.new.utc.round
> > > > > NoMethodError: undefined method `round' for 2012-05-29 10:00:00 
> > > > > UTC:Time
> > > > > 
> > > > 
> > > > 
> > > > Ruby 1.8.7 displays the same behaviour :
> > > > 
> > > > home$ irb
> > > > >> Time.new.utc.round
> > > > NoMethodError: undefined method `round' for Tue May 29 10:54:04 UTC 
> > > > 2012:Time
> > > > from (irb):1
> > > > 
> > > > 
> > > > Regards
> > > > 
> > > > Peter___
> > > > MacRuby-devel mailing list
> > > > [email protected] 
> > > > (mailto:[email protected])
> > > > http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel
> > > 
> > > ___
> > > MacRuby-devel mailing list
> > > [email protected] 
> > > (mailto:[email protected])
> > > http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel
> > > 
> > > 
> > > 
> > 
> > 
> > ___
> > MacRuby-devel mailing list
> > [email protected] 
> > (mailto:[email protected])
> > http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel
> 
> ___
> MacRuby-devel mailing list
> [email protected] (mailto:[email protected])
> http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel
> 
> 


___
MacRuby-devel mailing list
[email protected]
http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel