General

Profile

NorthernLights (Imran "")

  • Login: NorthernLights
  • Registered on: 12/11/2014
  • Last sign in: 02/20/2015

Issues

open closed Total
Assigned issues 0 0 0
Reported issues 0 3 3

Activity

02/20/2015

06:30 PM Ruby Bug #10870: Hash Literal Declined As First Argument
Thanks. NorthernLights (Imran "")

02/19/2015

09:42 PM Ruby Bug #10870 (Rejected): Hash Literal Declined As First Argument
Hi,
When a hash literal is passed as first argument to a method, Ruby throws a syntax error.
Example code:
~~~ruby
def foo *args
p args
end
foo 'Hello'
foo 123
foo ['Hello', 123]
foo {:hello => 123} # Syntax Error: Un...
NorthernLights (Imran "")

01/07/2015

04:29 PM Ruby Bug #10588: Invalid Dates
Patch to the above bug :
~~~
class SmartTime < Time
def self.mktime year, month, day
case month
when 4, 6, 9, 11
if day == 31
raise ArgumentError, 'argument out of range _ APR, JUNE, SEP, NOV', caller
...
NorthernLights (Imran "")
07:54 AM Ruby Bug #10703: Invalid Dates Bug Patch
Akira Tanaka:
I've highlighted this bug and offered a patch also. I love Ruby a lot. I wish I could say the same about its community.
Tsuyoshi Sawada:
It is a working solution. Instead of trolling, share your ingenious alternative.
NorthernLights (Imran "")
03:48 AM Ruby Bug #10703 (Rejected): Invalid Dates Bug Patch
The following is a pure Ruby-based patch to address the issues raised in [Bug 10588 Invalid Dates](http://bugs.ruby-lang.org/issues/10588):
~~~ruby
class SmartTime < Time
def self.mktime year, month, day
case month
when ...
NorthernLights (Imran "")

12/11/2014

01:52 PM Ruby Bug #10588 (Rejected): Invalid Dates
I was in the process of implementing a date-routine, which could prevent possible out-of-range/invalid date values.
The interpreter, rightfully, threw an out-of range error, when I tried any of the following:
puts Time.mktime 2014, 1...
NorthernLights (Imran "")

Also available in: Atom